cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject [24/93] [abbrv] [partial] merge master
Date Mon, 13 May 2013 15:53:44 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/SnapshotPolicyVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/SnapshotPolicyVO.java b/core/src/com/cloud/storage/SnapshotPolicyVO.java
deleted file mode 100644
index 4eb4916..0000000
--- a/core/src/com/cloud/storage/SnapshotPolicyVO.java
+++ /dev/null
@@ -1,133 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import org.apache.cloudstack.api.Identity;
-import com.cloud.storage.snapshot.SnapshotPolicy;
-import com.cloud.utils.DateUtil.IntervalType;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="snapshot_policy")
-public class SnapshotPolicyVO implements SnapshotPolicy {
-
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-    @Column(name="id")
-    long id;
-
-    @Column(name="volume_id")
-    long volumeId;
-
-    @Column(name="schedule")
-    String schedule;
-
-    @Column(name="timezone")
-    String timezone;
-
-    @Column(name="interval")
-    private short interval;
-
-    @Column(name="max_snaps")
-    private int maxSnaps;
-
-    @Column(name="active")
-    boolean active = false;
-
-    @Column(name="uuid")
-    String uuid;
-
-    public SnapshotPolicyVO() {
-    	this.uuid = UUID.randomUUID().toString();
-    }
-
-    public SnapshotPolicyVO(long volumeId, String schedule, String timezone, IntervalType intvType, int maxSnaps) {
-    	this.volumeId = volumeId;
-        this.schedule = schedule;
-        this.timezone = timezone;
-        this.interval = (short)intvType.ordinal();
-        this.maxSnaps = maxSnaps;
-        this.active = true;
-    	this.uuid = UUID.randomUUID().toString();
-    }
-
-    public long getId() {
-        return id;
-    }
-
-    public long getVolumeId() {
-		return volumeId;
-	}
-
-	public void setSchedule(String schedule) {
-        this.schedule = schedule;
-    }
-
-    public String getSchedule() {
-        return schedule;
-    }
-
-    public void setInterval(short interval) {
-        this.interval = interval;
-    }
-
-    public void setTimezone(String timezone) {
-        this.timezone = timezone;
-    }
-
-    public String getTimezone() {
-        return timezone;
-    }
-
-    public short getInterval() {
-        return interval;
-    }
-
-    public void setMaxSnaps(int maxSnaps) {
-        this.maxSnaps = maxSnaps;
-    }
-
-    public int getMaxSnaps() {
-        return maxSnaps;
-    }
-
-    public boolean isActive() {
-        return active;
-    }
-
-    public void setActive(boolean active) {
-        this.active = active;
-    }
-
-    @Override
-    public String getUuid() {
-    	return this.uuid;
-    }
-
-    public void setUuid(String uuid) {
-    	this.uuid = uuid;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/SnapshotScheduleVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/SnapshotScheduleVO.java b/core/src/com/cloud/storage/SnapshotScheduleVO.java
deleted file mode 100644
index 75757c6..0000000
--- a/core/src/com/cloud/storage/SnapshotScheduleVO.java
+++ /dev/null
@@ -1,125 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.util.Date;
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.cloudstack.api.Identity;
-import com.cloud.storage.snapshot.SnapshotSchedule;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="snapshot_schedule")
-public class SnapshotScheduleVO implements SnapshotSchedule {
-
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-	@Column(name="id")
-	long id;
-
-    // DB constraint: For a given volume and policyId, there will only be one entry in this table.
-    @Column(name="volume_id")
-    long volumeId;
-
-    @Column(name="policy_id")
-    long policyId;
-
-    @Column(name="scheduled_timestamp")
-    @Temporal(value=TemporalType.TIMESTAMP)
-    Date scheduledTimestamp;
-
-    @Column(name="async_job_id")
-    Long asyncJobId;
-
-    @Column(name="snapshot_id")
-    Long snapshotId;
-
-    @Column(name="uuid")
-    String uuid = UUID.randomUUID().toString();
-
-    public SnapshotScheduleVO() { }
-
-    public SnapshotScheduleVO(long volumeId, long policyId, Date scheduledTimestamp) {
-        this.volumeId = volumeId;
-        this.policyId = policyId;
-        this.scheduledTimestamp = scheduledTimestamp;
-        this.snapshotId = null;
-        this.asyncJobId = null;
-    }
-
-    public long getId() {
-        return id;
-    }
-
-    public Long getVolumeId() {
-        return volumeId;
-    }
-
-    public Long getPolicyId() {
-        return policyId;
-    }
-
-	public void setPolicyId(long policyId) {
-        this.policyId = policyId;
-    }
-
-    /**
-	 * @return the scheduledTimestamp
-	 */
-	public Date getScheduledTimestamp() {
-		return scheduledTimestamp;
-	}
-
-	public void setScheduledTimestamp(Date scheduledTimestamp) {
-        this.scheduledTimestamp = scheduledTimestamp;
-    }
-
-    public Long getAsyncJobId() {
-	    return asyncJobId;
-	}
-
-	public void setAsyncJobId(Long asyncJobId) {
-	    this.asyncJobId = asyncJobId;
-	}
-
-	public Long getSnapshotId() {
-	    return snapshotId;
-	}
-
-	public void setSnapshotId(Long snapshotId) {
-	    this.snapshotId = snapshotId;
-	}
-
-	@Override
-	public String getUuid() {
-		return this.uuid;
-	}
-
-	public void setUuid(String uuid) {
-		this.uuid = uuid;
-	}
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/SnapshotVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/SnapshotVO.java b/core/src/com/cloud/storage/SnapshotVO.java
deleted file mode 100644
index 78b96ec..0000000
--- a/core/src/com/cloud/storage/SnapshotVO.java
+++ /dev/null
@@ -1,298 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.utils.db.GenericDao;
-import com.google.gson.annotations.Expose;
-
-import javax.persistence.*;
-import java.util.Date;
-import java.util.UUID;
-
-@Entity
-@Table(name="snapshots")
-public class SnapshotVO implements Snapshot {
-
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-    @Column(name="id")
-    private long id;
-
-    @Column(name="data_center_id")
-    long dataCenterId;
-
-    @Column(name="account_id")
-    long accountId;
-
-    @Column(name="domain_id")
-    long domainId;
-
-    @Column(name="volume_id")
-    Long volumeId;
-
-    @Column(name="disk_offering_id")
-    Long diskOfferingId;
-
-    @Expose
-    @Column(name="path")
-    String path;
-
-    @Expose
-    @Column(name="name")
-    String name;
-
-    @Expose
-    @Column(name="status", updatable = true, nullable=false)
-    @Enumerated(value=EnumType.STRING)
-    private State state;
-
-    @Column(name="snapshot_type")
-    short snapshotType;
-
-    @Column(name="type_description")
-    String typeDescription;
-
-    @Column(name="size")
-    long size;
-
-    @Column(name=GenericDao.CREATED_COLUMN)
-    Date created;
-
-    @Column(name=GenericDao.REMOVED_COLUMN)
-    Date removed;
-
-    @Column(name="backup_snap_id")
-    String backupSnapshotId;
-
-    @Column(name="swift_id")
-    Long swiftId;
-
-    @Column(name="s3_id")
-    Long s3Id;
-
-    @Column(name="sechost_id")
-    Long secHostId;
-
-    @Column(name="prev_snap_id")
-    long prevSnapshotId;
-
-    @Column(name="hypervisor_type")
-    @Enumerated(value=EnumType.STRING)
-    HypervisorType  hypervisorType;
-
-    @Expose
-    @Column(name="version")
-    String version;
-
-    @Column(name="uuid")
-    String uuid;
-
-    public SnapshotVO() {
-        this.uuid = UUID.randomUUID().toString();
-    }
-
-    public SnapshotVO(long dcId, long accountId, long domainId, Long volumeId, Long diskOfferingId, String path, String name, short snapshotType, String typeDescription, long size, HypervisorType hypervisorType ) {
-        this.dataCenterId = dcId;
-        this.accountId = accountId;
-        this.domainId = domainId;
-        this.volumeId = volumeId;
-        this.diskOfferingId = diskOfferingId;
-        this.path = path;
-        this.name = name;
-        this.snapshotType = snapshotType;
-        this.typeDescription = typeDescription;
-        this.size = size;
-        this.state = State.Allocated;
-        this.prevSnapshotId = 0;
-        this.hypervisorType = hypervisorType;
-        this.version = "2.2";
-        this.uuid = UUID.randomUUID().toString();
-    }
-
-    @Override
-    public long getId() {
-        return id;
-    }
-
-    public long getDataCenterId() {
-        return dataCenterId;
-    }
-
-    @Override
-    public long getAccountId() {
-        return accountId;
-    }
-
-    @Override
-    public long getDomainId() {
-        return domainId;
-    }
-
-    @Override
-    public long getVolumeId() {
-        return volumeId;
-    }
-
-    public long getDiskOfferingId() {
-        return diskOfferingId;
-    }
-
-    public void setVolumeId(Long volumeId) {
-        this.volumeId = volumeId;
-    }
-
-    @Override
-    public String getPath() {
-        return path;
-    }
-
-    public void setPath(String path) {
-        this.path = path;
-    }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-    @Override
-    public short getsnapshotType() {
-        return snapshotType;
-    }
-
-    @Override
-    public Type getRecurringType() {
-        if (snapshotType < 0 || snapshotType >= Type.values().length) {
-            return null;
-        }
-        return Type.values()[snapshotType];
-    }
-
-    public Long getSwiftId() {
-        return swiftId;
-    }
-
-    public void setSwiftId(Long swiftId) {
-        this.swiftId = swiftId;
-    }
-
-    public Long getSecHostId() {
-        return secHostId;
-    }
-
-    public void setSecHostId(Long secHostId) {
-        this.secHostId = secHostId;
-    }
-
-    @Override
-    public HypervisorType getHypervisorType() {
-        return hypervisorType;
-    }
-
-    public void setSnapshotType(short snapshotType) {
-        this.snapshotType = snapshotType;
-    }
-
-    @Override
-    public boolean isRecursive(){
-        if ( snapshotType >= Type.HOURLY.ordinal() && snapshotType <= Type.MONTHLY.ordinal() ) {
-            return true;
-        }
-        return false;
-    }
-
-    public long getSize() {
-        return size;
-    }
-
-    public String getTypeDescription() {
-        return typeDescription;
-    }
-    public void setTypeDescription(String typeDescription) {
-        this.typeDescription = typeDescription;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    @Override
-    public Date getCreated() {
-        return created;
-    }
-
-    public Date getRemoved() {
-        return removed;
-    }
-
-    @Override
-    public State getState() {
-        return state;
-    }
-
-
-	public void setState(State state) {
-        this.state = state;
-    }
-
-    public String getBackupSnapshotId(){
-        return backupSnapshotId;
-    }
-
-    public long getPrevSnapshotId(){
-        return prevSnapshotId;
-    }
-
-    public void setBackupSnapshotId(String backUpSnapshotId){
-        this.backupSnapshotId = backUpSnapshotId;
-    }
-
-    public void setPrevSnapshotId(long prevSnapshotId){
-        this.prevSnapshotId = prevSnapshotId;
-    }
-
-    public static Type getSnapshotType(String snapshotType) {
-        for ( Type type : Type.values()) {
-            if ( type.equals(snapshotType)) {
-                return type;
-            }
-        }
-        return null;
-    }
-
-    @Override
-    public String getUuid() {
-        return this.uuid;
-    }
-
-    public void setUuid(String uuid) {
-        this.uuid = uuid;
-    }
-
-    public Long getS3Id() {
-        return s3Id;
-    }
-
-    public void setS3Id(Long s3Id) {
-        this.s3Id = s3Id;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/StoragePoolDiscoverer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/StoragePoolDiscoverer.java b/core/src/com/cloud/storage/StoragePoolDiscoverer.java
deleted file mode 100644
index c7dd362..0000000
--- a/core/src/com/cloud/storage/StoragePoolDiscoverer.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.net.URI;
-import java.util.Map;
-
-import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
-
-import com.cloud.exception.DiscoveryException;
-import com.cloud.utils.component.Adapter;
-
-/**
- * Discoverer to find new Storage Pools.
- */
-public interface StoragePoolDiscoverer extends Adapter {
-
-    Map<StoragePoolVO, Map<String, String>> find(long dcId, Long podId, URI uri, Map<String, String> details) throws DiscoveryException;
-    
-    Map<StoragePoolVO, Map<String, String>> find(long dcId, Long podId, URI uri, Map<String, String> details, String username, String password) throws DiscoveryException;
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/StoragePoolHostAssoc.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/StoragePoolHostAssoc.java b/core/src/com/cloud/storage/StoragePoolHostAssoc.java
deleted file mode 100644
index 34326d9..0000000
--- a/core/src/com/cloud/storage/StoragePoolHostAssoc.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import java.util.Date;
-
-public interface StoragePoolHostAssoc extends InternalIdentity {
-	
-	long getHostId();
-	
-	long getPoolId();
-	
-	String getLocalPath();
-
-	Date getCreated();
-
-	Date getLastUpdated();
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/StoragePoolHostVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/StoragePoolHostVO.java b/core/src/com/cloud/storage/StoragePoolHostVO.java
deleted file mode 100644
index a8a2bac..0000000
--- a/core/src/com/cloud/storage/StoragePoolHostVO.java
+++ /dev/null
@@ -1,109 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import com.cloud.utils.db.GenericDaoBase;
-import org.apache.cloudstack.api.InternalIdentity;
-
-/**
- * Join table for storage pools and hosts
- *
- */
-@Entity
-@Table(name="storage_pool_host_ref")
-public class StoragePoolHostVO implements StoragePoolHostAssoc {
-	@Id
-	@GeneratedValue(strategy=GenerationType.IDENTITY)
-	private Long id;
-	
-	@Column(name="pool_id")
-	private long poolId;
-	
-	@Column(name="host_id")
-	private long hostId;
-	
-	@Column(name="local_path")
-	private String localPath;
-	
-	@Column(name=GenericDaoBase.CREATED_COLUMN)
-	private Date created = null;
-	
-	@Column(name="last_updated")
-	@Temporal(value=TemporalType.TIMESTAMP)
-	private Date lastUpdated = null;
-	
-	
-	public StoragePoolHostVO() {
-		super();
-	}
-
-
-	public StoragePoolHostVO(long poolId, long hostId, String localPath) {
-		this.poolId = poolId;
-		this.hostId = hostId;
-		this.localPath = localPath;
-	}
-
-
-	@Override
-	public long getHostId() {
-		return hostId;
-	}
-
-
-    public long getId() {
-        return id;
-    }
-
-
-    @Override
-	public String getLocalPath() {
-		return localPath;
-	}
-
-	@Override
-	public long getPoolId() {
-		return poolId;
-	}
-
-	@Override
-	public Date getCreated() {
-		return created;
-	}
-
-	@Override
-	public Date getLastUpdated() {
-		return lastUpdated;
-	}
-
-
-	public void setLocalPath(String localPath) {
-		this.localPath = localPath;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/StoragePoolWorkVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/StoragePoolWorkVO.java b/core/src/com/cloud/storage/StoragePoolWorkVO.java
deleted file mode 100644
index 440065d..0000000
--- a/core/src/com/cloud/storage/StoragePoolWorkVO.java
+++ /dev/null
@@ -1,118 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="storage_pool_work")
-public class StoragePoolWorkVO implements InternalIdentity {
-    
-    public long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getPoolId() {
-        return poolId;
-    }
-
-
-    public void setPoolId(Long poolId) {
-        this.poolId = poolId;
-    }
-
-
-    public boolean isStoppedForMaintenance() {
-        return stoppedForMaintenance;
-    }
-
-
-    public void setStoppedForMaintenance(boolean stoppedForMaintenance) {
-        this.stoppedForMaintenance = stoppedForMaintenance;
-    }
-
-
-    public boolean isStartedAfterMaintenance() {
-        return startedAfterMaintenance;
-    }
-
-    public void setStartedAfterMaintenance(boolean startedAfterMaintenance) {
-        this.startedAfterMaintenance = startedAfterMaintenance;
-    }
-
-    public Long getVmId() {
-        return vmId;
-    }
-
-    public void setVmId(Long vmId) {
-        this.vmId = vmId;
-    }
-    
-    public Long getManagementServerId() {
-        return managementServerId;
-    }
-
-    public void setManagementServerId(Long managementServerId) {
-        this.managementServerId = managementServerId;
-    }
-
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-    @Column(name="id")
-    private Long id;
-    
-    @Column(name="pool_id")
-    private Long poolId;
-
-    @Column(name="vm_id")
-    private Long vmId;
-    
-    @Column(name="stopped_for_maintenance")
-    private boolean stoppedForMaintenance;
-    
-    @Column(name="started_after_maintenance")
-    private boolean startedAfterMaintenance;
-
-    @Column(name="mgmt_server_id")
-    private Long managementServerId;
-    
-
-    public StoragePoolWorkVO(long vmId, long poolId, boolean stoppedForMaintenance, boolean startedAfterMaintenance, long mgmtServerId) {
-        super();
-        this.vmId = vmId;
-        this.poolId = poolId;
-        this.stoppedForMaintenance = stoppedForMaintenance;
-        this.startedAfterMaintenance = startedAfterMaintenance;
-        this.managementServerId = mgmtServerId;
-    }
-    
-    public StoragePoolWorkVO() {
-        
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/SwiftVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/SwiftVO.java b/core/src/com/cloud/storage/SwiftVO.java
deleted file mode 100644
index c99f0ef..0000000
--- a/core/src/com/cloud/storage/SwiftVO.java
+++ /dev/null
@@ -1,108 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.util.Date;
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import com.cloud.agent.api.to.SwiftTO;
-import org.apache.cloudstack.api.Identity;
-import com.cloud.utils.db.GenericDao;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="swift")
-public class SwiftVO implements Swift, InternalIdentity {
-
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-    @Column(name="id")
-    private long id;
-
-    @Column(name="url")
-    String url;
-
-    @Column(name="account")
-    String account;
-
-    @Column(name="username")
-    String userName;
-
-    @Column(name="key")
-    String key;
-
-    @Column(name="uuid")
-    String uuid = UUID.randomUUID().toString();
-
-    @Column(name = GenericDao.CREATED_COLUMN)
-    private Date created;
-
-    public SwiftVO() { }
-
-    public SwiftVO(String url, String account, String userName, String key) {
-        this.url = url;
-        this.account = account;
-        this.userName = userName;
-        this.key = key;
-    }
-
-    @Override
-    public long getId() {
-        return id;
-    }
-    @Override
-    public String getUrl() {
-        return url;
-    }
-    @Override
-    public String getAccount() {
-        return account;
-    }
-    @Override
-    public String getUserName() {
-        return userName;
-    }
-    @Override
-    public String getKey() {
-        return key;
-    }
-
-    public Date getCreated() {
-        return created;
-    }
-
-    @Override
-    public SwiftTO toSwiftTO() {
-        return new SwiftTO(getId(), getUrl(), getAccount(), getUserName(), getKey());
-    }
-
-    @Override
-    public String getUuid() {
-    	return this.uuid;
-    }
-
-    public void setUuid(String uuid) {
-    	this.uuid = uuid;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/UploadVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/UploadVO.java b/core/src/com/cloud/storage/UploadVO.java
deleted file mode 100755
index d761bf1..0000000
--- a/core/src/com/cloud/storage/UploadVO.java
+++ /dev/null
@@ -1,268 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.util.Date;
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import com.cloud.utils.NumbersUtil;
-import com.cloud.utils.db.GenericDaoBase;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="upload")
-public class UploadVO implements Upload {
-	@Id
-	@GeneratedValue(strategy=GenerationType.IDENTITY)
-	long id;
-
-    @Column(name="uuid")
-	private String uuid;
-
-	@Column(name="host_id")
-	private long hostId;
-
-	@Column(name="type_id")
-	private long typeId;
-
-	@Column(name=GenericDaoBase.CREATED_COLUMN)
-	private Date created = null;
-
-	@Column(name="last_updated")
-	@Temporal(value=TemporalType.TIMESTAMP)
-	private Date lastUpdated = null;
-
-	@Column (name="upload_pct")
-	private int uploadPercent;
-
-	@Column (name="type")
-	@Enumerated(EnumType.STRING)
-	private Type type;
-
-	@Column (name="mode")
-    @Enumerated(EnumType.STRING)
-    private Mode mode = Mode.FTP_UPLOAD;
-
-	@Column (name="upload_state")
-	@Enumerated(EnumType.STRING)
-	private Status uploadState;
-
-	@Column (name="error_str")
-	private String errorString;
-
-	@Column (name="job_id")
-	private String jobId;
-
-	@Column (name="url")
-	private String uploadUrl;
-
-	@Column (name="install_path")
-	private String installPath;
-
-	@Override
-    public long getHostId() {
-		return hostId;
-	}
-
-	public void setHostId(long hostId) {
-		this.hostId = hostId;
-	}
-
-	@Override
-    public long getId() {
-		return id;
-	}
-
-
-	public String getUuid() {
-        return uuid;
-    }
-
-    @Override
-    public Date getCreated() {
-		return created;
-	}
-
-	@Override
-    public Date getLastUpdated() {
-		return lastUpdated;
-	}
-
-	public void setLastUpdated(Date date) {
-	    lastUpdated = date;
-	}
-
-	public UploadVO(long hostId, long templateId) {
-		super();
-		this.hostId = hostId;
-		this.typeId = templateId;
-		this.uuid = UUID.randomUUID().toString();
-	}
-
-	public UploadVO(long hostId, long typeId, Date lastUpdated,
-			Status uploadState, Type type,
-			String uploadUrl, Mode mode) {
-		super();
-		this.hostId = hostId;
-		this.typeId = typeId;
-		this.lastUpdated = lastUpdated;
-		this.uploadState = uploadState;
-		this.mode = mode;
-		this.type = type;
-		this.uploadUrl = uploadUrl;
-        this.uuid = UUID.randomUUID().toString();
-	}
-
-	public UploadVO(long hostId, long typeId, Date lastUpdated,
-            Status uploadState, int uploadPercent, Type type,
-            Mode mode) {
-        super();
-        this.hostId = hostId;
-        this.typeId = typeId;
-        this.lastUpdated = lastUpdated;
-        this.uploadState = uploadState;
-        this.uploadPercent = uploadPercent;
-        this.type = type;
-        this.mode = mode;
-        this.uuid = UUID.randomUUID().toString();
-
-    }
-
-	protected UploadVO() {
-	}
-
-	public UploadVO(Long uploadId) {
-		this.id = uploadId;
-	}
-
-	public void setErrorString(String errorString) {
-		this.errorString = errorString;
-	}
-
-	@Override
-    public String getErrorString() {
-		return errorString;
-	}
-
-	public void setJobId(String jobId) {
-		this.jobId = jobId;
-	}
-
-	@Override
-    public String getJobId() {
-		return jobId;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (obj instanceof UploadVO) {
-			UploadVO other = (UploadVO)obj;
-		   return (this.typeId==other.getTypeId() && this.hostId==other.getHostId() && this.type == other.getType());
-		}
-		return false;
-	}
-
-	@Override
-	public int hashCode() {
-		return NumbersUtil.hash(id);
-	}
-
-	@Override
-    public int getUploadPercent() {
-		return uploadPercent;
-	}
-
-	public void setUploadPercent(int uploadPercent) {
-		this.uploadPercent = uploadPercent;
-	}
-
-	@Override
-    public Status getUploadState() {
-		return uploadState;
-	}
-
-	public void setUploadState(Status uploadState) {
-		this.uploadState = uploadState;
-	}
-
-	@Override
-    public long getTypeId() {
-		return typeId;
-	}
-
-	public void setTypeId(long typeId) {
-		this.typeId = typeId;
-	}
-
-	@Override
-    public Type getType() {
-		return type;
-	}
-
-	public void setType(Type type) {
-		this.type = type;
-	}
-
-	@Override
-    public Mode getMode() {
-        return mode;
-    }
-
-    public void setMode(Mode mode) {
-        this.mode = mode;
-    }
-
-    @Override
-    public String getUploadUrl() {
-		return uploadUrl;
-	}
-
-	public void setUploadUrl(String uploadUrl) {
-		this.uploadUrl = uploadUrl;
-	}
-
-	@Override
-    public void setId(Long id) {
-		this.id = id;
-	}
-
-	@Override
-    public void setCreated(Date created) {
-		this.created = created;
-	}
-
-    @Override
-    public String getInstallPath() {
-        return installPath;
-    }
-
-    @Override
-    public void setInstallPath(String installPath) {
-        this.installPath = installPath;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/VMTemplateDetailVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/VMTemplateDetailVO.java b/core/src/com/cloud/storage/VMTemplateDetailVO.java
deleted file mode 100644
index c007802..0000000
--- a/core/src/com/cloud/storage/VMTemplateDetailVO.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="vm_template_details")
-public class VMTemplateDetailVO implements InternalIdentity {
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-    @Column(name="id")
-    private long id;
-    
-    @Column(name="template_id")
-    private long templateId;
-    
-    @Column(name="name")
-    private String name;
-    
-    @Column(name="value", length=1024)
-    private String value;
-	
-    public VMTemplateDetailVO() {}
-    
-    public VMTemplateDetailVO(long templateId, String name, String value) {
-    	this.templateId = templateId;
-    	this.name = name;
-    	this.value = value;
-    }
-
-	public long getId() {
-		return id;
-	}
-
-	public long getTemplateId() {
-		return templateId;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public String getValue() {
-		return value;
-	}
-
-	public void setId(long id) {
-		this.id = id;
-	}
-
-	public void setTemplateId(long templateId) {
-		this.templateId = templateId;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public void setValue(String value) {
-		this.value = value;
-	}
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/VMTemplateHostVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/VMTemplateHostVO.java b/core/src/com/cloud/storage/VMTemplateHostVO.java
deleted file mode 100755
index b8dfc41..0000000
--- a/core/src/com/cloud/storage/VMTemplateHostVO.java
+++ /dev/null
@@ -1,322 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
-import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
-
-import com.cloud.utils.db.GenericDaoBase;
-
-/**
- * Join table for storage hosts and templates
- *
- */
-@Entity
-@Table(name="template_host_ref")
-public class VMTemplateHostVO implements VMTemplateStorageResourceAssoc, DataObjectInStore {
-	@Id
-	@GeneratedValue(strategy=GenerationType.IDENTITY)
-	Long id;
-	
-	@Column(name="host_id")
-	private long hostId;
-	
-	@Column(name="template_id")
-	private long templateId;
-	
-	@Column(name=GenericDaoBase.CREATED_COLUMN)
-	private Date created = null;
-	
-	@Column(name="last_updated")
-	@Temporal(value=TemporalType.TIMESTAMP)
-	private Date lastUpdated = null;
-	
-	@Column (name="download_pct")
-	private int downloadPercent;
-	
-	@Column (name="size")
-	private long size;
-	
-	@Column (name="physical_size")
-	private long physicalSize;
-	
-	@Column (name="download_state")
-	@Enumerated(EnumType.STRING)
-	private Status downloadState;
-	
-	@Column (name="local_path")
-	private String localDownloadPath;
-	
-	@Column (name="error_str")
-	private String errorString;
-	
-	@Column (name="job_id")
-	private String jobId;	
-	
-	@Column (name="install_path")
-    private String installPath;
-	
-	@Column (name="url")
-	private String downloadUrl;
-
-	@Column(name="is_copy")
-	private boolean isCopy = false;
-    
-    @Column(name="destroyed")
-    boolean destroyed = false;
-    
-    @Column(name="update_count", updatable = true, nullable=false)
-    protected long updatedCount;
-    
-    @Column(name = "updated")
-    @Temporal(value = TemporalType.TIMESTAMP)
-    Date updated;
-    
-    @Column(name = "state")
-    @Enumerated(EnumType.STRING)
-    ObjectInDataStoreStateMachine.State state;
-    
-    
-	@Override
-    public String getInstallPath() {
-		return installPath;
-	}
-
-	public long getHostId() {
-		return hostId;
-	}
-
-	public void setHostId(long hostId) {
-		this.hostId = hostId;
-	}
-
-	@Override
-    public long getTemplateId() {
-		return templateId;
-	}
-
-	@Override
-    public void setTemplateId(long templateId) {
-		this.templateId = templateId;
-	}
-
-	@Override
-    public int getDownloadPercent() {
-		return downloadPercent;
-	}
-
-	@Override
-    public void setDownloadPercent(int downloadPercent) {
-		this.downloadPercent = downloadPercent;
-	}
-
-	@Override
-    public void setDownloadState(Status downloadState) {
-		this.downloadState = downloadState;
-	}
-
-	@Override
-    public long getId() {
-		return id;
-	}
-
-	@Override
-    public Date getCreated() {
-		return created;
-	}
-
-	@Override
-    public Date getLastUpdated() {
-		return lastUpdated;
-	}
-	
-	@Override
-    public void setLastUpdated(Date date) {
-	    lastUpdated = date;
-	}
-	
-	@Override
-    public void setInstallPath(String installPath) {
-	    this.installPath = installPath;
-	}
-
-	@Override
-    public Status getDownloadState() {
-		return downloadState;
-	}
-
-	public VMTemplateHostVO(long hostId, long templateId) {
-		super();
-		this.hostId = hostId;
-		this.templateId = templateId;
-		this.state = ObjectInDataStoreStateMachine.State.Allocated;
-	}
-
-	public VMTemplateHostVO(long hostId, long templateId, Date lastUpdated,
-			int downloadPercent, Status downloadState,
-			String localDownloadPath, String errorString, String jobId,
-			String installPath, String downloadUrl) {
-		super();
-		this.hostId = hostId;
-		this.templateId = templateId;
-		this.lastUpdated = lastUpdated;
-		this.downloadPercent = downloadPercent;
-		this.downloadState = downloadState;
-		this.localDownloadPath = localDownloadPath;
-		this.errorString = errorString;
-		this.jobId = jobId;
-		this.installPath = installPath;
-		this.setDownloadUrl(downloadUrl);
-	}
-
-	protected VMTemplateHostVO() {
-		
-	}
-
-	@Override
-    public void setLocalDownloadPath(String localPath) {
-		this.localDownloadPath = localPath;
-	}
-
-	@Override
-    public String getLocalDownloadPath() {
-		return localDownloadPath;
-	}
-
-	@Override
-    public void setErrorString(String errorString) {
-		this.errorString = errorString;
-	}
-
-	@Override
-    public String getErrorString() {
-		return errorString;
-	}
-
-	@Override
-    public void setJobId(String jobId) {
-		this.jobId = jobId;
-	}
-
-	@Override
-    public String getJobId() {
-		return jobId;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (obj instanceof VMTemplateHostVO) {
-			VMTemplateHostVO other = (VMTemplateHostVO)obj;
-			return (this.templateId==other.getTemplateId() && this.hostId==other.getHostId());		   
-		}
-		return false;
-	}
-
-	@Override
-	public int hashCode() {
-		Long tid = new Long(templateId);
-		Long hid = new Long(hostId);
-		return tid.hashCode()+hid.hashCode();
-	}
-
-    public void setSize(long size) {
-        this.size = size;
-    }
-
-    public long getSize() {
-        return size;
-    }
-	
-    
-    public void setPhysicalSize(long physicalSize) {
-        this.physicalSize = physicalSize;
-    }
-
-    public long getPhysicalSize() {
-        return physicalSize;
-    }
-
-    public void setDestroyed(boolean destroyed) {
-    	this.destroyed = destroyed;
-    }
-
-    public boolean getDestroyed() {
-    	return destroyed;
-    }
-
-	public void setDownloadUrl(String downloadUrl) {
-		this.downloadUrl = downloadUrl;
-	}
-
-	public String getDownloadUrl() {
-		return downloadUrl;
-	}
-
-	public void setCopy(boolean isCopy) {
-		this.isCopy = isCopy;
-	}
-
-	public boolean isCopy() {
-		return isCopy;
-	}
-	
-	@Override
-    public long getTemplateSize() {
-	    return -1;
-	}
-	
-	@Override
-    public String toString() {
-	    return new StringBuilder("TmplHost[").append(id).append("-").append(templateId).append("-").append(hostId).append(installPath).append("]").toString();
-	}
-
-    @Override
-    public ObjectInDataStoreStateMachine.State getState() {
-        // TODO Auto-generated method stub
-        return this.state;
-    }
-    
-    public long getUpdatedCount() {
-        return this.updatedCount;
-    }
-    
-    public void incrUpdatedCount() {
-        this.updatedCount++;
-    }
-
-    public void decrUpdatedCount() {
-        this.updatedCount--;
-    }
-    
-    public Date getUpdated() {
-        return updated;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/VMTemplateS3VO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/VMTemplateS3VO.java b/core/src/com/cloud/storage/VMTemplateS3VO.java
deleted file mode 100644
index 02f3ff5..0000000
--- a/core/src/com/cloud/storage/VMTemplateS3VO.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.cloud.storage;
-
-import com.cloud.utils.db.GenericDaoBase;
-import org.apache.cloudstack.api.InternalIdentity;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-@Entity
-@Table(name = "template_s3_ref")
-public class VMTemplateS3VO implements InternalIdentity {
-
-    public static final String S3_ID_COLUMN_NAME = "s3_id";
-
-    public static final String TEMPLATE_ID_COLUMN_NAME = "template_id";
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    private long id;
-
-    @Column(name = S3_ID_COLUMN_NAME)
-    private long s3Id;
-
-    @Column(name = TEMPLATE_ID_COLUMN_NAME)
-    private long templateId;
-
-    @Column(name = GenericDaoBase.CREATED_COLUMN)
-    private Date created;
-
-    @Column(name = "size")
-    private Long size;
-
-    @Column(name = "physical_size")
-    private Long physicalSize;
-
-    public VMTemplateS3VO() {
-        super();
-    }
-
-    public VMTemplateS3VO(final long s3Id, final long templateId,
-            final Date created, final Long size, final Long physicalSize) {
-
-        super();
-
-        this.s3Id = s3Id;
-        this.templateId = templateId;
-        this.created = created;
-        this.size = size;
-        this.physicalSize = physicalSize;
-
-    }
-
-    @Override
-    public boolean equals(final Object thatObject) {
-
-        if (this == thatObject) {
-            return true;
-        }
-
-        if (thatObject == null || getClass() != thatObject.getClass()) {
-            return false;
-        }
-
-        final VMTemplateS3VO thatVMTemplateS3VO = (VMTemplateS3VO) thatObject;
-
-        if (this.id != thatVMTemplateS3VO.id) {
-            return false;
-        }
-
-        if (this.s3Id != thatVMTemplateS3VO.s3Id) {
-            return false;
-        }
-
-        if (this.templateId != thatVMTemplateS3VO.templateId) {
-            return false;
-        }
-
-        if (this.created != null ? !created.equals(thatVMTemplateS3VO.created)
-                : thatVMTemplateS3VO.created != null) {
-            return false;
-        }
-
-        if (this.physicalSize != null ? !physicalSize
-                .equals(thatVMTemplateS3VO.physicalSize)
-                : thatVMTemplateS3VO.physicalSize != null) {
-            return false;
-        }
-
-        if (this.size != null ? !size.equals(thatVMTemplateS3VO.size)
-                : thatVMTemplateS3VO.size != null) {
-            return false;
-        }
-
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-
-        int result = (int) (this.id ^ (this.id >>> 32));
-
-        result = 31 * result + (int) (this.s3Id ^ (this.s3Id >>> 32));
-        result = 31 * result
-                + (int) (this.templateId ^ (this.templateId >>> 32));
-        result = 31 * result
-                + (this.created != null ? this.created.hashCode() : 0);
-        result = 31 * result + (this.size != null ? this.size.hashCode() : 0);
-        result = 31
-                * result
-                + (this.physicalSize != null ? this.physicalSize.hashCode() : 0);
-
-        return result;
-
-    }
-
-    public long getId() {
-        return this.id;
-    }
-
-    public void setId(final long id) {
-        this.id = id;
-    }
-
-    public long getS3Id() {
-        return this.s3Id;
-    }
-
-    public void setS3Id(final long s3Id) {
-        this.s3Id = s3Id;
-    }
-
-    public long getTemplateId() {
-        return this.templateId;
-    }
-
-    public void setTemplateId(final long templateId) {
-        this.templateId = templateId;
-    }
-
-    public Date getCreated() {
-        return this.created;
-    }
-
-    public void setCreated(final Date created) {
-        this.created = created;
-    }
-
-    public Long getSize() {
-        return this.size;
-    }
-
-    public void setSize(final Long size) {
-        this.size = size;
-    }
-
-    public Long getPhysicalSize() {
-        return this.physicalSize;
-    }
-
-    public void setPhysicalSize(final Long physicalSize) {
-        this.physicalSize = physicalSize;
-    }
-
-    @Override
-    public String toString() {
-
-        final StringBuilder stringBuilder = new StringBuilder(
-                "VMTemplateS3VO [ id: ").append(id).append(", created: ")
-                .append(DateFormat.getDateTimeInstance().format(created))
-                .append(", physicalSize: ").append(physicalSize)
-                .append(", size: ").append(size).append(", templateId: ")
-                .append(templateId).append(", s3Id: ").append(s3Id)
-                .append(" ]");
-
-        return stringBuilder.toString();
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java b/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java
deleted file mode 100644
index 9b76176..0000000
--- a/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java
+++ /dev/null
@@ -1,275 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
-import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
-import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.State;
-
-import com.cloud.utils.db.GenericDaoBase;
-
-/**
- * Join table for storage pools and templates
- *
- */
-@Entity
-@Table(name="template_spool_ref")
-public class VMTemplateStoragePoolVO implements VMTemplateStorageResourceAssoc, DataObjectInStore {
-	@Id
-	@GeneratedValue(strategy=GenerationType.IDENTITY)
-	long id;
-	
-	@Column(name="pool_id")
-	private long poolId;
-	
-	@Column(name="template_id") long templateId;
-	
-	@Column(name=GenericDaoBase.CREATED_COLUMN) Date created = null;
-	
-	@Column(name="last_updated")
-	@Temporal(value=TemporalType.TIMESTAMP) Date lastUpdated = null;
-	
-	@Column (name="download_pct") int downloadPercent;
-	
-	@Column (name="download_state")
-	@Enumerated(EnumType.STRING) Status downloadState;
-	
-	@Column (name="local_path") String localDownloadPath;
-	
-	@Column (name="error_str") String errorString;
-	
-	@Column (name="job_id") String jobId;
-	
-	@Column (name="install_path") String installPath;
-	
-	@Column (name="template_size") long templateSize;
-	
-	@Column (name="marked_for_gc") boolean markedForGC;
-
-	@Column(name="update_count", updatable = true, nullable=false)
-	protected long updatedCount;
-
-	@Column(name = "updated")
-	@Temporal(value = TemporalType.TIMESTAMP)
-	Date updated;
-
-	@Column(name = "state")
-	@Enumerated(EnumType.STRING)
-	ObjectInDataStoreStateMachine.State state;
-
-	@Override
-    public String getInstallPath() {
-		return installPath;
-	}
-	
-	@Override
-    public long getTemplateSize() {
-		return templateSize;
-	}
-
-	public long getPoolId() {
-		return poolId;
-	}
-
-	public void setpoolId(long poolId) {
-		this.poolId = poolId;
-	}
-
-	@Override
-    public long getTemplateId() {
-		return templateId;
-	}
-
-	@Override
-    public void setTemplateId(long templateId) {
-		this.templateId = templateId;
-	}
-
-	@Override
-    public int getDownloadPercent() {
-		return downloadPercent;
-	}
-
-	@Override
-    public void setDownloadPercent(int downloadPercent) {
-		this.downloadPercent = downloadPercent;
-	}
-
-	@Override
-    public void setDownloadState(Status downloadState) {
-		this.downloadState = downloadState;
-	}
-
-	@Override
-    public long getId() {
-		return id;
-	}
-
-	@Override
-    public Date getCreated() {
-		return created;
-	}
-
-	@Override
-    public Date getLastUpdated() {
-		return lastUpdated;
-	}
-	
-	@Override
-    public void setLastUpdated(Date date) {
-	    lastUpdated = date;
-	}
-	
-	@Override
-    public void setInstallPath(String installPath) {
-	    this.installPath = installPath;
-	}
-
-	@Override
-    public Status getDownloadState() {
-		return downloadState;
-	}
-
-	public VMTemplateStoragePoolVO(long poolId, long templateId) {
-		super();
-		this.poolId = poolId;
-		this.templateId = templateId;
-		this.downloadState = Status.NOT_DOWNLOADED;
-		this.state = ObjectInDataStoreStateMachine.State.Allocated;
-		this.markedForGC = false;
-	}
-
-	public VMTemplateStoragePoolVO(long poolId, long templateId, Date lastUpdated,
-			int downloadPercent, Status downloadState,
-			String localDownloadPath, String errorString, String jobId,
-			String installPath, long templateSize) {
-		super();
-		this.poolId = poolId;
-		this.templateId = templateId;
-		this.lastUpdated = lastUpdated;
-		this.downloadPercent = downloadPercent;
-		this.downloadState = downloadState;
-		this.localDownloadPath = localDownloadPath;
-		this.errorString = errorString;
-		this.jobId = jobId;
-		this.installPath = installPath;
-		this.templateSize = templateSize;
-	}
-
-	protected VMTemplateStoragePoolVO() {
-		
-	}
-
-	@Override
-    public void setLocalDownloadPath(String localPath) {
-		this.localDownloadPath = localPath;
-	}
-
-	@Override
-    public String getLocalDownloadPath() {
-		return localDownloadPath;
-	}
-
-	@Override
-    public void setErrorString(String errorString) {
-		this.errorString = errorString;
-	}
-
-	@Override
-    public String getErrorString() {
-		return errorString;
-	}
-
-	@Override
-    public void setJobId(String jobId) {
-		this.jobId = jobId;
-	}
-
-	@Override
-    public String getJobId() {
-		return jobId;
-	}
-	
-	public void setTemplateSize(long templateSize) {
-		this.templateSize = templateSize;
-	}
-	
-	public boolean getMarkedForGC() {
-		return markedForGC;
-	}
-	
-	public void setMarkedForGC(boolean markedForGC) {
-		this.markedForGC = markedForGC;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (obj instanceof VMTemplateStoragePoolVO) {
-		   VMTemplateStoragePoolVO other = (VMTemplateStoragePoolVO)obj;
-		   return (this.templateId==other.getTemplateId() && this.poolId==other.getPoolId());
-		}
-		return false;
-	}
-
-	@Override
-	public int hashCode() {
-		Long tid = new Long(templateId);
-		Long hid = new Long(poolId);
-		return tid.hashCode()+hid.hashCode();
-	}
-	
-	@Override
-    public String toString() {
-	    return new StringBuilder("TmplPool[").append(id).append("-").append(templateId).append("-").append("poolId").append("-").append(installPath).append("]").toString();
-	}
-
-    @Override
-    public State getState() {
-        return this.state;
-    }
-    
-    public long getUpdatedCount() {
-        return this.updatedCount;
-    }
-    
-    public void incrUpdatedCount() {
-        this.updatedCount++;
-    }
-
-    public void decrUpdatedCount() {
-        this.updatedCount--;
-    }
-    
-    public Date getUpdated() {
-        return updated;
-    }
-    
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/VMTemplateSwiftVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/VMTemplateSwiftVO.java b/core/src/com/cloud/storage/VMTemplateSwiftVO.java
deleted file mode 100755
index 6c7a73d..0000000
--- a/core/src/com/cloud/storage/VMTemplateSwiftVO.java
+++ /dev/null
@@ -1,107 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import com.cloud.utils.db.GenericDaoBase;
-import org.apache.cloudstack.api.InternalIdentity;
-
-/**
- * Join table for swift and templates
- * 
- * 
- */
-@Entity
-@Table(name = "template_swift_ref")
-public class VMTemplateSwiftVO implements InternalIdentity {
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    Long id;
-
-    @Column(name = "swift_id")
-    private long swiftId;
-
-    @Column(name = "template_id")
-    private long templateId;
-
-    @Column(name = GenericDaoBase.CREATED_COLUMN)
-    private Date created = null;
-
-    @Column(name = "path")
-    private String path;
-
-    @Column(name = "size")
-    private long size;
-
-    @Column(name = "physical_size")
-    private long physicalSize;
-
-    public VMTemplateSwiftVO(long swiftId, long templateId, Date created, String path, long size, long physicalSize) {
-        this.swiftId = swiftId;
-        this.templateId = templateId;
-        this.created = created;
-        this.path = path;
-        this.size = size;
-        this.physicalSize = physicalSize;
-    }
-
-    protected VMTemplateSwiftVO() {
-
-    }
-
-    public long getTemplateId() {
-        return templateId;
-    }
-
-    public long getId() {
-        return id;
-    }
-
-    public Date getCreated() {
-        return created;
-    }
-
-    public String getPath() {
-        return path;
-    }
-
-    public long getSwiftId() {
-        return swiftId;
-    }
-
-    public long getSize() {
-        return size;
-    }
-
-    public long getPhysicalSize() {
-        return physicalSize;
-    }
-
-    @Override
-    public String toString() {
-        return new StringBuilder("TmplSwift[").append(id).append("-").append(templateId).append("-").append(swiftId).append("]").toString();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/VMTemplateVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/VMTemplateVO.java b/core/src/com/cloud/storage/VMTemplateVO.java
deleted file mode 100755
index e643d75..0000000
--- a/core/src/com/cloud/storage/VMTemplateVO.java
+++ /dev/null
@@ -1,534 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.util.Date;
-import java.util.Map;
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.TableGenerator;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Transient;
-
-import org.apache.cloudstack.engine.subsystem.api.storage.TemplateState;
-
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.storage.Storage.ImageFormat;
-import com.cloud.storage.Storage.TemplateType;
-import com.cloud.template.VirtualMachineTemplate;
-import com.cloud.utils.db.GenericDao;
-import com.cloud.utils.fsm.StateObject;
-
-@Entity
-@Table(name="vm_template")
-public class VMTemplateVO implements VirtualMachineTemplate, StateObject<TemplateState> {
-    @Id
-    @TableGenerator(name="vm_template_sq", table="sequence", pkColumnName="name", valueColumnName="value", pkColumnValue="vm_template_seq", allocationSize=1)
-    @Column(name="id", nullable = false)
-    private long id;
-
-    @Column(name="format")
-    private Storage.ImageFormat format;
-
-    @Column(name="unique_name")
-    private String uniqueName;
-
-    @Column(name="name")
-    private String name = null;
-
-    @Column(name="public")
-    private boolean publicTemplate = true;
-
-    @Column(name="featured")
-    private boolean featured;
-
-    @Column(name="type")
-    private Storage.TemplateType templateType;
-
-    @Column(name="url")
-    private String url = null;
-
-    @Column(name="hvm")
-    private boolean requiresHvm;
-
-    @Column(name="bits")
-    private int bits;
-
-    @Temporal(value=TemporalType.TIMESTAMP)
-    @Column(name=GenericDao.CREATED_COLUMN)
-    private Date created = null;
-
-    @Column(name=GenericDao.REMOVED)
-    @Temporal(TemporalType.TIMESTAMP)
-    private Date removed;
-
-    @Column(name="account_id")
-    private long accountId;
-
-    @Column(name="checksum")
-    private String checksum;
-
-    @Column(name="display_text", length=4096)
-    private String displayText;
-
-    @Column(name="enable_password")
-    private boolean enablePassword;
-
-    @Column(name="guest_os_id")
-    private long guestOSId;
-
-    @Column(name="bootable")
-    private boolean bootable = true;
-
-    @Column(name="prepopulate")
-    private boolean prepopulate = false;
-
-    @Column(name="cross_zones")
-    private boolean crossZones = false;
-
-    @Column(name="hypervisor_type")
-    @Enumerated(value=EnumType.STRING)
-    private HypervisorType hypervisorType;
-
-    @Column(name="extractable")
-    private boolean extractable = true;
-
-    @Column(name="source_template_id")
-    private Long sourceTemplateId;
-
-    @Column(name="template_tag")
-    private String templateTag;
-
-    @Column(name="uuid")
-    private String uuid;
-
-    @Column(name="sort_key")
-    private int sortKey;
-
-    @Column(name="enable_sshkey")
-    private boolean enableSshKey;
-    
-    @Column(name = "image_data_store_id")
-    private long imageDataStoreId;
-    
-    @Column(name = "size")
-    private Long size;
-    
-    @Column(name = "state")
-    private TemplateState state;
-    
-    @Column(name="update_count", updatable = true)
-    protected long updatedCount;
-    
-    @Column(name = "updated")
-    @Temporal(value = TemporalType.TIMESTAMP)
-    Date updated;
-
-    @Transient
-    Map details;
-
-    @Override
-    public String getUniqueName() {
-        return uniqueName;
-    }
-
-    public void setUniqueName(String uniqueName) {
-        this.uniqueName = uniqueName;
-    }
-
-    public VMTemplateVO() {
-    	this.uuid = UUID.randomUUID().toString();
-    	this.state = TemplateState.Allocated;
-    }
-
-    /**
-     * Proper constructor for a new vm template.
-     */
-    public VMTemplateVO(long id, String name, ImageFormat format, boolean isPublic, boolean featured, boolean isExtractable, TemplateType type, String url, boolean requiresHvm, int bits, long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable, HypervisorType hyperType, Map details) {
-        this(id, generateUniqueName(id, accountId, name), name, format, isPublic, featured, isExtractable, type, url, null, requiresHvm, bits, accountId, cksum, displayText, enablePassword, guestOSId, bootable, hyperType, details);
-    	this.uuid = UUID.randomUUID().toString();
-    	this.state = TemplateState.Allocated;
-    }
-
-    public VMTemplateVO(long id, String name, ImageFormat format, boolean isPublic, boolean featured, boolean isExtractable, TemplateType type, String url, boolean requiresHvm, int bits, long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable, HypervisorType hyperType, String templateTag, Map details, boolean sshKeyEnabled) {
-        this(id, name, format, isPublic, featured, isExtractable, type, url, requiresHvm, bits, accountId, cksum, displayText, enablePassword, guestOSId, bootable, hyperType, details);
-        this.templateTag = templateTag;
-    	this.uuid = UUID.randomUUID().toString();
-    	this.state = TemplateState.Allocated;
-    	this.enableSshKey = sshKeyEnabled;
-    }
-
-    public VMTemplateVO(Long id, String uniqueName, String name, ImageFormat format, boolean isPublic, boolean featured, TemplateType type, String url, Date created, boolean requiresHvm, int bits, long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable, HypervisorType hyperType) {
-        this.id = id;
-        this.name = name;
-        this.publicTemplate = isPublic;
-        this.featured = featured;
-        this.templateType = type;
-        this.url = url;
-        this.requiresHvm = requiresHvm;
-        this.bits = bits;
-        this.accountId = accountId;
-        this.checksum = cksum;
-        this.uniqueName = uniqueName;
-        this.displayText = displayText;
-        this.enablePassword = enablePassword;
-        this.format = format;
-        this.created = created;
-        this.guestOSId = guestOSId;
-        this.bootable = bootable;
-        this.hypervisorType = hyperType;
-    	this.uuid = UUID.randomUUID().toString();
-    	this.state = TemplateState.Allocated;
-    }
-
-    // Has an extra attribute - isExtractable
-    public VMTemplateVO(Long id, String uniqueName, String name, ImageFormat format, boolean isPublic, boolean featured, boolean isExtractable, TemplateType type, String url, Date created, boolean requiresHvm, int bits, long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable, HypervisorType hyperType, Map details) {
-        this(id, uniqueName, name, format, isPublic, featured, type, url, created, requiresHvm, bits, accountId, cksum,  displayText, enablePassword, guestOSId, bootable, hyperType);
-        this.extractable = isExtractable;
-    	this.uuid = UUID.randomUUID().toString();
-    	this.details = details;
-    }
-
-    public VMTemplateVO(Long id, String uniqueName, String name, ImageFormat format, boolean isPublic, boolean featured, boolean isExtractable, TemplateType type, String url, Date created, boolean requiresHvm, int bits, long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable, HypervisorType hyperType, String templateTag, Map details) {
-        this(id, uniqueName, name, format, isPublic, featured, isExtractable, type, url, created, requiresHvm, bits, accountId, cksum,  displayText, enablePassword, guestOSId, bootable, hyperType, details);
-        this.templateTag = templateTag;
-    	this.uuid = UUID.randomUUID().toString();
-    }
-
-    @Override
-    public boolean getEnablePassword() {
-        return enablePassword;
-    }
-
-    @Override
-    public Storage.ImageFormat getFormat() {
-        return format;
-    }
-
-    public void setEnablePassword(boolean enablePassword) {
-        this.enablePassword = enablePassword;
-    }
-
-    public void setFormat(ImageFormat format) {
-        this.format = format;
-    }
-
-    private static String generateUniqueName(long id, long userId, String displayName) {
-        StringBuilder name = new StringBuilder();
-        name.append(id);
-        name.append("-");
-        name.append(userId);
-        name.append("-");
-        name.append(UUID.nameUUIDFromBytes((displayName + System.currentTimeMillis()).getBytes()).toString());
-        return name.toString();
-    }
-
-    @Override
-    public long getId() {
-        return id;
-    }
-
-    @Override
-    public TemplateType getTemplateType() {
-        return templateType;
-    }
-
-    public void setTemplateType(TemplateType type) {
-        this.templateType = type;
-    }
-
-    public boolean requiresHvm() {
-        return requiresHvm;
-    }
-
-    @Override
-    public int getBits() {
-        return bits;
-    }
-
-    public void setBits(int bits) {
-        this.bits = bits;
-    }
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public Date getRemoved() {
-        return removed;
-    }
-
-    @Override
-    public boolean isPublicTemplate() {
-        return publicTemplate;
-    }
-
-    public void setPublicTemplate(boolean publicTemplate) {
-        this.publicTemplate = publicTemplate;
-    }
-
-    @Override
-    public boolean isFeatured() {
-        return featured;
-    }
-
-    public void setFeatured(boolean featured) {
-        this.featured = featured;
-    }
-
-    @Override
-    public Date getCreated() {
-        return created;
-    }
-
-    @Override
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    @Override
-    public boolean isRequiresHvm() {
-        return requiresHvm;
-    }
-
-    public void setRequiresHvm(boolean value) {
-        requiresHvm = value;
-    }
-
-    @Override
-    public long getAccountId() {
-        return accountId;
-    }
-
-    @Override
-    public String getChecksum() {
-        return checksum;
-    }
-
-    public void setChecksum(String checksum) {
-        this.checksum = checksum;
-    }
-
-    @Override
-    public String getDisplayText() {
-        return displayText;
-    }
-
-    public void setDisplayText(String displayText) {
-        this.displayText = displayText;
-    }
-
-    @Override
-    public long getGuestOSId() {
-        return guestOSId;
-    }
-
-    public void setGuestOSId(long guestOSId) {
-        this.guestOSId = guestOSId;
-    }
-
-    @Override
-    public boolean isBootable() {
-        return bootable;
-    }
-
-    public void setBootable(boolean bootable) {
-        this.bootable = bootable;
-    }
-
-    public void setPrepopulate(boolean prepopulate) {
-        this.prepopulate = prepopulate;
-    }
-
-    public boolean isPrepopulate() {
-        return prepopulate;
-    }
-
-    public void setCrossZones(boolean crossZones) {
-        this.crossZones = crossZones;
-    }
-
-    @Override
-    public boolean isCrossZones() {
-        return crossZones;
-    }
-
-    @Override
-    public HypervisorType getHypervisorType() {
-        return hypervisorType;
-    }
-
-    public void setHypervisorType(HypervisorType hyperType) {
-        hypervisorType = hyperType;
-    }
-
-    @Override
-    public boolean isExtractable() {
-        return extractable;
-    }
-
-    public void setExtractable(boolean extractable) {
-        this.extractable = extractable;
-    }
-
-    @Override
-    public Long getSourceTemplateId() {
-        return sourceTemplateId;
-    }
-
-    public void setSourceTemplateId(Long sourceTemplateId) {
-        this.sourceTemplateId = sourceTemplateId;
-    }
-
-    @Override
-    public String getTemplateTag() {
-        return templateTag;
-    }
-
-    public void setTemplateTag(String templateTag) {
-        this.templateTag = templateTag;
-    }
-
-    @Override
-    public long getDomainId() {
-        return -1;
-    }
-
-    @Override
-    public String getUuid() {
-    	return this.uuid;
-    }
-
-    public void setUuid(String uuid) {
-    	this.uuid = uuid;
-    }
-
-    public Map getDetails() {
-    	return this.details;
-    }
-
-    public void setDetails(Map details) {
-    	this.details = details;
-    }
-
-    @Override
-    public boolean equals(Object that) {
-        if (this == that ) {
-            return true;
-        }
-        if (!(that instanceof VMTemplateVO)){
-            return false;
-        }
-        VMTemplateVO other = (VMTemplateVO)that;
-
-        return ((this.getUniqueName().equals(other.getUniqueName())));
-    }
-
-    @Override
-    public int hashCode() {
-        return uniqueName.hashCode();
-    }
-
-    @Transient
-    String toString;
-    @Override
-    public String toString() {
-        if (toString == null) {
-            toString = new StringBuilder("Tmpl[").append(id).append("-").append(format).append("-").append(uniqueName).toString();
-        }
-        return toString;
-    }
-
-    public void setRemoved(Date removed) {
-        this.removed = removed;
-    }
-
-    public void setSortKey(int key) {
-    	sortKey = key;
-    }
-
-    public int getSortKey() {
-    	return sortKey;
-    }
-
-	@Override
-	public boolean getEnableSshKey() {
-		return enableSshKey;
-	}
-
-	public void setEnableSshKey(boolean enable) {
-		enableSshKey = enable;
-	}
-	
-	 public Long getImageDataStoreId() {
-	        return this.imageDataStoreId;
-	    }
-
-	    public void setImageDataStoreId(long dataStoreId) {
-	        this.imageDataStoreId = dataStoreId;
-	    }
-	    
-	    public void setSize(Long size) {
-	        this.size = size;
-	    }
-	    
-	    public Long getSize() {
-	        return this.size;
-	    }
-	    
-	    public TemplateState getState() {
-	        return this.state;
-	    }
-	    
-	    public long getUpdatedCount() {
-	        return this.updatedCount;
-	    }
-	    
-	    public void incrUpdatedCount() {
-	        this.updatedCount++;
-	    }
-
-	    public void decrUpdatedCount() {
-	        this.updatedCount--;
-	    }
-	    
-	    public Date getUpdated() {
-	        return updated;
-	    }
-	    
-	    public void setUpdated(Date updated) {
-	        this.updated = updated;
-	    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/VMTemplateZoneVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/VMTemplateZoneVO.java b/core/src/com/cloud/storage/VMTemplateZoneVO.java
deleted file mode 100644
index 93a67b5..0000000
--- a/core/src/com/cloud/storage/VMTemplateZoneVO.java
+++ /dev/null
@@ -1,116 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import com.cloud.utils.db.GenericDao;
-import com.cloud.utils.db.GenericDaoBase;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="template_zone_ref")
-public class VMTemplateZoneVO implements InternalIdentity {
-	@Id
-	@GeneratedValue(strategy=GenerationType.IDENTITY)
-	Long id;
-	
-	@Column(name="zone_id")
-	private long zoneId;
-	
-	@Column(name="template_id")
-	private long templateId;
-	
-	@Column(name=GenericDaoBase.CREATED_COLUMN)
-	private Date created = null;
-	
-	@Column(name="last_updated")
-	@Temporal(value=TemporalType.TIMESTAMP)
-	private Date lastUpdated = null;
-    
-    @Temporal(value=TemporalType.TIMESTAMP)
-    @Column(name=GenericDao.REMOVED_COLUMN)
-    private Date removed;
-    
-    protected VMTemplateZoneVO() {
-    	
-    }
-
-	public VMTemplateZoneVO(long zoneId, long templateId, Date lastUpdated) {
-		this.zoneId = zoneId;
-		this.templateId = templateId;
-		this.lastUpdated = lastUpdated;
-	}
-
-	public long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public long getZoneId() {
-		return zoneId;
-	}
-
-	public void setZoneId(long zoneId) {
-		this.zoneId = zoneId;
-	}
-
-	public long getTemplateId() {
-		return templateId;
-	}
-
-	public void setTemplateId(long templateId) {
-		this.templateId = templateId;
-	}
-
-	public Date getCreated() {
-		return created;
-	}
-
-	public void setCreated(Date created) {
-		this.created = created;
-	}
-
-	public Date getLastUpdated() {
-		return lastUpdated;
-	}
-
-	public void setLastUpdated(Date lastUpdated) {
-		this.lastUpdated = lastUpdated;
-	}
-
-	public void setRemoved(Date removed) {
-		this.removed = removed;
-	}
-
-	public Date getRemoved() {
-		return removed;
-	}
-    
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/VolumeHostVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/VolumeHostVO.java b/core/src/com/cloud/storage/VolumeHostVO.java
deleted file mode 100755
index 40bae49..0000000
--- a/core/src/com/cloud/storage/VolumeHostVO.java
+++ /dev/null
@@ -1,347 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.storage;
-
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.cloudstack.api.InternalIdentity;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
-import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
-
-import com.cloud.storage.Storage.ImageFormat;
-import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
-import com.cloud.utils.db.GenericDaoBase;
-
-/**
- * Join table for storage hosts and volumes
- *
- */
-@Entity
-@Table(name="volume_host_ref")
-public class VolumeHostVO implements InternalIdentity, DataObjectInStore {
-	@Id
-	@GeneratedValue(strategy=GenerationType.IDENTITY)
-	Long id;
-	
-	@Column(name="host_id")
-	private long hostId;
-	
-	@Column(name="volume_id")
-	private long volumeId;
-	
-	@Column(name="zone_id")
-	private long zoneId;
-	
-	@Column(name=GenericDaoBase.CREATED_COLUMN)
-	private Date created = null;
-	
-	@Column(name="last_updated")
-	@Temporal(value=TemporalType.TIMESTAMP)
-	private Date lastUpdated = null;
-	
-	@Column (name="download_pct")
-	private int downloadPercent;
-	
-	@Column (name="size")
-	private long size;
-	
-	@Column (name="physical_size")
-	private long physicalSize;
-	
-	@Column (name="download_state")
-	@Enumerated(EnumType.STRING)
-	private Status downloadState;
-	
-    @Column(name="checksum")
-    private String checksum;
-	
-	@Column (name="local_path")
-	private String localDownloadPath;
-	
-	@Column (name="error_str")
-	private String errorString;
-	
-	@Column (name="job_id")
-	private String jobId;	
-	
-	@Column (name="install_path")
-    private String installPath;
-	
-	@Column (name="url")
-	private String downloadUrl;
-	
-	@Column(name="format")
-    private Storage.ImageFormat format;
-    
-    @Column(name="destroyed")
-    boolean destroyed = false;
-    
-    @Column(name="update_count", updatable = true, nullable=false)
-    protected long updatedCount;
-    
-    @Column(name = "updated")
-    @Temporal(value = TemporalType.TIMESTAMP)
-    Date updated;
-    
-    @Column(name = "state")
-    @Enumerated(EnumType.STRING)
-    ObjectInDataStoreStateMachine.State state;
-	
-    public String getInstallPath() {
-		return installPath;
-	}
-
-	public long getHostId() {
-		return hostId;
-	}
-
-	public void setHostId(long hostId) {
-		this.hostId = hostId;
-	}
-
-	
-    public long getVolumeId() {
-		return volumeId;
-	}
-
-	
-    public void setVolumeId(long volumeId) {
-		this.volumeId = volumeId;
-	}
-
-	
-    public long getZoneId() {
-		return zoneId;
-	}
-
-	public void setZoneId(long zoneId) {
-		this.zoneId = zoneId;
-	}
-
-	public int getDownloadPercent() {
-		return downloadPercent;
-	}
-
-	
-    public void setDownloadPercent(int downloadPercent) {
-		this.downloadPercent = downloadPercent;
-	}
-
-	
-    public void setDownloadState(Status downloadState) {
-		this.downloadState = downloadState;
-	}
-
-	
-    public long getId() {
-		return id;
-	}
-
-	
-    public Date getCreated() {
-		return created;
-	}
-
-	
-    public Date getLastUpdated() {
-		return lastUpdated;
-	}
-	
-	
-    public void setLastUpdated(Date date) {
-	    lastUpdated = date;
-	}
-	
-	
-    public void setInstallPath(String installPath) {
-	    this.installPath = installPath;
-	}
-
-	
-    public Status getDownloadState() {
-		return downloadState;
-	}
-
-	public String getChecksum() {
-		return checksum;
-	}
-
-	public void setChecksum(String checksum) {
-		this.checksum = checksum;
-	}
-
-	public VolumeHostVO(long hostId, long volumeId) {
-		super();
-		this.hostId = hostId;
-		this.volumeId = volumeId;
-		this.state = ObjectInDataStoreStateMachine.State.Allocated;
-	}
-
-	public VolumeHostVO(long hostId, long volumeId, long zoneId, Date lastUpdated,
-			int downloadPercent, Status downloadState,
-			String localDownloadPath, String errorString, String jobId,
-			String installPath, String downloadUrl, String checksum, ImageFormat format) {
-		//super();
-		this.hostId = hostId;
-		this.volumeId = volumeId;
-		this.zoneId = zoneId;
-		this.lastUpdated = lastUpdated;
-		this.downloadPercent = downloadPercent;
-		this.downloadState = downloadState;
-		this.localDownloadPath = localDownloadPath;
-		this.errorString = errorString;
-		this.jobId = jobId;
-		this.installPath = installPath;
-		this.setDownloadUrl(downloadUrl);
-		this.checksum = checksum;
-		this.format = format;
-	}
-
-	protected VolumeHostVO() {
-		
-	}
-
-	
-    public void setLocalDownloadPath(String localPath) {
-		this.localDownloadPath = localPath;
-	}
-
-	
-    public String getLocalDownloadPath() {
-		return localDownloadPath;
-	}
-
-	
-    public void setErrorString(String errorString) {
-		this.errorString = errorString;
-	}
-
-	
-    public String getErrorString() {
-		return errorString;
-	}
-
-	
-    public void setJobId(String jobId) {
-		this.jobId = jobId;
-	}
-
-	
-    public String getJobId() {
-		return jobId;
-	}
-
-	
-	public boolean equals(Object obj) {
-		if (obj instanceof VolumeHostVO) {
-			VolumeHostVO other = (VolumeHostVO)obj;
-			return (this.volumeId==other.getVolumeId() && this.hostId==other.getHostId());		   
-		}
-		return false;
-	}
-
-	
-	public int hashCode() {
-		Long tid = new Long(volumeId);
-		Long hid = new Long(hostId);
-		return tid.hashCode()+hid.hashCode();
-	}
-
-    public void setSize(long size) {
-        this.size = size;
-    }
-
-    public long getSize() {
-        return size;
-    }
-	
-    
-    public void setPhysicalSize(long physicalSize) {
-        this.physicalSize = physicalSize;
-    }
-
-    public long getPhysicalSize() {
-        return physicalSize;
-    }
-
-    public void setDestroyed(boolean destroyed) {
-    	this.destroyed = destroyed;
-    }
-
-    public boolean getDestroyed() {
-    	return destroyed;
-    }
-
-	public void setDownloadUrl(String downloadUrl) {
-		this.downloadUrl = downloadUrl;
-	}
-
-	public String getDownloadUrl() {
-		return downloadUrl;
-	}	
-	
-    public Storage.ImageFormat getFormat() {
-		return format;
-	}
-
-	public void setFormat(Storage.ImageFormat format) {
-		this.format = format;
-	}
-
-	public long getVolumeSize() {
-	    return -1;
-	}
-	
-	
-    public String toString() {
-	    return new StringBuilder("VolumeHost[").append(id).append("-").append(volumeId).append("-").append(hostId).append(installPath).append("]").toString();
-	}
-    
-    public long getUpdatedCount() {
-        return this.updatedCount;
-    }
-    
-    public void incrUpdatedCount() {
-        this.updatedCount++;
-    }
-
-    public void decrUpdatedCount() {
-        this.updatedCount--;
-    }
-    
-    public Date getUpdated() {
-        return updated;
-    }
-
-    @Override
-    public ObjectInDataStoreStateMachine.State getState() {
-        // TODO Auto-generated method stub
-        return this.state;
-    }
-
-}


Mime
View raw message