You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mu...@apache.org on 2013/05/13 17:53:45 UTC
[25/93] [abbrv] [partial] merge master
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/host/HostVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/host/HostVO.java b/core/src/com/cloud/host/HostVO.java
deleted file mode 100755
index c814b94..0000000
--- a/core/src/com/cloud/host/HostVO.java
+++ /dev/null
@@ -1,732 +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.host;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.DiscriminatorColumn;
-import javax.persistence.DiscriminatorType;
-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.Inheritance;
-import javax.persistence.InheritanceType;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Transient;
-
-import org.apache.cloudstack.api.Identity;
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.resource.ResourceState;
-import com.cloud.storage.Storage.StoragePoolType;
-import com.cloud.utils.NumbersUtil;
-import com.cloud.utils.db.GenericDao;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="host")
-@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
-@DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32)
-public class HostVO implements Host {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- private long id;
-
- @Column(name="disconnected")
- @Temporal(value=TemporalType.TIMESTAMP)
- private Date disconnectedOn;
-
- @Column(name="name", nullable=false)
- private String name = null;
-
- /**
- * Note: There is no setter for status because it has to be set in the dao code.
- */
- @Column(name="status", nullable=false)
- private Status status = null;
-
- @Column(name="type", updatable = true, nullable=false)
- @Enumerated(value=EnumType.STRING)
- private Type type;
-
- @Column(name="private_ip_address", nullable=false)
- private String privateIpAddress;
-
- @Column(name="private_mac_address", nullable=false)
- private String privateMacAddress;
-
- @Column(name="private_netmask", nullable=false)
- private String privateNetmask;
-
- @Column(name="public_netmask")
- private String publicNetmask;
-
- @Column(name="public_ip_address")
- private String publicIpAddress;
-
- @Column(name="public_mac_address")
- private String publicMacAddress;
-
- @Column(name="storage_ip_address")
- private String storageIpAddress;
-
- @Column(name="cluster_id")
- private Long clusterId;
-
- @Column(name="storage_netmask")
- private String storageNetmask;
-
- @Column(name="storage_mac_address")
- private String storageMacAddress;
-
- @Column(name="storage_ip_address_2")
- private String storageIpAddressDeux;
-
- @Column(name="storage_netmask_2")
- private String storageNetmaskDeux;
-
- @Column(name="storage_mac_address_2")
- private String storageMacAddressDeux;
-
- @Column(name="hypervisor_type", updatable = true, nullable=false)
- @Enumerated(value=EnumType.STRING)
- private HypervisorType hypervisorType;
-
- @Column(name="proxy_port")
- private Integer proxyPort;
-
- @Column(name="resource")
- private String resource;
-
- @Column(name="fs_type")
- private StoragePoolType fsType;
-
- @Column(name="available")
- private boolean available = true;
-
- @Column(name="setup")
- private boolean setup = false;
-
- @Column(name="resource_state", nullable=false)
- @Enumerated(value=EnumType.STRING)
- private ResourceState resourceState;
-
- @Column(name="hypervisor_version")
- private String hypervisorVersion;
-
- @Column(name="update_count", updatable = true, nullable=false)
- protected long updated; // This field should be updated everytime the state is updated. There's no set method in the vo object because it is done with in the dao code.
-
- @Column(name="uuid")
- private String uuid;
-
- // This is a delayed load value. If the value is null,
- // then this field has not been loaded yet.
- // Call host dao to load it.
- @Transient
- Map<String, String> details;
-
- // This is a delayed load value. If the value is null,
- // then this field has not been loaded yet.
- // Call host dao to load it.
- @Transient
- List<String> hostTags;
-
- @Override
- public String getStorageIpAddressDeux() {
- return storageIpAddressDeux;
- }
-
- public void setStorageIpAddressDeux(String deuxStorageIpAddress) {
- this.storageIpAddressDeux = deuxStorageIpAddress;
- }
-
- @Override
- public String getStorageNetmaskDeux() {
- return storageNetmaskDeux;
- }
-
- @Override
- public Long getClusterId() {
- return clusterId;
- }
-
- public void setClusterId(Long clusterId) {
- this.clusterId = clusterId;
- }
-
- public void setStorageNetmaskDeux(String deuxStorageNetmask) {
- this.storageNetmaskDeux = deuxStorageNetmask;
- }
-
- @Override
- public String getStorageMacAddressDeux() {
- return storageMacAddressDeux;
- }
-
- public void setStorageMacAddressDeux(String duexStorageMacAddress) {
- this.storageMacAddressDeux = duexStorageMacAddress;
- }
-
- @Override
- public String getPrivateMacAddress() {
- return privateMacAddress;
- }
-
- public void setPrivateMacAddress(String privateMacAddress) {
- this.privateMacAddress = privateMacAddress;
- }
-
- public boolean isAvailable() {
- return available;
- }
-
- public void setAvailable(boolean available) {
- this.available = available;
- }
-
- @Override
- public String getPrivateNetmask() {
- return privateNetmask;
- }
-
- public void setPrivateNetmask(String privateNetmask) {
- this.privateNetmask = privateNetmask;
- }
-
- @Override
- public String getPublicNetmask() {
- return publicNetmask;
- }
-
- public void setPublicNetmask(String publicNetmask) {
- this.publicNetmask = publicNetmask;
- }
-
- @Override
- public String getPublicIpAddress() {
- return publicIpAddress;
- }
-
- public void setPublicIpAddress(String publicIpAddress) {
- this.publicIpAddress = publicIpAddress;
- }
-
- @Override
- public String getPublicMacAddress() {
- return publicMacAddress;
- }
-
- public void setPublicMacAddress(String publicMacAddress) {
- this.publicMacAddress = publicMacAddress;
- }
-
- @Override
- public String getStorageIpAddress() {
- return storageIpAddress;
- }
-
- public void setStorageIpAddress(String storageIpAddress) {
- this.storageIpAddress = storageIpAddress;
- }
-
- @Override
- public String getStorageNetmask() {
- return storageNetmask;
- }
-
- public void setStorageNetmask(String storageNetmask) {
- this.storageNetmask = storageNetmask;
- }
-
- @Override
- public String getStorageMacAddress() {
- return storageMacAddress;
- }
-
- public boolean isSetup() {
- return setup;
- }
-
- public void setSetup(boolean setup) {
- this.setup = setup;
- }
-
- public void setStorageMacAddress(String storageMacAddress) {
- this.storageMacAddress = storageMacAddress;
- }
-
- public String getResource() {
- return resource;
- }
-
- public void setResource(String resource) {
- this.resource = resource;
- }
-
- public Map<String, String> getDetails() {
- return details;
- }
-
- public String getDetail(String name) {
- assert (details != null) : "Did you forget to load the details?";
-
- return details != null ? details.get(name) : null;
- }
-
- public void setDetail(String name, String value) {
- assert (details != null) : "Did you forget to load the details?";
-
- details.put(name, value);
- }
-
- public void setDetails(Map<String, String> details) {
- this.details = details;
- }
-
- public List<String> getHostTags() {
- return hostTags;
- }
-
- public void setHostTags(List<String> hostTags) {
- this.hostTags = hostTags;
- }
-
- @Column(name="data_center_id", nullable=false)
- private long dataCenterId;
-
- @Column(name="pod_id")
- private Long podId;
-
- @Column(name="cpus")
- private Integer cpus;
-
- @Column(name="url")
- private String storageUrl;
-
- @Column(name="speed")
- private Long speed;
-
- @Column(name="ram")
- private long totalMemory;
-
- @Column(name="parent", nullable=false)
- private String parent;
-
- @Column(name="guid", updatable=true, nullable=false)
- private String guid;
-
- @Column(name="capabilities")
- private String caps;
-
- @Column(name="total_size")
- private Long totalSize;
-
- @Column(name="last_ping")
- private long lastPinged;
-
- @Column(name="mgmt_server_id")
- private Long managementServerId;
-
- @Column(name="dom0_memory")
- private long dom0MinMemory;
-
- @Column(name="version")
- private String version;
-
- @Column(name=GenericDao.CREATED_COLUMN)
- private Date created;
-
- @Column(name=GenericDao.REMOVED_COLUMN)
- private Date removed;
-
- public HostVO(String guid) {
- this.guid = guid;
- this.status = Status.Creating;
- this.totalMemory = 0;
- this.dom0MinMemory = 0;
- this.resourceState = ResourceState.Creating;
- this.uuid = UUID.randomUUID().toString();
- }
-
- protected HostVO() {
- this.uuid = UUID.randomUUID().toString();
- }
-
- public HostVO(long id,
- String name,
- Type type,
- String privateIpAddress,
- String privateNetmask,
- String privateMacAddress,
- String publicIpAddress,
- String publicNetmask,
- String publicMacAddress,
- String storageIpAddress,
- String storageNetmask,
- String storageMacAddress,
- String deuxStorageIpAddress,
- String duxStorageNetmask,
- String deuxStorageMacAddress,
- String guid,
- Status status,
- String version,
- String iqn,
- Date disconnectedOn,
- long dcId,
- Long podId,
- long serverId,
- long ping,
- String parent,
- long totalSize,
- StoragePoolType fsType) {
- this(id, name, type, privateIpAddress, privateNetmask, privateMacAddress, publicIpAddress, publicNetmask, publicMacAddress, storageIpAddress, storageNetmask, storageMacAddress, guid, status, version, iqn, disconnectedOn, dcId, podId, serverId, ping, null, null, null, 0, null);
- this.parent = parent;
- this.totalSize = totalSize;
- this.fsType = fsType;
- this.uuid = UUID.randomUUID().toString();
- }
-
- public HostVO(long id,
- String name,
- Type type,
- String privateIpAddress,
- String privateNetmask,
- String privateMacAddress,
- String publicIpAddress,
- String publicNetmask,
- String publicMacAddress,
- String storageIpAddress,
- String storageNetmask,
- String storageMacAddress,
- String guid,
- Status status,
- String version,
- String url,
- Date disconnectedOn,
- long dcId,
- Long podId,
- long serverId,
- long ping,
- Integer cpus,
- Long speed,
- Long totalMemory,
- long dom0MinMemory,
- String caps) {
- this.id = id;
- this.name = name;
- this.status = status;
- this.type = type;
- this.privateIpAddress = privateIpAddress;
- this.privateNetmask = privateNetmask;
- this.privateMacAddress = privateMacAddress;
- this.publicIpAddress = publicIpAddress;
- this.publicNetmask = publicNetmask;
- this.publicMacAddress = publicMacAddress;
- this.storageIpAddress = storageIpAddress;
- this.storageNetmask = storageNetmask;
- this.storageMacAddress = storageMacAddress;
- this.dataCenterId = dcId;
- this.podId = podId;
- this.cpus = cpus;
- this.version = version;
- this.speed = speed;
- this.totalMemory = totalMemory != null ? totalMemory : 0;
- this.guid = guid;
- this.parent = null;
- this.totalSize = null;
- this.fsType = null;
- this.managementServerId = serverId;
- this.lastPinged = ping;
- this.caps = caps;
- this.disconnectedOn = disconnectedOn;
- this.dom0MinMemory = dom0MinMemory;
- this.storageUrl = url;
- this.uuid = UUID.randomUUID().toString();
- }
-
- public void setPodId(Long podId) {
-
- this.podId = podId;
- }
-
- public void setDataCenterId(long dcId) {
- this.dataCenterId = dcId;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public void setStorageUrl(String url) {
- this.storageUrl = url;
- }
-
- public void setDisconnectedOn(Date disconnectedOn) {
- this.disconnectedOn = disconnectedOn;
- }
-
- public String getStorageUrl() {
- return storageUrl;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setPrivateIpAddress(String ipAddress) {
- this.privateIpAddress = ipAddress;
- }
-
- public void setCpus(Integer cpus) {
- this.cpus = cpus;
- }
-
- public void setSpeed(Long speed) {
- this.speed = speed;
- }
-
- public void setTotalMemory(long totalMemory) {
- this.totalMemory = totalMemory;
- }
-
- public void setParent(String parent) {
- this.parent = parent;
- }
-
- public void setCaps(String caps) {
- this.caps = caps;
- }
-
- public void setTotalSize(Long totalSize) {
- this.totalSize = totalSize;
- }
-
- public void setLastPinged(long lastPinged) {
- this.lastPinged = lastPinged;
- }
-
- public void setManagementServerId(Long managementServerId) {
- this.managementServerId = managementServerId;
- }
-
- @Override
- public long getLastPinged() {
- return lastPinged;
- }
-
- @Override
- public String getParent() {
- return parent;
- }
-
- @Override
- public long getTotalSize() {
- return totalSize;
- }
-
- @Override
- public String getCapabilities() {
- return caps;
- }
-
- @Override
- public Date getCreated() {
- return created;
- }
-
- @Override
- public Date getRemoved() {
- return removed;
- }
-
- @Override
- public String getVersion() {
- return version;
- }
-
- public void setType(Type type) {
- this.type = type;
- }
-
- @Override
- public long getId() {
- return id;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public Status getStatus() {
- return status;
- }
-
- @Override
- public long getDataCenterId() {
- return dataCenterId;
- }
-
- @Override
- public Long getPodId() {
- return podId;
- }
-
- @Override
- public Long getManagementServerId() {
- return managementServerId;
- }
-
- @Override
- public Date getDisconnectedOn() {
- return disconnectedOn;
- }
-
- @Override
- public String getPrivateIpAddress() {
- return privateIpAddress;
- }
-
- @Override
- public String getGuid() {
- return guid;
- }
-
- public void setGuid(String guid) {
- this.guid = guid;
- }
-
- @Override
- public Integer getCpus() {
- return cpus;
- }
-
- @Override
- public Long getSpeed() {
- return speed;
- }
-
- @Override
- public Long getTotalMemory() {
- return totalMemory;
- }
-
- @Override
- public Integer getProxyPort() {
- return proxyPort;
- }
-
- public void setProxyPort(Integer port) {
- proxyPort = port;
- }
-
- public StoragePoolType getFsType() {
- return fsType;
- }
-
- @Override
- public Type getType() {
- return type;
- }
-
- @Override
- public int hashCode() {
- return NumbersUtil.hash(id);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof HostVO) {
- return ((HostVO)obj).getId() == this.getId();
- } else {
- return false;
- }
- }
-
- @Override
- public String toString() {
- return new StringBuilder("Host[").append("-").append(id).append("-").append(type).append("]").toString();
- }
-
- public void setHypervisorType(HypervisorType hypervisorType) {
- this.hypervisorType = hypervisorType;
- }
-
- @Override
- public HypervisorType getHypervisorType() {
- return hypervisorType;
- }
-
- public void setHypervisorVersion(String hypervisorVersion) {
- this.hypervisorVersion = hypervisorVersion;
- }
-
- @Override
- public String getHypervisorVersion() {
- return hypervisorVersion;
- }
-
- @Override
- @Transient
- public Status getState() {
- return status;
- }
-
- @Override
- public ResourceState getResourceState() {
- return resourceState;
- }
-
- public void setResourceState(ResourceState state) {
- resourceState = state;
- }
-
- @Override
- public boolean isInMaintenanceStates() {
- return (getResourceState() == ResourceState.Maintenance || getResourceState() == ResourceState.ErrorInMaintenance
- || getResourceState() == ResourceState.PrepareForMaintenance);
- }
-
- public long getUpdated() {
- return updated;
- }
-
- public long incrUpdated() {
- updated++;
- return updated;
- }
-
- @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/hypervisor/HypervisorCapabilitiesVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java b/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java
deleted file mode 100644
index 6689066..0000000
--- a/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java
+++ /dev/null
@@ -1,212 +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.hypervisor;
-
-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 org.apache.cloudstack.api.Identity;
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.utils.NumbersUtil;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="hypervisor_capabilities")
-public class HypervisorCapabilitiesVO implements HypervisorCapabilities {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- private long id;
-
- @Column(name="hypervisor_type")
- @Enumerated(value=EnumType.STRING)
- private HypervisorType hypervisorType;
-
- @Column(name="hypervisor_version")
- private String hypervisorVersion;
-
- @Column(name="max_guests_limit")
- private Long maxGuestsLimit;
-
- @Column(name="security_group_enabled")
- private boolean securityGroupEnabled;
-
- @Column(name="uuid")
- private String uuid;
-
- @Column(name="max_data_volumes_limit")
- private Integer maxDataVolumesLimit;
-
- @Column(name="max_hosts_per_cluster")
- private Integer maxHostsPerCluster;
-
- @Column(name="vm_snapshot_enabled")
- private Boolean vmSnapshotEnabled;
-
- @Column(name="storage_motion_supported")
- private boolean storageMotionSupported;
-
- protected HypervisorCapabilitiesVO() {
- this.uuid = UUID.randomUUID().toString();
- }
-
- public HypervisorCapabilitiesVO(HypervisorType hypervisorType, String hypervisorVersion, Long maxGuestsLimit,
- boolean securityGroupEnabled, boolean storageMotionSupported) {
- this.hypervisorType = hypervisorType;
- this.hypervisorVersion = hypervisorVersion;
- this.maxGuestsLimit = maxGuestsLimit;
- this.securityGroupEnabled = securityGroupEnabled;
- this.storageMotionSupported = storageMotionSupported;
- this.uuid = UUID.randomUUID().toString();
- }
-
- /**
- * @param hypervisorType the hypervisorType to set
- */
- public void setHypervisorType(HypervisorType hypervisorType) {
- this.hypervisorType = hypervisorType;
- }
-
-
- /**
- * @return the hypervisorType
- */
- @Override
- public HypervisorType getHypervisorType() {
- return hypervisorType;
- }
-
- /**
- * @param hypervisorVersion the hypervisorVersion to set
- */
- public void setHypervisorVersion(String hypervisorVersion) {
- this.hypervisorVersion = hypervisorVersion;
- }
-
- /**
- * @return the hypervisorVersion
- */
- @Override
- public String getHypervisorVersion() {
- return hypervisorVersion;
- }
-
- public void setSecurityGroupEnabled(Boolean securityGroupEnabled) {
- this.securityGroupEnabled = securityGroupEnabled;
- }
-
- /**
- * @return the securityGroupSupport
- */
- @Override
- public boolean isSecurityGroupEnabled() {
- return securityGroupEnabled;
- }
-
- /**
- * @param maxGuests the maxGuests to set
- */
- public void setMaxGuestsLimit(Long maxGuestsLimit) {
- this.maxGuestsLimit = maxGuestsLimit;
- }
-
- /**
- * @return the maxGuests
- */
- @Override
- public Long getMaxGuestsLimit() {
- return maxGuestsLimit;
- }
-
- /**
- * @param storageMotionSupported
- */
- public void setStorageMotionSupported(boolean storageMotionSupported) {
- this.storageMotionSupported = storageMotionSupported;
- }
-
- /**
- * @return if storage motion is supported
- */
- @Override
- public boolean isStorageMotionSupported() {
- return storageMotionSupported;
- }
-
-
- public long getId() {
- return id;
- }
-
- @Override
- public int hashCode() {
- return NumbersUtil.hash(id);
- }
-
- @Override
- public String getUuid() {
- return this.uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-
- @Override
- public Integer getMaxDataVolumesLimit() {
- return maxDataVolumesLimit;
- }
-
- public void setMaxDataVolumesLimit(Integer maxDataVolumesLimit) {
- this.maxDataVolumesLimit = maxDataVolumesLimit;
- }
-
- @Override
- public Integer getMaxHostsPerCluster() {
- return maxHostsPerCluster;
- }
-
- public void setMaxHostsPerCluster(Integer maxHostsPerCluster) {
- this.maxHostsPerCluster = maxHostsPerCluster;
- }
-
- public Boolean getVmSnapshotEnabled() {
- return vmSnapshotEnabled;
- }
-
- public void setVmSnapshotEnabled(Boolean vmSnapshotEnabled) {
- this.vmSnapshotEnabled = vmSnapshotEnabled;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof HypervisorCapabilitiesVO) {
- return ((HypervisorCapabilitiesVO)obj).getId() == this.getId();
- } else {
- return false;
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/info/ConsoleProxyLoadInfo.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/info/ConsoleProxyLoadInfo.java b/core/src/com/cloud/info/ConsoleProxyLoadInfo.java
deleted file mode 100644
index a3ec3e3..0000000
--- a/core/src/com/cloud/info/ConsoleProxyLoadInfo.java
+++ /dev/null
@@ -1,48 +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.info;
-
-public class ConsoleProxyLoadInfo {
-
- private long id;
- private String name;
- private int count;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public int getCount() {
- return count;
- }
-
- public void setCount(int count) {
- this.count = count;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/info/RunningHostCountInfo.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/info/RunningHostCountInfo.java b/core/src/com/cloud/info/RunningHostCountInfo.java
deleted file mode 100644
index f77a4dc..0000000
--- a/core/src/com/cloud/info/RunningHostCountInfo.java
+++ /dev/null
@@ -1,48 +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.info;
-
-public class RunningHostCountInfo {
-
- private long dcId;
- private String hostType;
- private int count;
-
- public long getDcId() {
- return dcId;
- }
-
- public void setDcId(long dcId) {
- this.dcId = dcId;
- }
-
- public String getHostType() {
- return hostType;
- }
-
- public void setHostType(String hostType) {
- this.hostType = hostType;
- }
-
- public int getCount() {
- return count;
- }
-
- public void setCount(int count) {
- this.count = count;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/network/VpnUserVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/network/VpnUserVO.java b/core/src/com/cloud/network/VpnUserVO.java
deleted file mode 100644
index 5a8e531..0000000
--- a/core/src/com/cloud/network/VpnUserVO.java
+++ /dev/null
@@ -1,131 +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.network;
-
-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 org.apache.cloudstack.api.Identity;
-import com.cloud.utils.db.Encrypt;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name=("vpn_users"))
-public class VpnUserVO implements VpnUser {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- private long id;
-
- @Column(name="owner_id")
- private long accountId;
-
- @Column(name="domain_id")
- private long domainId;
-
- @Column(name="username")
- private String username;
-
- @Encrypt
- @Column(name="password")
- private String password;
-
- @Column(name="state")
- @Enumerated(value=EnumType.STRING)
- private State state;
-
- @Column(name="uuid")
- private String uuid;
-
- public VpnUserVO() {
- this.uuid = UUID.randomUUID().toString();
- }
-
- public VpnUserVO(long accountId, long domainId, String userName, String password) {
- this.accountId = accountId;
- this.domainId = domainId;
- this.username = userName;
- this.password = password;
- this.state = State.Add;
- this.uuid = UUID.randomUUID().toString();
- }
-
- @Override
- public long getId() {
- return id;
- }
-
- @Override
- public long getAccountId() {
- return accountId;
- }
-
- @Override
- public String getUsername() {
- return username;
- }
-
- public void setUsername(String userName) {
- this.username = userName;
- }
-
- @Override
- public String getPassword() {
- return password;
- }
-
- @Override
- public State getState() {
- return state;
- }
-
- public void setState(State state) {
- this.state = state;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- @Override
- public long getDomainId() {
- return domainId;
- }
-
-
- @Override
- public String toString() {
- return new StringBuilder("VpnUser[").append(id).append("-").append(username).append("-").append(accountId).append("]").toString();
- }
-
- @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/network/security/SecurityGroupRuleVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/network/security/SecurityGroupRuleVO.java b/core/src/com/cloud/network/security/SecurityGroupRuleVO.java
deleted file mode 100644
index f01b50f..0000000
--- a/core/src/com/cloud/network/security/SecurityGroupRuleVO.java
+++ /dev/null
@@ -1,167 +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.network.security;
-
-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 com.cloud.async.AsyncInstanceCreateStatus;
-import com.google.gson.annotations.Expose;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name = ("security_group_rule"))
-public class SecurityGroupRuleVO implements SecurityRule {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
- private long id;
-
- @Column(name = "security_group_id")
- private long securityGroupId;
-
- @Column(name = "start_port")
- private int startPort;
-
- @Column(name = "end_port")
- private int endPort;
-
- @Column(name = "type")
- private String type;
-
- @Column(name = "protocol")
- private String protocol;
-
- @Column(name = "allowed_network_id", nullable = true)
- private Long allowedNetworkId = null;
-
- @Column(name = "allowed_ip_cidr", nullable = true)
- private String allowedSourceIpCidr = null;
-
- @Expose
- @Column(name = "create_status", updatable = true, nullable = false)
- @Enumerated(value = EnumType.STRING)
- private AsyncInstanceCreateStatus createStatus;
-
- @Column(name = "uuid")
- private String uuid;
-
- public SecurityGroupRuleVO() {
- this.uuid = UUID.randomUUID().toString();
- }
-
- public SecurityGroupRuleVO(SecurityRuleType type,long securityGroupId, int fromPort, int toPort, String protocol, long allowedNetworkId ) {
- this.securityGroupId = securityGroupId;
- this.startPort = fromPort;
- this.endPort = toPort;
- this.protocol = protocol;
- this.allowedNetworkId = allowedNetworkId;
- this.uuid = UUID.randomUUID().toString();
- if (type == SecurityRuleType.IngressRule) {
- this.type = SecurityRuleType.IngressRule.getType();
- } else {
- this.type = SecurityRuleType.EgressRule.getType();
- }
- }
-
- public SecurityGroupRuleVO(SecurityRuleType type,long securityGroupId, int fromPort, int toPort, String protocol, String allowedIpCidr) {
- this.securityGroupId = securityGroupId;
- this.startPort = fromPort;
- this.endPort = toPort;
- this.protocol = protocol;
- this.allowedSourceIpCidr = allowedIpCidr;
- this.uuid = UUID.randomUUID().toString();
- if (type == SecurityRuleType.IngressRule) {
- this.type = SecurityRuleType.IngressRule.getType();
- } else {
- this.type = SecurityRuleType.EgressRule.getType();
- }
- }
-
- @Override
- public long getId() {
- return id;
- }
-
- @Override
- public String getType() {
- return type;
- }
-
- @Override
- public long getSecurityGroupId() {
- return securityGroupId;
- }
-
- public SecurityRuleType getRuleType() {
- if ("ingress".equalsIgnoreCase(this.type))
- return SecurityRuleType.IngressRule;
- else
- return SecurityRuleType.EgressRule;
- }
-
- @Override
- public int getStartPort() {
- return startPort;
- }
-
- @Override
- public int getEndPort() {
- return endPort;
- }
-
- @Override
- public String getProtocol() {
- return protocol;
- }
-
- @Override
- public AsyncInstanceCreateStatus getCreateStatus() {
- return createStatus;
- }
-
- public void setCreateStatus(AsyncInstanceCreateStatus createStatus) {
- this.createStatus = createStatus;
- }
-
- @Override
- public Long getAllowedNetworkId() {
- return allowedNetworkId;
- }
-
- @Override
- public String getAllowedSourceIpCidr() {
- return allowedSourceIpCidr;
- }
-
- @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/network/security/SecurityGroupRulesVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/network/security/SecurityGroupRulesVO.java b/core/src/com/cloud/network/security/SecurityGroupRulesVO.java
deleted file mode 100644
index 82060ef..0000000
--- a/core/src/com/cloud/network/security/SecurityGroupRulesVO.java
+++ /dev/null
@@ -1,156 +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.network.security;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.PrimaryKeyJoinColumn;
-import javax.persistence.SecondaryTable;
-import javax.persistence.Table;
-
-import com.cloud.network.security.SecurityRule.SecurityRuleType;
-import com.cloud.utils.db.JoinType;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name = ("security_group"))
-@JoinType(type = "left")
-@SecondaryTable(name = "security_group_rule", pkJoinColumns = { @PrimaryKeyJoinColumn(name = "id", referencedColumnName = "security_group_id") })
-public class SecurityGroupRulesVO implements SecurityGroupRules {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
- private long id;
-
- @Column(name = "name")
- private String name;
-
- @Column(name = "description")
- private String description;
-
- @Column(name = "domain_id")
- private Long domainId;
-
- @Column(name = "account_id")
- private Long accountId;
-
- @Column(name = "id", table = "security_group_rule", insertable = false, updatable = false)
- private Long ruleId;
-
- @Column(name = "start_port", table = "security_group_rule", insertable = false, updatable = false)
- private int startPort;
-
- @Column(name = "end_port", table = "security_group_rule", insertable = false, updatable = false)
- private int endPort;
-
- @Column(name = "protocol", table = "security_group_rule", insertable = false, updatable = false)
- private String protocol;
-
- @Column(name = "type", table = "security_group_rule", insertable = false, updatable = false)
- private String type;
-
- @Column(name = "allowed_network_id", table = "security_group_rule", insertable = false, updatable = false, nullable = true)
- private Long allowedNetworkId = null;
-
- @Column(name = "allowed_ip_cidr", table = "security_group_rule", insertable = false, updatable = false, nullable = true)
- private String allowedSourceIpCidr = null;
-
- public SecurityGroupRulesVO() {
- }
-
- public SecurityGroupRulesVO(long id, String name, String description, Long domainId, Long accountId, Long ruleId, int startPort, int endPort, String protocol, Long allowedNetworkId,
- String allowedSourceIpCidr) {
- this.id = id;
- this.name = name;
- this.description = description;
- this.domainId = domainId;
- this.accountId = accountId;
- this.ruleId = ruleId;
- this.startPort = startPort;
- this.endPort = endPort;
- this.protocol = protocol;
- this.allowedNetworkId = allowedNetworkId;
- this.allowedSourceIpCidr = allowedSourceIpCidr;
- }
-
- @Override
- public long getId() {
- return id;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String getDescription() {
- return description;
- }
-
- @Override
- public Long getDomainId() {
- return domainId;
- }
-
- @Override
- public Long getAccountId() {
- return accountId;
- }
-
- @Override
- public Long getRuleId() {
- return ruleId;
- }
-
- @Override
- public int getStartPort() {
- return startPort;
- }
-
- @Override
- public int getEndPort() {
- return endPort;
- }
-
- @Override
- public String getProtocol() {
- return protocol;
- }
-
- @Override
- public SecurityRuleType getRuleType() {
- if ("ingress".equalsIgnoreCase(this.type)) {
- return SecurityRuleType.IngressRule;
- } else {
- return SecurityRuleType.EgressRule;
- }
- }
-
- @Override
- public Long getAllowedNetworkId() {
- return allowedNetworkId;
- }
-
- @Override
- public String getAllowedSourceIpCidr() {
- return allowedSourceIpCidr;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/network/security/SecurityGroupVMMapVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/network/security/SecurityGroupVMMapVO.java b/core/src/com/cloud/network/security/SecurityGroupVMMapVO.java
deleted file mode 100644
index 75bde33..0000000
--- a/core/src/com/cloud/network/security/SecurityGroupVMMapVO.java
+++ /dev/null
@@ -1,89 +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.network.security;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.PrimaryKeyJoinColumn;
-import javax.persistence.SecondaryTable;
-import javax.persistence.SecondaryTables;
-import javax.persistence.Table;
-
-import com.cloud.vm.VirtualMachine.State;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name = ("security_group_vm_map"))
-@SecondaryTables({ @SecondaryTable(name = "nics", pkJoinColumns = { @PrimaryKeyJoinColumn(name = "instance_id", referencedColumnName = "instance_id") }),
- @SecondaryTable(name = "vm_instance", pkJoinColumns = { @PrimaryKeyJoinColumn(name = "instance_id", referencedColumnName = "id") }),
- @SecondaryTable(name = "security_group", pkJoinColumns = { @PrimaryKeyJoinColumn(name = "security_group_id", referencedColumnName = "id") }) })
-public class SecurityGroupVMMapVO implements InternalIdentity {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
- private Long id;
-
- @Column(name = "security_group_id")
- private long securityGroupId;
-
- @Column(name = "instance_id")
- private long instanceId;
-
- @Column(name = "ip4_address", table = "nics", insertable = false, updatable = false)
- private String guestIpAddress;
-
- @Column(name = "state", table = "vm_instance", insertable = false, updatable = false)
- private State vmState;
-
- @Column(name = "name", table = "security_group", insertable = false, updatable = false)
- private String groupName;
-
- public SecurityGroupVMMapVO() {
- }
-
- public SecurityGroupVMMapVO(long securityGroupId, long instanceId) {
- this.securityGroupId = securityGroupId;
- this.instanceId = instanceId;
- }
-
- public long getId() {
- return id;
- }
-
- public long getSecurityGroupId() {
- return securityGroupId;
- }
-
- public String getGuestIpAddress() {
- return guestIpAddress;
- }
-
- public long getInstanceId() {
- return instanceId;
- }
-
- public State getVmState() {
- return vmState;
- }
-
- public String getGroupName() {
- return groupName;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/network/security/SecurityGroupVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/network/security/SecurityGroupVO.java b/core/src/com/cloud/network/security/SecurityGroupVO.java
deleted file mode 100644
index be7c593..0000000
--- a/core/src/com/cloud/network/security/SecurityGroupVO.java
+++ /dev/null
@@ -1,99 +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.network.security;
-
-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 org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name = ("security_group"))
-public class SecurityGroupVO implements SecurityGroup {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
- private long id;
-
- @Column(name = "name")
- private String name;
-
- @Column(name = "description")
- private String description;
-
- @Column(name = "domain_id")
- private long domainId;
-
- @Column(name = "account_id")
- private long accountId;
-
- @Column(name = "uuid")
- private String uuid;
-
- public SecurityGroupVO() {
- this.uuid = UUID.randomUUID().toString();
- }
-
- public SecurityGroupVO(String name, String description, long domainId, long accountId) {
- this.name = name;
- this.description = description;
- this.domainId = domainId;
- this.accountId = accountId;
- this.uuid = UUID.randomUUID().toString();
- }
-
- @Override
- public long getId() {
- return id;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String getDescription() {
- return description;
- }
-
- @Override
- public long getDomainId() {
- return domainId;
- }
-
- @Override
- public long getAccountId() {
- return accountId;
- }
-
- @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/network/security/SecurityGroupWork.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/network/security/SecurityGroupWork.java b/core/src/com/cloud/network/security/SecurityGroupWork.java
deleted file mode 100644
index e50f3eb..0000000
--- a/core/src/com/cloud/network/security/SecurityGroupWork.java
+++ /dev/null
@@ -1,40 +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.network.security;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-/**
- * Work related to security groups for a vm
- *
- */
-public interface SecurityGroupWork {
-
- public enum Step {
- Scheduled,
- Processing,
- Done,
- Error
- }
-
- Long getInstanceId();
- Long getLogsequenceNumber();
- Step getStep();
- void setStep(Step step);
- public abstract void setLogsequenceNumber(Long logsequenceNumber);
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/network/security/SecurityGroupWorkVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/network/security/SecurityGroupWorkVO.java b/core/src/com/cloud/network/security/SecurityGroupWorkVO.java
deleted file mode 100644
index 33d30fb..0000000
--- a/core/src/com/cloud/network/security/SecurityGroupWorkVO.java
+++ /dev/null
@@ -1,135 +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.network.security;
-
-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 com.cloud.utils.db.GenericDao;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="op_nwgrp_work")
-public class SecurityGroupWorkVO implements SecurityGroupWork, InternalIdentity {
-
-
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- private Long id;
-
- @Column(name="instance_id", updatable=false, nullable=false)
- private Long instanceId; // vm_instance id
-
-
- @Column(name="mgmt_server_id", nullable=true)
- private Long serverId;
-
- @Column(name=GenericDao.CREATED_COLUMN)
- private Date created;
-
-
- @Column(name="step", nullable = false)
- @Enumerated(value=EnumType.STRING)
- private Step step;
-
- @Column(name="taken", nullable=true)
- @Temporal(value=TemporalType.TIMESTAMP)
- private Date dateTaken;
-
- @Column(name="seq_no", nullable=true)
- private Long logsequenceNumber = null;
-
-
- protected SecurityGroupWorkVO() {
- }
-
- public long getId() {
- return id;
- }
-
- public Long getInstanceId() {
- return instanceId;
- }
-
-
- public Long getServerId() {
- return serverId;
- }
-
-
- public void setServerId(final Long serverId) {
- this.serverId = serverId;
- }
-
- public Date getCreated() {
- return created;
- }
-
-
-
- public SecurityGroupWorkVO(Long instanceId, Long serverId, Date created,
- Step step, Date dateTaken) {
- super();
- this.instanceId = instanceId;
- this.serverId = serverId;
- this.created = created;
- this.step = step;
- this.dateTaken = dateTaken;
- }
-
- @Override
- public String toString() {
- return new StringBuilder("[NWGrp-Work:id=").append(id).append(":vm=").append(instanceId).append("]").toString();
- }
-
- public Date getDateTaken() {
- return dateTaken;
- }
-
- public void setStep(Step step) {
- this.step = step;
- }
-
- public Step getStep() {
- return step;
- }
-
- public void setDateTaken(Date date) {
- dateTaken = date;
- }
-
- public Long getLogsequenceNumber() {
- return logsequenceNumber;
- }
-
- @Override
- public void setLogsequenceNumber(Long logsequenceNumber) {
- this.logsequenceNumber = logsequenceNumber;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/network/security/VmRulesetLogVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/network/security/VmRulesetLogVO.java b/core/src/com/cloud/network/security/VmRulesetLogVO.java
deleted file mode 100644
index 2090ce3..0000000
--- a/core/src/com/cloud/network/security/VmRulesetLogVO.java
+++ /dev/null
@@ -1,81 +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.network.security;
-
-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.GenericDao;
-import org.apache.cloudstack.api.InternalIdentity;
-
-/**
- * Records the intent to update a VM's ingress ruleset
- *
- */
-@Entity
-@Table(name="op_vm_ruleset_log")
-public class VmRulesetLogVO implements InternalIdentity {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- private Long id;
-
- @Column(name="instance_id", updatable=false, nullable=false)
- private Long instanceId; // vm_instance id
-
- @Column(name=GenericDao.CREATED_COLUMN)
- private Date created;
-
- @Column(name="logsequence")
- long logsequence;
-
- protected VmRulesetLogVO() {
-
- }
-
- public VmRulesetLogVO(Long instanceId) {
- super();
- this.instanceId = instanceId;
- }
-
- public long getId() {
- return id;
- }
-
- public Long getInstanceId() {
- return instanceId;
- }
-
- public Date getCreated() {
- return created;
- }
-
- public long getLogsequence() {
- return logsequence;
- }
-
- public void incrLogsequence() {
- logsequence++;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/resource/ResourceListener.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/resource/ResourceListener.java b/core/src/com/cloud/resource/ResourceListener.java
index 0efea12..17fba6c 100755
--- a/core/src/com/cloud/resource/ResourceListener.java
+++ b/core/src/com/cloud/resource/ResourceListener.java
@@ -20,7 +20,7 @@ import java.net.URI;
import java.util.List;
import java.util.Map;
-import com.cloud.host.HostVO;
+import com.cloud.host.Host;
public interface ResourceListener {
static final Integer EVENT_DISCOVER_BEFORE = 0x1;
@@ -33,9 +33,9 @@ public interface ResourceListener {
static final Integer EVENT_PREPARE_MAINTENANCE_AFTER = 0x1 << 7;
static final Integer EVENT_ALL = (EVENT_DISCOVER_BEFORE | EVENT_DISCOVER_AFTER | EVENT_DELETE_HOST_BEFORE | EVENT_DELETE_HOST_AFTER
| EVENT_CANCEL_MAINTENANCE_BEFORE | EVENT_CANCEL_MAINTENANCE_AFTER | EVENT_PREPARE_MAINTENANCE_BEFORE | EVENT_PREPARE_MAINTENANCE_AFTER);
-
+
/**
- *
+ *
* @param dcid
* @param podId
* @param clusterId
@@ -43,63 +43,63 @@ public interface ResourceListener {
* @param username
* @param password
* @param hostTags
- *
+ *
* Called before Discover.find()
*/
void processDiscoverEventBefore(Long dcid, Long podId, Long clusterId, URI uri, String username, String password, List<String> hostTags);
/**
- *
+ *
* @param resources
- *
+ *
* Called after Discover.find()
*/
void processDiscoverEventAfter(Map<? extends ServerResource, Map<String, String>> resources);
/**
- *
+ *
* @param host
- *
+ *
* Called before host delete
*/
- void processDeleteHostEventBefore(HostVO host);
+ void processDeleteHostEventBefore(Host host);
/**
- *
+ *
* @param host
- *
+ *
* Called after host delete. NOTE param host includes stale data which has been removed from database
*/
- void processDeletHostEventAfter(HostVO host);
+ void processDeletHostEventAfter(Host host);
/**
- *
+ *
* @param hostId
- *
+ *
* Called before AgentManager.cancelMaintenance
*/
void processCancelMaintenaceEventBefore(Long hostId);
/**
- *
+ *
* @param hostId
- *
+ *
* Called after AgentManager.cancelMaintenance
*/
void processCancelMaintenaceEventAfter(Long hostId);
/**
- *
+ *
* @param hostId
- *
+ *
* Called before AgentManager.main
*/
void processPrepareMaintenaceEventBefore(Long hostId);
/**
- *
+ *
* @param hostId
- *
+ *
* Called after AgentManager.main
*/
void processPrepareMaintenaceEventAfter(Long hostId);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/resource/UnableDeleteHostException.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/resource/UnableDeleteHostException.java b/core/src/com/cloud/resource/UnableDeleteHostException.java
deleted file mode 100755
index 154147c..0000000
--- a/core/src/com/cloud/resource/UnableDeleteHostException.java
+++ /dev/null
@@ -1,28 +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.resource;
-
-import com.cloud.utils.SerialVersionUID;
-import com.cloud.exception.CloudException;
-
-public class UnableDeleteHostException extends CloudException {
- private static final long serialVersionUID = SerialVersionUID.UnableDeleteHostException;
-
- public UnableDeleteHostException(String msg) {
- super(msg);
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/DiskOfferingVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/DiskOfferingVO.java b/core/src/com/cloud/storage/DiskOfferingVO.java
deleted file mode 100755
index 909d7fe..0000000
--- a/core/src/com/cloud/storage/DiskOfferingVO.java
+++ /dev/null
@@ -1,330 +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.List;
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.DiscriminatorColumn;
-import javax.persistence.DiscriminatorType;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Inheritance;
-import javax.persistence.InheritanceType;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Transient;
-
-import org.apache.cloudstack.api.Identity;
-import com.cloud.offering.DiskOffering;
-import com.cloud.utils.db.GenericDao;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="disk_offering")
-@Inheritance(strategy=InheritanceType.JOINED)
-@DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32)
-public class DiskOfferingVO implements DiskOffering {
- public enum Type {
- Disk,
- Service
- };
-
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- long id;
-
- @Column(name="domain_id")
- Long domainId;
-
- @Column(name="unique_name")
- private String uniqueName;
-
- @Column(name="name")
- private String name = null;
-
- @Column(name="display_text", length=4096)
- private String displayText = null;
-
- @Column(name="disk_size")
- long diskSize;
-
- @Column(name="tags", length=4096)
- String tags;
-
- @Column(name="type")
- Type type;
-
- @Column(name=GenericDao.REMOVED)
- @Temporal(TemporalType.TIMESTAMP)
- private Date removed;
-
- @Column(name=GenericDao.CREATED_COLUMN)
- private Date created;
-
- @Column(name="recreatable")
- private boolean recreatable;
-
- @Column(name="use_local_storage")
- private boolean useLocalStorage;
-
- @Column(name="system_use")
- private boolean systemUse;
-
- @Column(name="customized")
- private boolean customized;
-
- @Column(name="uuid")
- private String uuid;
-
- @Column(name="sort_key")
- int sortKey;
-
- @Column(name="display_offering")
- boolean displayOffering;
-
- public DiskOfferingVO() {
- this.uuid = UUID.randomUUID().toString();
- }
-
- public DiskOfferingVO(Long domainId, String name, String displayText, long diskSize, String tags, boolean isCustomized) {
- this.domainId = domainId;
- this.name = name;
- this.displayText = displayText;
- this.diskSize = diskSize;
- this.tags = tags;
- this.recreatable = false;
- this.type = Type.Disk;
- this.useLocalStorage = false;
- this.customized = isCustomized;
- this.uuid = UUID.randomUUID().toString();
- }
-
- public DiskOfferingVO(String name, String displayText, boolean mirrored, String tags, boolean recreatable, boolean useLocalStorage, boolean systemUse, boolean customized) {
- this.domainId = null;
- this.type = Type.Service;
- this.name = name;
- this.displayText = displayText;
- this.tags = tags;
- this.recreatable = recreatable;
- this.useLocalStorage = useLocalStorage;
- this.systemUse = systemUse;
- this.customized = customized;
- this.uuid = UUID.randomUUID().toString();
- }
-
- //domain specific offerings constructor (null domainId implies public offering)
- public DiskOfferingVO(String name, String displayText, boolean mirrored, String tags, boolean recreatable, boolean useLocalStorage, boolean systemUse, boolean customized, Long domainId) {
- this.type = Type.Service;
- this.name = name;
- this.displayText = displayText;
- this.tags = tags;
- this.recreatable = recreatable;
- this.useLocalStorage = useLocalStorage;
- this.systemUse = systemUse;
- this.customized = customized;
- this.domainId = domainId;
- this.uuid = UUID.randomUUID().toString();
- }
-
- @Override
- public long getId() {
- return id;
- }
-
- @Override
- public boolean isCustomized() {
- return customized;
- }
-
- public void setCustomized(boolean customized) {
- this.customized = customized;
- }
-
- @Override
- public String getUniqueName() {
- return uniqueName;
- }
-
- @Override
- public boolean getUseLocalStorage() {
- return useLocalStorage;
- }
-
- @Override
- public Long getDomainId() {
- return domainId;
- }
-
- public Type getType() {
- return type;
- }
-
- public boolean isRecreatable() {
- return recreatable;
- }
-
- public void setDomainId(Long domainId) {
- this.domainId = domainId;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
-
- @Override
- public boolean getSystemUse() {
- return systemUse;
- }
-
- public void setSystemUse(boolean systemUse) {
- this.systemUse = systemUse;
- }
-
- @Override
- public String getDisplayText() {
- return displayText;
- }
- public void setDisplayText(String displayText) {
- this.displayText = displayText;
- }
-
- @Override
- public long getDiskSize(){
- return diskSize;
- }
-
- @Override
- public void setDiskSize(long diskSize) {
- this.diskSize = diskSize;
- }
-
- public Date getRemoved() {
- return removed;
- }
-
- @Override
- public Date getCreated() {
- return created;
- }
-
- protected void setTags(String tags) {
- this.tags = tags;
- }
-
- @Override
- public String getTags() {
- return tags;
- }
-
- public void setUniqueName(String name) {
- this.uniqueName = name;
- }
-
- @Override
- @Transient
- public String[] getTagsArray() {
- String tags = getTags();
- if (tags == null || tags.isEmpty()) {
- return new String[0];
- }
-
- return tags.split(",");
- }
-
- @Transient
- public boolean containsTag(String... tags) {
- if (this.tags == null) {
- return false;
- }
-
- for (String tag : tags) {
- if (!this.tags.matches(tag)) {
- return false;
- }
- }
-
- return true;
- }
-
- @Transient
- public void setTagsArray(List<String> newTags) {
- if (newTags.isEmpty()) {
- setTags(null);
- return;
- }
-
- StringBuilder buf = new StringBuilder();
- for (String tag : newTags) {
- buf.append(tag).append(",");
- }
-
- buf.delete(buf.length() - 1, buf.length());
-
- setTags(buf.toString());
- }
-
- public void setUseLocalStorage(boolean useLocalStorage) {
- this.useLocalStorage = useLocalStorage;
- }
-
- public void setRemoved(Date removed) {
- this.removed = removed;
- }
-
- @Override
- public String getUuid() {
- return this.uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-
- public void setSortKey(int key) {
- sortKey = key;
- }
-
- public int getSortKey() {
- return sortKey;
- }
-
- public void setRecreatable(boolean recreatable) {
- this.recreatable = recreatable;
- }
-
-
- public boolean getDisplayOffering() {
- return displayOffering;
- }
-
- public void setDisplayOffering(boolean displayOffering) {
- this.displayOffering = displayOffering;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/GuestOSCategoryVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/GuestOSCategoryVO.java b/core/src/com/cloud/storage/GuestOSCategoryVO.java
deleted file mode 100644
index 03a7479..0000000
--- a/core/src/com/cloud/storage/GuestOSCategoryVO.java
+++ /dev/null
@@ -1,68 +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 org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="guest_os_category")
-public class GuestOSCategoryVO implements GuestOsCategory {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- long id;
-
- @Column(name="name")
- String name;
-
- @Column(name="uuid")
- String uuid = UUID.randomUUID().toString();
-
- @Override
- public long getId() {
- return id;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public void setName(String name) {
- this.name = name;
- }
-
- @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/GuestOSVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/GuestOSVO.java b/core/src/com/cloud/storage/GuestOSVO.java
deleted file mode 100644
index 49e136d..0000000
--- a/core/src/com/cloud/storage/GuestOSVO.java
+++ /dev/null
@@ -1,90 +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 org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="guest_os")
-public class GuestOSVO implements GuestOS {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- long id;
-
- @Column(name="category_id")
- private long categoryId;
-
- @Column(name="name")
- String name;
-
- @Column(name="display_name")
- String displayName;
-
- @Column(name="uuid")
- String uuid = UUID.randomUUID().toString();
-
- @Override
- public long getId() {
- return id;
- }
-
- public long getCategoryId() {
- return categoryId;
- }
-
- public void setCategoryId(long categoryId) {
- this.categoryId = categoryId;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public String getDisplayName() {
- return displayName;
- }
-
- public void setDisplayName(String displayName) {
- this.displayName = displayName;
- }
-
- @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/LaunchPermissionVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/LaunchPermissionVO.java b/core/src/com/cloud/storage/LaunchPermissionVO.java
deleted file mode 100644
index 992bac2..0000000
--- a/core/src/com/cloud/storage/LaunchPermissionVO.java
+++ /dev/null
@@ -1,57 +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.Id;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="launch_permission")
-public class LaunchPermissionVO implements InternalIdentity {
- @Id
- @Column(name="id")
- private Long id;
-
- @Column(name="template_id")
- private long templateId;
-
- @Column(name="account_id")
- private long accountId;
-
- public LaunchPermissionVO() { }
-
- public LaunchPermissionVO(long templateId, long accountId) {
- this.templateId = templateId;
- this.accountId = accountId;
- }
-
- public long getId() {
- return id;
- }
-
- public long getTemplateId() {
- return templateId;
- }
-
- public long getAccountId() {
- return accountId;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/S3VO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/S3VO.java b/core/src/com/cloud/storage/S3VO.java
deleted file mode 100644
index ec49bc9..0000000
--- a/core/src/com/cloud/storage/S3VO.java
+++ /dev/null
@@ -1,209 +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.agent.api.to.S3TO;
-import com.cloud.utils.db.GenericDao;
-import org.apache.cloudstack.api.Identity;
-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.util.Date;
-
-@Entity
-@Table(name = "s3")
-public class S3VO implements S3 {
-
- public static final String ID_COLUMN_NAME = "id";
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = ID_COLUMN_NAME)
- private long id;
-
- @Column(name = "uuid")
- private String uuid;
-
- @Column(name = "access_key")
- private String accessKey;
-
- @Column(name = "secret_key")
- private String secretKey;
-
- @Column(name = "end_point")
- private String endPoint;
-
- @Column(name = "bucket")
- private String bucketName;
-
- @Column(name = "https")
- private Integer httpsFlag;
-
- @Column(name = "connection_timeout")
- private Integer connectionTimeout;
-
- @Column(name = "max_error_retry")
- private Integer maxErrorRetry;
-
- @Column(name = "socket_timeout")
- private Integer socketTimeout;
-
- @Column(name = GenericDao.CREATED_COLUMN)
- private Date created;
-
- public S3VO() {
- super();
- }
-
- public S3VO(final String uuid, final String accessKey,
- final String secretKey, final String endPoint,
- final String bucketName, final Boolean httpsFlag,
- final Integer connectionTimeout, final Integer maxErrorRetry,
- final Integer socketTimeout, final Date created) {
-
- super();
-
- this.uuid = uuid;
- this.accessKey = accessKey;
- this.secretKey = secretKey;
- this.endPoint = endPoint;
- this.bucketName = bucketName;
-
- Integer value = null;
- if (httpsFlag != null) {
- value = httpsFlag == false ? 0 : 1;
- }
- this.httpsFlag = value;
-
- this.connectionTimeout = connectionTimeout;
- this.maxErrorRetry = maxErrorRetry;
- this.socketTimeout = socketTimeout;
- this.created = created;
-
- }
-
- @Override
- public S3TO toS3TO() {
-
- Boolean httpsFlag = null;
- if (this.httpsFlag != null) {
- httpsFlag = this.httpsFlag == 0 ? false : true;
- }
-
- return new S3TO(this.id, this.uuid, this.accessKey, this.secretKey,
- this.endPoint, this.bucketName, httpsFlag,
- this.connectionTimeout, this.maxErrorRetry, this.socketTimeout,
- this.created);
-
- }
-
- public long getId() {
- return this.id;
- }
-
- public void setId(final long id) {
- this.id = id;
- }
-
- public String getUuid() {
- return this.uuid;
- }
-
- public void setUuid(final String uuid) {
- this.uuid = uuid;
- }
-
- public String getAccessKey() {
- return this.accessKey;
- }
-
- public void setAccessKey(final String accessKey) {
- this.accessKey = accessKey;
- }
-
- public String getSecretKey() {
- return this.secretKey;
- }
-
- public void setSecretKey(final String secretKey) {
- this.secretKey = secretKey;
- }
-
- public String getEndPoint() {
- return this.endPoint;
- }
-
- public void setEndPoint(final String endPoint) {
- this.endPoint = endPoint;
- }
-
- public String getBucketName() {
- return this.bucketName;
- }
-
- public void setBucketName(final String bucketName) {
- this.bucketName = bucketName;
- }
-
- public Integer getHttpsFlag() {
- return this.httpsFlag;
- }
-
- public void setHttpsFlag(final Integer httpsFlag) {
- this.httpsFlag = httpsFlag;
- }
-
- public Integer getConnectionTimeout() {
- return this.connectionTimeout;
- }
-
- public void setConnectionTimeout(final int connectionTimeout) {
- this.connectionTimeout = connectionTimeout;
- }
-
- public Integer getMaxErrorRetry() {
- return this.maxErrorRetry;
- }
-
- public void setMaxErrorRetry(final int maxErrorRetry) {
- this.maxErrorRetry = maxErrorRetry;
- }
-
- public Integer getSocketTimeout() {
- return this.socketTimeout;
- }
-
- public void setSocketTimeout(final int socketTimeout) {
- this.socketTimeout = socketTimeout;
- }
-
- public Date getCreated() {
- return this.created;
- }
-
- public void setCreated(final Date created) {
- this.created = created;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/SecondaryStorage.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/SecondaryStorage.java b/core/src/com/cloud/storage/SecondaryStorage.java
deleted file mode 100644
index dc01642..0000000
--- a/core/src/com/cloud/storage/SecondaryStorage.java
+++ /dev/null
@@ -1,30 +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;
-
-public interface SecondaryStorage {
-
- String getBackupPath();
-
- String getTemplatePath();
-
- String getIsoPath();
-
- void createTemplate();
-
- void destroyTemplate();
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/core/src/com/cloud/storage/SecondaryStorageLayer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/SecondaryStorageLayer.java b/core/src/com/cloud/storage/SecondaryStorageLayer.java
deleted file mode 100644
index 539733d..0000000
--- a/core/src/com/cloud/storage/SecondaryStorageLayer.java
+++ /dev/null
@@ -1,39 +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 com.cloud.storage.Storage.ImageFormat;
-import com.cloud.utils.component.Adapter;
-
-public interface SecondaryStorageLayer extends Adapter {
-
- /**
- * Mounts a template
- *
- * @param poolId the pool to mount it to.
- * @param poolUuid the pool's uuid if it is needed.
- * @param name unique name to the template.
- * @param url url to access the template.
- * @param format format of the template.
- * @param accountId account id the template belongs to.
- * @return a String that unique identifies the reference the template once it is mounted.
- */
- String mountTemplate(long poolId, String poolUuid, String name, URI url, ImageFormat format, long accountId);
-
-}