diff --git a/api/src/com/cloud/alert/Alert.java b/api/src/com/cloud/alert/Alert.java index da75de8f458..defd15490e5 100644 --- a/api/src/com/cloud/alert/Alert.java +++ b/api/src/com/cloud/alert/Alert.java @@ -16,11 +16,12 @@ // under the License. package com.cloud.alert; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + import java.util.Date; -public interface Alert { - long getId(); - String getUuid(); +public interface Alert extends Identity, InternalIdentity { short getType(); String getSubject(); Long getPodId(); diff --git a/api/src/com/cloud/async/AsyncJob.java b/api/src/com/cloud/async/AsyncJob.java index 2fc70a60644..034c853e8f9 100644 --- a/api/src/com/cloud/async/AsyncJob.java +++ b/api/src/com/cloud/async/AsyncJob.java @@ -51,8 +51,6 @@ public interface AsyncJob extends Identity, InternalIdentity { AutoScaleVmGroup } - long getId(); - long getUserId(); long getAccountId(); diff --git a/api/src/com/cloud/capacity/Capacity.java b/api/src/com/cloud/capacity/Capacity.java index d698189bca6..c1c5d8fa9b2 100755 --- a/api/src/com/cloud/capacity/Capacity.java +++ b/api/src/com/cloud/capacity/Capacity.java @@ -16,7 +16,10 @@ // under the License. package com.cloud.capacity; -public interface Capacity { +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +public interface Capacity extends InternalIdentity, Identity { public static final short CAPACITY_TYPE_MEMORY = 0; public static final short CAPACITY_TYPE_CPU = 1; public static final short CAPACITY_TYPE_STORAGE = 2; @@ -28,8 +31,6 @@ public interface Capacity { public static final short CAPACITY_TYPE_DIRECT_ATTACHED_PUBLIC_IP = 8; public static final short CAPACITY_TYPE_LOCAL_STORAGE = 9; - public long getId(); - public Long getHostOrPoolId(); public Long getDataCenterId(); @@ -47,6 +48,4 @@ public interface Capacity { public long getReservedCapacity(); public Float getUsedPercentage(); - - } diff --git a/api/src/com/cloud/cluster/ManagementServerHost.java b/api/src/com/cloud/cluster/ManagementServerHost.java index 0273d472bea..9c88a2b2006 100644 --- a/api/src/com/cloud/cluster/ManagementServerHost.java +++ b/api/src/com/cloud/cluster/ManagementServerHost.java @@ -16,7 +16,9 @@ // under the License. package com.cloud.cluster; -public interface ManagementServerHost { +import org.apache.cloudstack.api.InternalIdentity; + +public interface ManagementServerHost extends InternalIdentity { public static enum State { Up, Starting, Down diff --git a/api/src/com/cloud/configuration/ResourceCount.java b/api/src/com/cloud/configuration/ResourceCount.java index 16c0c2eb484..f0b1d7190d5 100644 --- a/api/src/com/cloud/configuration/ResourceCount.java +++ b/api/src/com/cloud/configuration/ResourceCount.java @@ -20,8 +20,6 @@ import org.apache.cloudstack.api.InternalIdentity; public interface ResourceCount extends Resource, InternalIdentity { - public long getId(); - public long getCount(); public void setCount(long count); diff --git a/api/src/com/cloud/configuration/ResourceLimit.java b/api/src/com/cloud/configuration/ResourceLimit.java index d2d029a29bc..801feebbe10 100644 --- a/api/src/com/cloud/configuration/ResourceLimit.java +++ b/api/src/com/cloud/configuration/ResourceLimit.java @@ -20,8 +20,6 @@ import org.apache.cloudstack.api.InternalIdentity; public interface ResourceLimit extends Resource, InternalIdentity { - public long getId(); - public Long getMax(); public void setMax(Long max); diff --git a/api/src/com/cloud/dc/DataCenter.java b/api/src/com/cloud/dc/DataCenter.java index 617c6c1ceed..081cd55e162 100644 --- a/api/src/com/cloud/dc/DataCenter.java +++ b/api/src/com/cloud/dc/DataCenter.java @@ -19,20 +19,18 @@ package com.cloud.dc; import java.util.Map; import com.cloud.org.Grouping; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; /** * */ -public interface DataCenter extends Grouping { +public interface DataCenter extends Grouping, Identity, InternalIdentity { public enum NetworkType { Basic, Advanced, } - long getId(); - - String getUuid(); - String getDns1(); String getDns2(); diff --git a/api/src/com/cloud/dc/Pod.java b/api/src/com/cloud/dc/Pod.java index 0356f0f317c..8c893163730 100644 --- a/api/src/com/cloud/dc/Pod.java +++ b/api/src/com/cloud/dc/Pod.java @@ -17,19 +17,14 @@ package com.cloud.dc; import com.cloud.org.Grouping; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; /** * Represents one pod in the cloud stack. * */ -public interface Pod extends Grouping, InternalIdentity { - /** - * @return unique id mapped to the pod. - */ - long getId(); - - String getUuid(); +public interface Pod extends Grouping, Identity, InternalIdentity { String getCidrAddress(); @@ -39,8 +34,6 @@ public interface Pod extends Grouping, InternalIdentity { long getDataCenterId(); - // String getUniqueName(); - String getDescription(); String getName(); diff --git a/api/src/com/cloud/dc/StorageNetworkIpRange.java b/api/src/com/cloud/dc/StorageNetworkIpRange.java index 8786251468a..7f15d6197da 100755 --- a/api/src/com/cloud/dc/StorageNetworkIpRange.java +++ b/api/src/com/cloud/dc/StorageNetworkIpRange.java @@ -16,8 +16,10 @@ // under the License. package com.cloud.dc; -public interface StorageNetworkIpRange { - String getUuid(); +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +public interface StorageNetworkIpRange extends InternalIdentity, Identity { Integer getVlan(); diff --git a/api/src/com/cloud/dc/Vlan.java b/api/src/com/cloud/dc/Vlan.java index d4cfb4ef442..8d4ae3a9e1b 100644 --- a/api/src/com/cloud/dc/Vlan.java +++ b/api/src/com/cloud/dc/Vlan.java @@ -16,7 +16,10 @@ // under the License. package com.cloud.dc; -public interface Vlan { +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +public interface Vlan extends InternalIdentity, Identity { public enum VlanType { DirectAttached, VirtualNetwork @@ -24,10 +27,6 @@ public interface Vlan { public final static String UNTAGGED = "untagged"; - public long getId(); - - public String getUuid(); - public String getVlanTag(); public String getVlanGateway(); diff --git a/api/src/com/cloud/domain/Domain.java b/api/src/com/cloud/domain/Domain.java index 844974d1d1e..cfed519ada9 100644 --- a/api/src/com/cloud/domain/Domain.java +++ b/api/src/com/cloud/domain/Domain.java @@ -19,23 +19,20 @@ package com.cloud.domain; import java.util.Date; import com.cloud.user.OwnedBy; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; /** * Domain defines the Domain object. */ -public interface Domain extends OwnedBy, InternalIdentity { +public interface Domain extends OwnedBy, Identity, InternalIdentity { public static final long ROOT_DOMAIN = 1L; enum State { Active, Inactive }; - long getId(); - - String getUuid(); - Long getParent(); void setParent(Long parent); diff --git a/api/src/com/cloud/event/Event.java b/api/src/com/cloud/event/Event.java index 95c8b7f59eb..f869c472986 100644 --- a/api/src/com/cloud/event/Event.java +++ b/api/src/com/cloud/event/Event.java @@ -19,9 +19,10 @@ package com.cloud.event; import java.util.Date; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface Event extends ControlledEntity, InternalIdentity { +public interface Event extends ControlledEntity, Identity, InternalIdentity { public enum State { Created, Scheduled, @@ -29,16 +30,12 @@ public interface Event extends ControlledEntity, InternalIdentity { Completed; } - - long getId(); String getType(); State getState(); String getDescription(); Date getCreateDate(); long getUserId(); - long getAccountId(); - long getDomainId(); int getTotalSize(); String getLevel(); long getStartId(); diff --git a/api/src/com/cloud/host/Host.java b/api/src/com/cloud/host/Host.java index 2783cd9817d..bd26f81c8c2 100755 --- a/api/src/com/cloud/host/Host.java +++ b/api/src/com/cloud/host/Host.java @@ -21,12 +21,14 @@ import java.util.Date; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.resource.ResourceState; import com.cloud.utils.fsm.StateObject; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; /** * Host represents one particular host server. */ -public interface Host extends StateObject { +public interface Host extends StateObject, Identity, InternalIdentity { public enum Type { Storage(false), Routing(false), @@ -61,13 +63,6 @@ public interface Host extends StateObject { } } - /** - * @return id of the host. - */ - long getId(); - - String getUuid(); - /** * @return name of the machine. */ diff --git a/api/src/com/cloud/hypervisor/HypervisorCapabilities.java b/api/src/com/cloud/hypervisor/HypervisorCapabilities.java index e2fbc077a7a..efb8a6a208b 100644 --- a/api/src/com/cloud/hypervisor/HypervisorCapabilities.java +++ b/api/src/com/cloud/hypervisor/HypervisorCapabilities.java @@ -17,18 +17,14 @@ package com.cloud.hypervisor; import com.cloud.hypervisor.Hypervisor.HypervisorType; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; /** * HypervisorCapability represents one particular hypervisor version's capabilities. */ -public interface HypervisorCapabilities { - /** - * @return id of the host. - */ - long getId(); - - String getUuid(); +public interface HypervisorCapabilities extends Identity, InternalIdentity{ /** * @return type of hypervisor diff --git a/api/src/com/cloud/network/IpAddress.java b/api/src/com/cloud/network/IpAddress.java index 8433da2be3c..0d05efbc78c 100644 --- a/api/src/com/cloud/network/IpAddress.java +++ b/api/src/com/cloud/network/IpAddress.java @@ -20,6 +20,7 @@ import java.util.Date; import com.cloud.acl.ControlledEntity; import com.cloud.utils.net.Ip; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; /** @@ -33,7 +34,7 @@ import org.apache.cloudstack.api.InternalIdentity; * - DomainId = domain of the account owner. * - Allocated = time it was allocated. */ -public interface IpAddress extends ControlledEntity, InternalIdentity { +public interface IpAddress extends ControlledEntity, Identity, InternalIdentity { enum State { Allocating, // The IP Address is being propagated to other network elements and is not ready for use yet. Allocated, // The IP address is in used. @@ -68,13 +69,6 @@ public interface IpAddress extends ControlledEntity, InternalIdentity { public Long getPhysicalNetworkId(); - /** - * @return database id. - */ - long getId(); - - String getUuid(); - void setState(IpAddress.State state); Long getAllocatedToAccountId(); @@ -92,5 +86,4 @@ public interface IpAddress extends ControlledEntity, InternalIdentity { * @param vpcId */ void setVpcId(Long vpcId); - } diff --git a/api/src/com/cloud/network/Network.java b/api/src/com/cloud/network/Network.java index c10ab6a32f8..fdf11cb65bf 100644 --- a/api/src/com/cloud/network/Network.java +++ b/api/src/com/cloud/network/Network.java @@ -22,6 +22,7 @@ import com.cloud.network.Networks.Mode; import com.cloud.network.Networks.TrafficType; import com.cloud.utils.fsm.FiniteState; import com.cloud.utils.fsm.StateMachine; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; import java.net.URI; @@ -32,7 +33,7 @@ import java.util.Set; /** * owned by an account. */ -public interface Network extends ControlledEntity, InternalIdentity { +public interface Network extends ControlledEntity, InternalIdentity, Identity { public enum GuestType { Shared, @@ -252,13 +253,6 @@ public interface Network extends ControlledEntity, InternalIdentity { } } - /** - * @return id of the network profile. Null means the network profile is not from the database. - */ - long getId(); - - String getUuid(); - String getName(); Mode getMode(); diff --git a/api/src/com/cloud/network/NetworkProfile.java b/api/src/com/cloud/network/NetworkProfile.java index 3872a150dd2..b5c463de375 100644 --- a/api/src/com/cloud/network/NetworkProfile.java +++ b/api/src/com/cloud/network/NetworkProfile.java @@ -23,7 +23,7 @@ import com.cloud.network.Networks.Mode; import com.cloud.network.Networks.TrafficType; import org.apache.cloudstack.api.InternalIdentity; -public class NetworkProfile implements Network, InternalIdentity { +public class NetworkProfile implements Network { private long id; private String uuid; private long dataCenterId; diff --git a/api/src/com/cloud/network/PhysicalNetwork.java b/api/src/com/cloud/network/PhysicalNetwork.java index 48848279e9a..a495092879e 100644 --- a/api/src/com/cloud/network/PhysicalNetwork.java +++ b/api/src/com/cloud/network/PhysicalNetwork.java @@ -16,6 +16,7 @@ // under the License. package com.cloud.network; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; import java.util.List; @@ -23,7 +24,7 @@ import java.util.List; /** * */ -public interface PhysicalNetwork extends InternalIdentity { +public interface PhysicalNetwork extends Identity, InternalIdentity { public enum State { Disabled, @@ -42,8 +43,6 @@ public interface PhysicalNetwork extends InternalIdentity { ZONE; } - long getId(); - BroadcastDomainRange getBroadcastDomainRange(); // TrafficType getTrafficType(); @@ -62,8 +61,6 @@ public interface PhysicalNetwork extends InternalIdentity { String getSpeed(); - String getUuid(); - String getName(); } diff --git a/api/src/com/cloud/network/PhysicalNetworkTrafficType.java b/api/src/com/cloud/network/PhysicalNetworkTrafficType.java index 393b6a4c1cb..62400e80a9e 100644 --- a/api/src/com/cloud/network/PhysicalNetworkTrafficType.java +++ b/api/src/com/cloud/network/PhysicalNetworkTrafficType.java @@ -17,14 +17,13 @@ package com.cloud.network; import com.cloud.network.Networks.TrafficType; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; /** * */ -public interface PhysicalNetworkTrafficType extends InternalIdentity { - - long getId(); +public interface PhysicalNetworkTrafficType extends InternalIdentity, Identity { long getPhysicalNetworkId(); @@ -37,6 +36,4 @@ public interface PhysicalNetworkTrafficType extends InternalIdentity { String getVmwareNetworkLabel(); String getSimulatorNetworkLabel(); - - String getUuid(); } diff --git a/api/src/com/cloud/network/Site2SiteCustomerGateway.java b/api/src/com/cloud/network/Site2SiteCustomerGateway.java index 2bf4368ee45..1d7467ba266 100644 --- a/api/src/com/cloud/network/Site2SiteCustomerGateway.java +++ b/api/src/com/cloud/network/Site2SiteCustomerGateway.java @@ -19,11 +19,10 @@ package com.cloud.network; import java.util.Date; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface Site2SiteCustomerGateway extends ControlledEntity, InternalIdentity { - public long getId(); - public String getUuid(); +public interface Site2SiteCustomerGateway extends ControlledEntity, Identity, InternalIdentity { public String getGatewayIp(); public String getGuestCidrList(); public String getIpsecPsk(); diff --git a/api/src/com/cloud/network/Site2SiteVpnGateway.java b/api/src/com/cloud/network/Site2SiteVpnGateway.java index 5a20102dc32..feb3b94de0d 100644 --- a/api/src/com/cloud/network/Site2SiteVpnGateway.java +++ b/api/src/com/cloud/network/Site2SiteVpnGateway.java @@ -19,11 +19,10 @@ package com.cloud.network; import java.util.Date; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface Site2SiteVpnGateway extends ControlledEntity, InternalIdentity { - public long getId(); - public String getUuid(); +public interface Site2SiteVpnGateway extends ControlledEntity, Identity, InternalIdentity { public long getAddrId(); public long getVpcId(); public Date getRemoved(); diff --git a/api/src/com/cloud/network/VirtualRouterProvider.java b/api/src/com/cloud/network/VirtualRouterProvider.java index 034652d9d24..ed6a2741ba0 100644 --- a/api/src/com/cloud/network/VirtualRouterProvider.java +++ b/api/src/com/cloud/network/VirtualRouterProvider.java @@ -16,9 +16,10 @@ // under the License. package com.cloud.network; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface VirtualRouterProvider extends InternalIdentity { +public interface VirtualRouterProvider extends InternalIdentity, Identity { public enum VirtualRouterProviderType { VirtualRouter, ElasticLoadBalancerVm, @@ -27,10 +28,6 @@ public interface VirtualRouterProvider extends InternalIdentity { public VirtualRouterProviderType getType(); - public long getId(); - - public String getUuid(); - public boolean isEnabled(); public long getNspId(); diff --git a/api/src/com/cloud/network/VpnUser.java b/api/src/com/cloud/network/VpnUser.java index d0b65043576..61e6bf3f355 100644 --- a/api/src/com/cloud/network/VpnUser.java +++ b/api/src/com/cloud/network/VpnUser.java @@ -17,19 +17,16 @@ package com.cloud.network; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface VpnUser extends ControlledEntity, InternalIdentity { +public interface VpnUser extends ControlledEntity, InternalIdentity, Identity { enum State { Add, Revoke, Active } - long getId(); - - String getUuid(); - String getUsername(); String getPassword(); diff --git a/api/src/com/cloud/network/as/Condition.java b/api/src/com/cloud/network/as/Condition.java index 424299d3802..3d36a1086f0 100644 --- a/api/src/com/cloud/network/as/Condition.java +++ b/api/src/com/cloud/network/as/Condition.java @@ -18,9 +18,10 @@ package com.cloud.network.as; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface Condition extends ControlledEntity, InternalIdentity { +public interface Condition extends ControlledEntity, Identity, InternalIdentity { static enum Operator { EQ, GT, LT, GE, LE @@ -31,8 +32,4 @@ public interface Condition extends ControlledEntity, InternalIdentity { long getThreshold(); Operator getRelationalOperator(); - - String getUuid(); - - long getId(); } diff --git a/api/src/com/cloud/network/as/Counter.java b/api/src/com/cloud/network/as/Counter.java index d9e2e0a1e1f..207ec57b592 100644 --- a/api/src/com/cloud/network/as/Counter.java +++ b/api/src/com/cloud/network/as/Counter.java @@ -17,7 +17,10 @@ package com.cloud.network.as; -public interface Counter { +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +public interface Counter extends InternalIdentity, Identity { public static enum Source { netscaler, @@ -29,8 +32,4 @@ public interface Counter { String getValue(); Source getSource(); - - String getUuid(); - - long getId(); } diff --git a/api/src/com/cloud/network/lb/LoadBalancingRule.java b/api/src/com/cloud/network/lb/LoadBalancingRule.java index 3f37bdb628a..b68b9cbddd4 100644 --- a/api/src/com/cloud/network/lb/LoadBalancingRule.java +++ b/api/src/com/cloud/network/lb/LoadBalancingRule.java @@ -28,7 +28,7 @@ import com.cloud.network.rules.LoadBalancer; import com.cloud.utils.Pair; import org.apache.cloudstack.api.InternalIdentity; -public class LoadBalancingRule implements FirewallRule, LoadBalancer, InternalIdentity { +public class LoadBalancingRule implements FirewallRule, LoadBalancer { private LoadBalancer lb; private List destinations; private List stickinessPolicies; diff --git a/api/src/com/cloud/network/rules/FirewallRule.java b/api/src/com/cloud/network/rules/FirewallRule.java index 7f0c5eb6fe8..59f44681962 100644 --- a/api/src/com/cloud/network/rules/FirewallRule.java +++ b/api/src/com/cloud/network/rules/FirewallRule.java @@ -19,9 +19,10 @@ package com.cloud.network.rules; import java.util.List; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface FirewallRule extends ControlledEntity, InternalIdentity { +public interface FirewallRule extends ControlledEntity, Identity, InternalIdentity { enum Purpose { Firewall, PortForwarding, @@ -48,17 +49,6 @@ public interface FirewallRule extends ControlledEntity, InternalIdentity { Egress } - /** - * @return database id. - */ - long getId(); - - /** - * - * @return uuid - */ - String getUuid(); - /** * @return external id. */ diff --git a/api/src/com/cloud/network/rules/LoadBalancer.java b/api/src/com/cloud/network/rules/LoadBalancer.java index 9734e7e3cb6..ab6085aceb7 100644 --- a/api/src/com/cloud/network/rules/LoadBalancer.java +++ b/api/src/com/cloud/network/rules/LoadBalancer.java @@ -31,5 +31,4 @@ public interface LoadBalancer extends FirewallRule { String getAlgorithm(); - String getUuid(); } diff --git a/api/src/com/cloud/network/rules/StaticNatRule.java b/api/src/com/cloud/network/rules/StaticNatRule.java index af06ec14c46..839430a6b8c 100644 --- a/api/src/com/cloud/network/rules/StaticNatRule.java +++ b/api/src/com/cloud/network/rules/StaticNatRule.java @@ -16,32 +16,7 @@ // under the License. package com.cloud.network.rules; -import com.cloud.acl.ControlledEntity; -import org.apache.cloudstack.api.InternalIdentity; - -public interface StaticNatRule extends ControlledEntity, InternalIdentity, FirewallRule { - - long getId(); - - String getXid(); - - String getProtocol(); - - Integer getSourcePortStart(); - - Integer getSourcePortEnd(); - - Purpose getPurpose(); - - State getState(); - - long getAccountId(); - - long getDomainId(); - - long getNetworkId(); - - Long getSourceIpAddressId(); +public interface StaticNatRule extends FirewallRule { String getDestIpAddress(); -} +} \ No newline at end of file diff --git a/api/src/com/cloud/network/rules/StickinessPolicy.java b/api/src/com/cloud/network/rules/StickinessPolicy.java index 49c2e60c493..e23ff828f74 100644 --- a/api/src/com/cloud/network/rules/StickinessPolicy.java +++ b/api/src/com/cloud/network/rules/StickinessPolicy.java @@ -19,12 +19,12 @@ package com.cloud.network.rules; import java.util.List; import com.cloud.utils.Pair; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; /** */ -public interface StickinessPolicy { - - public long getId(); +public interface StickinessPolicy extends InternalIdentity, Identity { public long getLoadBalancerId(); @@ -38,5 +38,4 @@ public interface StickinessPolicy { public List> getParams(); /* get params in Map format */ - public String getUuid(); } diff --git a/api/src/com/cloud/network/security/SecurityGroup.java b/api/src/com/cloud/network/security/SecurityGroup.java index 9cf885b2aa8..b39ccc4904f 100644 --- a/api/src/com/cloud/network/security/SecurityGroup.java +++ b/api/src/com/cloud/network/security/SecurityGroup.java @@ -17,13 +17,11 @@ package com.cloud.network.security; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; //FIXME: Annotation @doc("") -public interface SecurityGroup extends ControlledEntity, InternalIdentity { - long getId(); - - String getUuid(); +public interface SecurityGroup extends ControlledEntity, InternalIdentity, Identity { String getName(); diff --git a/api/src/com/cloud/network/security/SecurityGroupRules.java b/api/src/com/cloud/network/security/SecurityGroupRules.java index 86c2acaae02..0b575e10d56 100644 --- a/api/src/com/cloud/network/security/SecurityGroupRules.java +++ b/api/src/com/cloud/network/security/SecurityGroupRules.java @@ -16,9 +16,9 @@ // under the License. package com.cloud.network.security; import com.cloud.network.security.SecurityRule.SecurityRuleType; +import org.apache.cloudstack.api.InternalIdentity; -public interface SecurityGroupRules { - long getId(); +public interface SecurityGroupRules extends InternalIdentity { String getName(); diff --git a/api/src/com/cloud/network/security/SecurityRule.java b/api/src/com/cloud/network/security/SecurityRule.java index faf1b56db3a..bd4192d614c 100644 --- a/api/src/com/cloud/network/security/SecurityRule.java +++ b/api/src/com/cloud/network/security/SecurityRule.java @@ -17,8 +17,10 @@ package com.cloud.network.security; import com.cloud.async.AsyncInstanceCreateStatus; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; -public interface SecurityRule { +public interface SecurityRule extends Identity, InternalIdentity { public static class SecurityRuleType { public static final SecurityRuleType IngressRule = new SecurityRuleType("ingress"); @@ -33,7 +35,6 @@ public interface SecurityRule { } private String _type; } - long getId(); long getSecurityGroupId(); @@ -52,7 +53,4 @@ public interface SecurityRule { Long getAllowedNetworkId(); String getAllowedSourceIpCidr(); - - String getUuid(); - } diff --git a/api/src/com/cloud/network/vpc/PrivateGateway.java b/api/src/com/cloud/network/vpc/PrivateGateway.java index 82672a6ef12..2f346852e30 100644 --- a/api/src/com/cloud/network/vpc/PrivateGateway.java +++ b/api/src/com/cloud/network/vpc/PrivateGateway.java @@ -16,6 +16,6 @@ // under the License. package com.cloud.network.vpc; -public interface PrivateGateway extends VpcGateway{ +public interface PrivateGateway extends VpcGateway { long getPhysicalNetworkId(); } diff --git a/api/src/com/cloud/network/vpc/StaticRoute.java b/api/src/com/cloud/network/vpc/StaticRoute.java index f06df7d80e9..f45691f49ac 100644 --- a/api/src/com/cloud/network/vpc/StaticRoute.java +++ b/api/src/com/cloud/network/vpc/StaticRoute.java @@ -17,9 +17,10 @@ package com.cloud.network.vpc; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface StaticRoute extends ControlledEntity, InternalIdentity { +public interface StaticRoute extends ControlledEntity, Identity, InternalIdentity { enum State { Staged, // route been created but has never got through network rule conflict detection. Routes in this state can not be sent to VPC virtual router. Add, // Add means the route has been created and has gone through network rule conflict detection. @@ -46,13 +47,4 @@ public interface StaticRoute extends ControlledEntity, InternalIdentity { * @return */ Long getVpcId(); - - /** - * @return - */ - long getId(); - - String getUuid(); - - } diff --git a/api/src/com/cloud/network/vpc/StaticRouteProfile.java b/api/src/com/cloud/network/vpc/StaticRouteProfile.java index 9ef3c6621da..656355590f3 100644 --- a/api/src/com/cloud/network/vpc/StaticRouteProfile.java +++ b/api/src/com/cloud/network/vpc/StaticRouteProfile.java @@ -18,7 +18,7 @@ package com.cloud.network.vpc; import org.apache.cloudstack.api.InternalIdentity; -public class StaticRouteProfile implements StaticRoute, InternalIdentity { +public class StaticRouteProfile implements StaticRoute { private long id; private String uuid; private String targetCidr; diff --git a/api/src/com/cloud/network/vpc/Vpc.java b/api/src/com/cloud/network/vpc/Vpc.java index d3fc594fd9e..d37b12e232b 100644 --- a/api/src/com/cloud/network/vpc/Vpc.java +++ b/api/src/com/cloud/network/vpc/Vpc.java @@ -18,9 +18,10 @@ package com.cloud.network.vpc; import com.cloud.acl.ControlledEntity; import com.cloud.network.Network; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface Vpc extends ControlledEntity, InternalIdentity{ +public interface Vpc extends ControlledEntity, Identity, InternalIdentity { public enum State { Enabled, Inactive @@ -30,10 +31,6 @@ public interface Vpc extends ControlledEntity, InternalIdentity{ boolean readyToUse(); - long getId(); - - String getUuid(); - String getName(); long getZoneId(); diff --git a/api/src/com/cloud/network/vpc/VpcGateway.java b/api/src/com/cloud/network/vpc/VpcGateway.java index 7bed3e71cb2..e78422d6af9 100644 --- a/api/src/com/cloud/network/vpc/VpcGateway.java +++ b/api/src/com/cloud/network/vpc/VpcGateway.java @@ -33,8 +33,6 @@ public interface VpcGateway extends Identity, ControlledEntity, InternalIdentity Deleting } - long getId(); - /** * @return */ diff --git a/api/src/com/cloud/network/vpc/VpcOffering.java b/api/src/com/cloud/network/vpc/VpcOffering.java index 721b943479f..1acfcd21418 100644 --- a/api/src/com/cloud/network/vpc/VpcOffering.java +++ b/api/src/com/cloud/network/vpc/VpcOffering.java @@ -16,9 +16,10 @@ // under the License. package com.cloud.network.vpc; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface VpcOffering extends InternalIdentity { +public interface VpcOffering extends InternalIdentity, Identity { public enum State { Disabled, Enabled @@ -26,10 +27,6 @@ public interface VpcOffering extends InternalIdentity { public static final String defaultVPCOfferingName = "Default VPC offering"; - long getId(); - - String getUuid(); - String getName(); String getUniqueName(); diff --git a/api/src/com/cloud/offering/DiskOffering.java b/api/src/com/cloud/offering/DiskOffering.java index 10a045d330a..8e9b54c0053 100644 --- a/api/src/com/cloud/offering/DiskOffering.java +++ b/api/src/com/cloud/offering/DiskOffering.java @@ -16,6 +16,9 @@ // under the License. package com.cloud.offering; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + import java.util.Date; /** @@ -23,10 +26,7 @@ import java.util.Date; * the disk offering. * */ -public interface DiskOffering { - long getId(); - - String getUuid(); +public interface DiskOffering extends Identity, InternalIdentity { String getUniqueName(); diff --git a/api/src/com/cloud/offering/NetworkOffering.java b/api/src/com/cloud/offering/NetworkOffering.java index 4b8ffd34ee0..4035ca2a941 100644 --- a/api/src/com/cloud/offering/NetworkOffering.java +++ b/api/src/com/cloud/offering/NetworkOffering.java @@ -18,13 +18,14 @@ package com.cloud.offering; import com.cloud.network.Network.GuestType; import com.cloud.network.Networks.TrafficType; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; /** * Describes network offering * */ -public interface NetworkOffering extends InternalIdentity { +public interface NetworkOffering extends InternalIdentity, Identity { public enum Availability { Required, @@ -51,11 +52,6 @@ public interface NetworkOffering extends InternalIdentity { public final static String DefaultIsolatedNetworkOfferingForVpcNetworks = "DefaultIsolatedNetworkOfferingForVpcNetworks"; public final static String DefaultIsolatedNetworkOfferingForVpcNetworksNoLB = "DefaultIsolatedNetworkOfferingForVpcNetworksNoLB"; - - long getId(); - - String getUuid(); - /** * @return name for the network offering. */ diff --git a/api/src/com/cloud/org/Cluster.java b/api/src/com/cloud/org/Cluster.java index db73db4bba2..cb72a70b817 100644 --- a/api/src/com/cloud/org/Cluster.java +++ b/api/src/com/cloud/org/Cluster.java @@ -18,17 +18,15 @@ package com.cloud.org; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.org.Managed.ManagedState; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; -public interface Cluster extends Grouping { +public interface Cluster extends Grouping, InternalIdentity, Identity { public static enum ClusterType { CloudManaged, ExternalManaged; }; - long getId(); - - String getUuid(); - String getName(); long getDataCenterId(); diff --git a/api/src/com/cloud/projects/ProjectInvitation.java b/api/src/com/cloud/projects/ProjectInvitation.java index f4cac2ebea3..bfa35302601 100644 --- a/api/src/com/cloud/projects/ProjectInvitation.java +++ b/api/src/com/cloud/projects/ProjectInvitation.java @@ -19,15 +19,14 @@ package com.cloud.projects; import java.util.Date; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface ProjectInvitation extends ControlledEntity, InternalIdentity { +public interface ProjectInvitation extends ControlledEntity, Identity, InternalIdentity { public enum State { Pending, Completed, Expired, Declined } - long getId(); - long getProjectId(); Long getForAccountId(); diff --git a/api/src/com/cloud/server/ResourceTag.java b/api/src/com/cloud/server/ResourceTag.java index e693569ade4..5e82ae43846 100644 --- a/api/src/com/cloud/server/ResourceTag.java +++ b/api/src/com/cloud/server/ResourceTag.java @@ -17,9 +17,10 @@ package com.cloud.server; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface ResourceTag extends ControlledEntity, InternalIdentity { +public interface ResourceTag extends ControlledEntity, Identity, InternalIdentity { public enum TaggedResourceType { UserVm, @@ -39,11 +40,6 @@ public interface ResourceTag extends ControlledEntity, InternalIdentity { StaticRoute } - /** - * @return - */ - long getId(); - /** * @return */ diff --git a/api/src/com/cloud/storage/GuestOS.java b/api/src/com/cloud/storage/GuestOS.java index de04272929c..437cd37d1ab 100644 --- a/api/src/com/cloud/storage/GuestOS.java +++ b/api/src/com/cloud/storage/GuestOS.java @@ -16,13 +16,10 @@ // under the License. package com.cloud.storage; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface GuestOS extends InternalIdentity { - - long getId(); - - String getUuid(); +public interface GuestOS extends InternalIdentity, Identity { String getName(); diff --git a/api/src/com/cloud/storage/GuestOsCategory.java b/api/src/com/cloud/storage/GuestOsCategory.java index cae4518fc0b..c28d7d6bf77 100644 --- a/api/src/com/cloud/storage/GuestOsCategory.java +++ b/api/src/com/cloud/storage/GuestOsCategory.java @@ -16,12 +16,12 @@ // under the License. package com.cloud.storage; -public interface GuestOsCategory { +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +public interface GuestOsCategory extends Identity, InternalIdentity { // Used by OS preference, 'None' for no OS preference public static final String CATEGORY_NONE ="None"; - long getId(); - - String getUuid(); String getName(); diff --git a/api/src/com/cloud/storage/S3.java b/api/src/com/cloud/storage/S3.java index 7a679f2adc5..708e280ca5b 100644 --- a/api/src/com/cloud/storage/S3.java +++ b/api/src/com/cloud/storage/S3.java @@ -19,14 +19,12 @@ package com.cloud.storage; import com.cloud.agent.api.to.S3TO; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; import java.util.Date; -public interface S3 { - - long getId(); - - String getUuid(); +public interface S3 extends InternalIdentity, Identity { String getAccessKey(); diff --git a/api/src/com/cloud/storage/Snapshot.java b/api/src/com/cloud/storage/Snapshot.java index 0ca05b7e106..5405a24d10d 100644 --- a/api/src/com/cloud/storage/Snapshot.java +++ b/api/src/com/cloud/storage/Snapshot.java @@ -20,9 +20,10 @@ import java.util.Date; import com.cloud.acl.ControlledEntity; import com.cloud.hypervisor.Hypervisor.HypervisorType; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface Snapshot extends ControlledEntity, InternalIdentity { +public interface Snapshot extends ControlledEntity, Identity, InternalIdentity { public enum Type { MANUAL, RECURRING, @@ -68,10 +69,6 @@ public interface Snapshot extends ControlledEntity, InternalIdentity { public static final long MANUAL_POLICY_ID = 0L; - long getId(); - - String getUuid(); - long getAccountId(); long getVolumeId(); diff --git a/api/src/com/cloud/storage/StoragePool.java b/api/src/com/cloud/storage/StoragePool.java index 2d01f9c324e..3334da54ec0 100644 --- a/api/src/com/cloud/storage/StoragePool.java +++ b/api/src/com/cloud/storage/StoragePool.java @@ -19,25 +19,16 @@ package com.cloud.storage; import java.util.Date; import com.cloud.storage.Storage.StoragePoolType; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; -public interface StoragePool { - - /** - * @return id of the pool. - */ - long getId(); +public interface StoragePool extends Identity, InternalIdentity { /** * @return name of the pool. */ String getName(); - /*** - * - * @return unique identifier - */ - String getUuid(); - /** * @return the type of pool. */ diff --git a/api/src/com/cloud/storage/Upload.java b/api/src/com/cloud/storage/Upload.java index c1abc4c389c..a20faf1dc34 100755 --- a/api/src/com/cloud/storage/Upload.java +++ b/api/src/com/cloud/storage/Upload.java @@ -16,11 +16,12 @@ // under the License. package com.cloud.storage; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; import java.util.Date; -public interface Upload extends InternalIdentity { +public interface Upload extends InternalIdentity, Identity { public static enum Status { UNKNOWN, ABANDONED, UPLOADED, NOT_UPLOADED, UPLOAD_ERROR, UPLOAD_IN_PROGRESS, NOT_COPIED, COPY_IN_PROGRESS, COPY_ERROR, COPY_COMPLETE, DOWNLOAD_URL_CREATED, DOWNLOAD_URL_NOT_CREATED, ERROR @@ -36,10 +37,6 @@ public interface Upload extends InternalIdentity { long getHostId(); - long getId(); - - String getUuid(); - Date getCreated(); Date getLastUpdated(); diff --git a/api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java b/api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java index 49fbc6da427..97baa4b29c4 100644 --- a/api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java +++ b/api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java @@ -16,9 +16,12 @@ // under the License. package com.cloud.storage; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + import java.util.Date; -public interface VMTemplateStorageResourceAssoc { +public interface VMTemplateStorageResourceAssoc extends InternalIdentity { public static enum Status { UNKNOWN, DOWNLOAD_ERROR, NOT_DOWNLOADED, DOWNLOAD_IN_PROGRESS, DOWNLOADED, ABANDONED, UPLOADED, NOT_UPLOADED, UPLOAD_ERROR, UPLOAD_IN_PROGRESS } @@ -35,8 +38,6 @@ public interface VMTemplateStorageResourceAssoc { void setDownloadState(Status downloadState); - long getId(); - Date getCreated(); Date getLastUpdated(); diff --git a/api/src/com/cloud/storage/Volume.java b/api/src/com/cloud/storage/Volume.java index 52b7a112804..747f06f6e21 100755 --- a/api/src/com/cloud/storage/Volume.java +++ b/api/src/com/cloud/storage/Volume.java @@ -22,9 +22,10 @@ import com.cloud.acl.ControlledEntity; import com.cloud.template.BasedOn; import com.cloud.utils.fsm.StateMachine2; import com.cloud.utils.fsm.StateObject; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface Volume extends ControlledEntity, InternalIdentity, BasedOn, StateObject { +public interface Volume extends ControlledEntity, Identity, InternalIdentity, BasedOn, StateObject { enum Type { UNKNOWN, ROOT, SWAP, DATADISK, ISO }; @@ -94,10 +95,6 @@ public interface Volume extends ControlledEntity, InternalIdentity, BasedOn, Sta ExpungingRequested; } - long getId(); - - String getUuid(); - /** * @return the volume name */ diff --git a/api/src/com/cloud/storage/snapshot/SnapshotPolicy.java b/api/src/com/cloud/storage/snapshot/SnapshotPolicy.java index 7d850ac3872..37ce6fd1536 100644 --- a/api/src/com/cloud/storage/snapshot/SnapshotPolicy.java +++ b/api/src/com/cloud/storage/snapshot/SnapshotPolicy.java @@ -16,10 +16,10 @@ // under the License. package com.cloud.storage.snapshot; -public interface SnapshotPolicy { - long getId(); +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; - String getUuid(); +public interface SnapshotPolicy extends Identity, InternalIdentity { long getVolumeId(); diff --git a/api/src/com/cloud/template/VirtualMachineTemplate.java b/api/src/com/cloud/template/VirtualMachineTemplate.java index 7527e9a1c30..967429c1fec 100755 --- a/api/src/com/cloud/template/VirtualMachineTemplate.java +++ b/api/src/com/cloud/template/VirtualMachineTemplate.java @@ -23,9 +23,10 @@ import com.cloud.acl.ControlledEntity; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.Storage.TemplateType; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface VirtualMachineTemplate extends ControlledEntity, InternalIdentity { +public interface VirtualMachineTemplate extends ControlledEntity, Identity, InternalIdentity { public static enum BootloaderType { PyGrub, HVM, External, CD @@ -41,13 +42,6 @@ public interface VirtualMachineTemplate extends ControlledEntity, InternalIdenti all // all templates (only usable by admins) } - /** - * @return id. - */ - long getId(); - - String getUuid(); - boolean isFeatured(); /** diff --git a/api/src/com/cloud/user/Account.java b/api/src/com/cloud/user/Account.java index 2a1a8ea7fe4..b07883a3a7e 100755 --- a/api/src/com/cloud/user/Account.java +++ b/api/src/com/cloud/user/Account.java @@ -19,9 +19,10 @@ package com.cloud.user; import java.util.Date; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface Account extends ControlledEntity, InternalIdentity { +public interface Account extends ControlledEntity, InternalIdentity, Identity { public enum Type { Normal, Admin, @@ -50,10 +51,6 @@ public interface Account extends ControlledEntity, InternalIdentity { public static final long ACCOUNT_ID_SYSTEM = 1; - public long getId(); - - public String getUuid(); - public String getAccountName(); public short getType(); diff --git a/api/src/com/cloud/user/SSHKeyPair.java b/api/src/com/cloud/user/SSHKeyPair.java index 117c4727bfd..8da58e52dcf 100644 --- a/api/src/com/cloud/user/SSHKeyPair.java +++ b/api/src/com/cloud/user/SSHKeyPair.java @@ -21,11 +21,6 @@ import org.apache.cloudstack.api.InternalIdentity; public interface SSHKeyPair extends ControlledEntity, InternalIdentity { - /** - * @return The id of the key pair. - */ - public long getId(); - /** * @return The given name of the key pair. */ diff --git a/api/src/com/cloud/vm/InstanceGroup.java b/api/src/com/cloud/vm/InstanceGroup.java index 283e1e5cb75..4a5bc691c27 100644 --- a/api/src/com/cloud/vm/InstanceGroup.java +++ b/api/src/com/cloud/vm/InstanceGroup.java @@ -19,10 +19,10 @@ package com.cloud.vm; import java.util.Date; import com.cloud.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -public interface InstanceGroup extends ControlledEntity, InternalIdentity { - long getId(); +public interface InstanceGroup extends ControlledEntity, Identity, InternalIdentity { String getName(); diff --git a/api/src/com/cloud/vm/Nic.java b/api/src/com/cloud/vm/Nic.java index dfba18a7def..84c0034b430 100644 --- a/api/src/com/cloud/vm/Nic.java +++ b/api/src/com/cloud/vm/Nic.java @@ -25,11 +25,13 @@ import com.cloud.network.Networks.AddressFormat; import com.cloud.network.Networks.Mode; import com.cloud.utils.fsm.FiniteState; import com.cloud.utils.fsm.StateMachine; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; /** * Nic represents one nic on the VM. */ -public interface Nic { +public interface Nic extends Identity, InternalIdentity { enum Event { ReservationRequested, ReleaseRequested, CancelRequested, OperationCompleted, OperationFailed, } @@ -86,11 +88,6 @@ public interface Nic { PlaceHolder, Create, Start, Managed; } - /** - * @return id in the CloudStack database - */ - long getId(); - /** * @return reservation id returned by the allocation source. This can be the String version of the database id if * the diff --git a/api/src/com/cloud/vm/VirtualMachine.java b/api/src/com/cloud/vm/VirtualMachine.java index 87a903d2deb..6f084efdc81 100755 --- a/api/src/com/cloud/vm/VirtualMachine.java +++ b/api/src/com/cloud/vm/VirtualMachine.java @@ -207,11 +207,6 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, I */ public String getInstanceName(); - /** - * @return the id of this virtual machine. null means the id has not been set. - */ - public long getId(); - /** * @return the host name of the virtual machine. If the user did not * specify the host name when creating the virtual machine then it is diff --git a/api/test/integration/api/__init__.py b/api/test/integration/api/__init__.py new file mode 100644 index 00000000000..d216be4ddc9 --- /dev/null +++ b/api/test/integration/api/__init__.py @@ -0,0 +1,16 @@ +# 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. \ No newline at end of file diff --git a/api/test/integration/api/setup.py b/api/test/integration/api/setup.py new file mode 100644 index 00000000000..13a83393a91 --- /dev/null +++ b/api/test/integration/api/setup.py @@ -0,0 +1,16 @@ +# 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. diff --git a/api/test/integration/api/test/__init__.py b/api/test/integration/api/test/__init__.py new file mode 100644 index 00000000000..d216be4ddc9 --- /dev/null +++ b/api/test/integration/api/test/__init__.py @@ -0,0 +1,16 @@ +# 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. \ No newline at end of file diff --git a/api/test/integration/api/test/account/__init__.py b/api/test/integration/api/test/account/__init__.py new file mode 100644 index 00000000000..d216be4ddc9 --- /dev/null +++ b/api/test/integration/api/test/account/__init__.py @@ -0,0 +1,16 @@ +# 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. \ No newline at end of file diff --git a/api/test/integration/api/test/account/testCreateAccount.py b/api/test/integration/api/test/account/testCreateAccount.py new file mode 100644 index 00000000000..b094e819421 --- /dev/null +++ b/api/test/integration/api/test/account/testCreateAccount.py @@ -0,0 +1,61 @@ +# 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. + +import factory +import marvin +from marvin import cloudstackTestCase +from marvin.integration.lib.base import * +from marvin.integration.lib import utils + +class AccountFactory(factory.Factory): + FACTORY_FOR = createAccount.createAccountCmd + + firstname = 'firstname-'+random_gen() + lastname = 'lastname-'+random_gen() + email = factory.lazy_attribute(lambda e: '{0}.{1}@cloudstack.org'.format(e.firstname, e.lastname).lower()) + +class AdminAccountFactory(AccountFactory): + accounttype = 1 + +class UserAccountFactory(AccountFactory): + accounttype = 0 + +class TestCreateAccount(cloudstackTestCase): + def setUp(self): + self.apiClient = self.testClient.getApiClient() + self.userApiClient = self.testClient.getUserApiClient(account='test'+utils.random_gen(), 'ROOT') + + def test_createAccountAsAdmin(self): + """ + creates an account for a user as admin + """ + Account.create(self.apiClient, services=None) + from marvin.cloudstackAPI.createAccount import createAccountCmd + self.assertEqual(True, False) + + def test_createAccountAsUser(self): + """ + negative: create account as a user + """ + self.assertEqual(True, False) + + def tearDown(self): + self.apiClient.close() + self.userApiClient.close() + +if __name__ == '__main__': + unittest.main() diff --git a/core/src/com/cloud/alert/AlertVO.java b/core/src/com/cloud/alert/AlertVO.java index 7208b34d465..f6089d65043 100755 --- a/core/src/com/cloud/alert/AlertVO.java +++ b/core/src/com/cloud/alert/AlertVO.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="alert") -public class AlertVO implements Alert, Identity, InternalIdentity { +public class AlertVO implements Alert { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/core/src/com/cloud/async/AsyncJobVO.java b/core/src/com/cloud/async/AsyncJobVO.java index 75b9e2d842d..ad482b03a9d 100644 --- a/core/src/com/cloud/async/AsyncJobVO.java +++ b/core/src/com/cloud/async/AsyncJobVO.java @@ -36,7 +36,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="async_job") -public class AsyncJobVO implements AsyncJob, InternalIdentity { +public class AsyncJobVO implements AsyncJob { public static final int CALLBACK_POLLING = 0; public static final int CALLBACK_EMAIL = 1; @@ -123,24 +123,24 @@ public class AsyncJobVO implements AsyncJob, InternalIdentity { public AsyncJobVO() { this.uuid = UUID.randomUUID().toString(); - } - - public AsyncJobVO(long userId, long accountId, String cmd, String cmdInfo, Long instanceId, Type instanceType) { - this.userId = userId; - this.accountId = accountId; - this.cmd = cmd; - this.cmdInfo = cmdInfo; + } + + public AsyncJobVO(long userId, long accountId, String cmd, String cmdInfo, Long instanceId, Type instanceType) { + this.userId = userId; + this.accountId = accountId; + this.cmd = cmd; + this.cmdInfo = cmdInfo; this.callbackType = CALLBACK_POLLING; this.uuid = UUID.randomUUID().toString(); this.instanceId = instanceId; - } - - public AsyncJobVO(long userId, long accountId, String cmd, String cmdInfo, - int callbackType, String callbackAddress, Long instanceId, Type instanceType) { - - this(userId, accountId, cmd, cmdInfo, instanceId, instanceType); - this.callbackType = callbackType; - this.callbackAddress = callbackAddress; + } + + public AsyncJobVO(long userId, long accountId, String cmd, String cmdInfo, + int callbackType, String callbackAddress, Long instanceId, Type instanceType) { + + this(userId, accountId, cmd, cmdInfo, instanceId, instanceType); + this.callbackType = callbackType; + this.callbackAddress = callbackAddress; this.uuid = UUID.randomUUID().toString(); } diff --git a/core/src/com/cloud/capacity/CapacityVO.java b/core/src/com/cloud/capacity/CapacityVO.java index 7a61252e9b2..d34e9d36840 100755 --- a/core/src/com/cloud/capacity/CapacityVO.java +++ b/core/src/com/cloud/capacity/CapacityVO.java @@ -33,7 +33,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="op_host_capacity") -public class CapacityVO implements Capacity, InternalIdentity { +public class CapacityVO implements Capacity { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") @@ -103,7 +103,7 @@ public class CapacityVO implements Capacity, InternalIdentity { public long getId() { return id; } - + @Override public Long getHostOrPoolId() { return hostOrPoolId; @@ -196,4 +196,9 @@ public class CapacityVO implements Capacity, InternalIdentity { public void setUsedPercentage(float usedPercentage) { this.usedPercentage = usedPercentage; } + + @Override + public String getUuid() { + return null; //To change body of implemented methods use File | Settings | File Templates. + } } diff --git a/core/src/com/cloud/configuration/ResourceCountVO.java b/core/src/com/cloud/configuration/ResourceCountVO.java index 88ad1a80e23..b87f55caa5e 100644 --- a/core/src/com/cloud/configuration/ResourceCountVO.java +++ b/core/src/com/cloud/configuration/ResourceCountVO.java @@ -29,7 +29,7 @@ import javax.persistence.Table; @Entity @Table(name="resource_count") -public class ResourceCountVO implements ResourceCount, InternalIdentity { +public class ResourceCountVO implements ResourceCount { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) diff --git a/core/src/com/cloud/configuration/ResourceLimitVO.java b/core/src/com/cloud/configuration/ResourceLimitVO.java index 4aefa4e69ac..c131495a74f 100644 --- a/core/src/com/cloud/configuration/ResourceLimitVO.java +++ b/core/src/com/cloud/configuration/ResourceLimitVO.java @@ -29,7 +29,7 @@ import javax.persistence.Table; @Entity @Table(name = "resource_limit") -public class ResourceLimitVO implements ResourceLimit, InternalIdentity { +public class ResourceLimitVO implements ResourceLimit { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/core/src/com/cloud/event/EventVO.java b/core/src/com/cloud/event/EventVO.java index d91439bf618..ac46f24b2ee 100644 --- a/core/src/com/cloud/event/EventVO.java +++ b/core/src/com/cloud/event/EventVO.java @@ -35,7 +35,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="event") -public class EventVO implements Event, Identity, InternalIdentity { +public class EventVO implements Event { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/core/src/com/cloud/event/UsageEvent.java b/core/src/com/cloud/event/UsageEvent.java index 0b0505065e5..0d4ef177405 100644 --- a/core/src/com/cloud/event/UsageEvent.java +++ b/core/src/com/cloud/event/UsageEvent.java @@ -21,7 +21,6 @@ import org.apache.cloudstack.api.InternalIdentity; import java.util.Date; public interface UsageEvent extends InternalIdentity { - long getId(); String getType(); Date getCreateDate(); diff --git a/core/src/com/cloud/event/UsageEventVO.java b/core/src/com/cloud/event/UsageEventVO.java index ed34f01cd64..c92972b6072 100644 --- a/core/src/com/cloud/event/UsageEventVO.java +++ b/core/src/com/cloud/event/UsageEventVO.java @@ -30,7 +30,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="usage_event") -public class UsageEventVO implements UsageEvent, InternalIdentity { +public class UsageEventVO implements UsageEvent { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/core/src/com/cloud/host/HostVO.java b/core/src/com/cloud/host/HostVO.java index 92445a9430c..c814b94a426 100755 --- a/core/src/com/cloud/host/HostVO.java +++ b/core/src/com/cloud/host/HostVO.java @@ -49,7 +49,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Table(name="host") @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS) @DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32) -public class HostVO implements Host, Identity, InternalIdentity { +public class HostVO implements Host { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java b/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java index 6e19f11a03f..56e8e0a734d 100644 --- a/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java +++ b/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="hypervisor_capabilities") -public class HypervisorCapabilitiesVO implements HypervisorCapabilities, Identity, InternalIdentity { +public class HypervisorCapabilitiesVO implements HypervisorCapabilities { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/core/src/com/cloud/network/VpnUserVO.java b/core/src/com/cloud/network/VpnUserVO.java index 4d3266a3a0f..5a8e531893e 100644 --- a/core/src/com/cloud/network/VpnUserVO.java +++ b/core/src/com/cloud/network/VpnUserVO.java @@ -33,7 +33,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name=("vpn_users")) -public class VpnUserVO implements VpnUser, Identity, InternalIdentity { +public class VpnUserVO implements VpnUser { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/core/src/com/cloud/network/security/SecurityGroupRuleVO.java b/core/src/com/cloud/network/security/SecurityGroupRuleVO.java index 0b26dd14412..f01b50fd250 100644 --- a/core/src/com/cloud/network/security/SecurityGroupRuleVO.java +++ b/core/src/com/cloud/network/security/SecurityGroupRuleVO.java @@ -33,7 +33,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name = ("security_group_rule")) -public class SecurityGroupRuleVO implements SecurityRule, InternalIdentity { +public class SecurityGroupRuleVO implements SecurityRule { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") diff --git a/core/src/com/cloud/network/security/SecurityGroupRulesVO.java b/core/src/com/cloud/network/security/SecurityGroupRulesVO.java index eb58a5480e8..82060efce12 100644 --- a/core/src/com/cloud/network/security/SecurityGroupRulesVO.java +++ b/core/src/com/cloud/network/security/SecurityGroupRulesVO.java @@ -33,7 +33,7 @@ import org.apache.cloudstack.api.InternalIdentity; @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, InternalIdentity { +public class SecurityGroupRulesVO implements SecurityGroupRules { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") diff --git a/core/src/com/cloud/network/security/SecurityGroupVO.java b/core/src/com/cloud/network/security/SecurityGroupVO.java index 00101661cd0..be7c593f744 100644 --- a/core/src/com/cloud/network/security/SecurityGroupVO.java +++ b/core/src/com/cloud/network/security/SecurityGroupVO.java @@ -30,7 +30,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name = ("security_group")) -public class SecurityGroupVO implements SecurityGroup, Identity, InternalIdentity { +public class SecurityGroupVO implements SecurityGroup { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") diff --git a/core/src/com/cloud/network/security/SecurityGroupWork.java b/core/src/com/cloud/network/security/SecurityGroupWork.java index a7f89561174..e50f3eb425c 100644 --- a/core/src/com/cloud/network/security/SecurityGroupWork.java +++ b/core/src/com/cloud/network/security/SecurityGroupWork.java @@ -16,6 +16,8 @@ // under the License. package com.cloud.network.security; +import org.apache.cloudstack.api.InternalIdentity; + /** * Work related to security groups for a vm * diff --git a/core/src/com/cloud/storage/DiskOfferingVO.java b/core/src/com/cloud/storage/DiskOfferingVO.java index 9dad8838c46..5f4f18bcd34 100755 --- a/core/src/com/cloud/storage/DiskOfferingVO.java +++ b/core/src/com/cloud/storage/DiskOfferingVO.java @@ -43,7 +43,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Table(name="disk_offering") @Inheritance(strategy=InheritanceType.JOINED) @DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32) -public class DiskOfferingVO implements DiskOffering, Identity, InternalIdentity { +public class DiskOfferingVO implements DiskOffering { public enum Type { Disk, Service diff --git a/core/src/com/cloud/storage/GuestOSCategoryVO.java b/core/src/com/cloud/storage/GuestOSCategoryVO.java index fa1b73db791..03a74793001 100644 --- a/core/src/com/cloud/storage/GuestOSCategoryVO.java +++ b/core/src/com/cloud/storage/GuestOSCategoryVO.java @@ -30,7 +30,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="guest_os_category") -public class GuestOSCategoryVO implements GuestOsCategory, Identity, InternalIdentity { +public class GuestOSCategoryVO implements GuestOsCategory { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/core/src/com/cloud/storage/GuestOSVO.java b/core/src/com/cloud/storage/GuestOSVO.java index 5f3e4a939c1..49e136d03c1 100644 --- a/core/src/com/cloud/storage/GuestOSVO.java +++ b/core/src/com/cloud/storage/GuestOSVO.java @@ -30,7 +30,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="guest_os") -public class GuestOSVO implements GuestOS, Identity, InternalIdentity { +public class GuestOSVO implements GuestOS { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/core/src/com/cloud/storage/S3VO.java b/core/src/com/cloud/storage/S3VO.java index 3017f7e7436..ec49bc92d74 100644 --- a/core/src/com/cloud/storage/S3VO.java +++ b/core/src/com/cloud/storage/S3VO.java @@ -33,7 +33,7 @@ import java.util.Date; @Entity @Table(name = "s3") -public class S3VO implements S3, Identity, InternalIdentity { +public class S3VO implements S3 { public static final String ID_COLUMN_NAME = "id"; diff --git a/core/src/com/cloud/storage/SnapshotPolicyVO.java b/core/src/com/cloud/storage/SnapshotPolicyVO.java index 2240ec53ef5..4eb4916afd3 100644 --- a/core/src/com/cloud/storage/SnapshotPolicyVO.java +++ b/core/src/com/cloud/storage/SnapshotPolicyVO.java @@ -32,7 +32,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="snapshot_policy") -public class SnapshotPolicyVO implements SnapshotPolicy, InternalIdentity { +public class SnapshotPolicyVO implements SnapshotPolicy { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) diff --git a/core/src/com/cloud/storage/SnapshotScheduleVO.java b/core/src/com/cloud/storage/SnapshotScheduleVO.java index 80966b33951..75757c6b22b 100644 --- a/core/src/com/cloud/storage/SnapshotScheduleVO.java +++ b/core/src/com/cloud/storage/SnapshotScheduleVO.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="snapshot_schedule") -public class SnapshotScheduleVO implements SnapshotSchedule, InternalIdentity { +public class SnapshotScheduleVO implements SnapshotSchedule { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) diff --git a/core/src/com/cloud/storage/SnapshotVO.java b/core/src/com/cloud/storage/SnapshotVO.java index 44d97f53df4..e5e36504ea6 100644 --- a/core/src/com/cloud/storage/SnapshotVO.java +++ b/core/src/com/cloud/storage/SnapshotVO.java @@ -36,7 +36,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="snapshots") -public class SnapshotVO implements Snapshot, Identity, InternalIdentity { +public class SnapshotVO implements Snapshot { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) diff --git a/core/src/com/cloud/storage/StoragePoolHostAssoc.java b/core/src/com/cloud/storage/StoragePoolHostAssoc.java index 3e0d8daa149..34326d963a6 100644 --- a/core/src/com/cloud/storage/StoragePoolHostAssoc.java +++ b/core/src/com/cloud/storage/StoragePoolHostAssoc.java @@ -16,9 +16,11 @@ // under the License. package com.cloud.storage; +import org.apache.cloudstack.api.InternalIdentity; + import java.util.Date; -public interface StoragePoolHostAssoc { +public interface StoragePoolHostAssoc extends InternalIdentity { long getHostId(); diff --git a/core/src/com/cloud/storage/StoragePoolHostVO.java b/core/src/com/cloud/storage/StoragePoolHostVO.java index a50e3ebdcf8..a8a2bac4886 100644 --- a/core/src/com/cloud/storage/StoragePoolHostVO.java +++ b/core/src/com/cloud/storage/StoragePoolHostVO.java @@ -36,7 +36,7 @@ import org.apache.cloudstack.api.InternalIdentity; */ @Entity @Table(name="storage_pool_host_ref") -public class StoragePoolHostVO implements StoragePoolHostAssoc, InternalIdentity { +public class StoragePoolHostVO implements StoragePoolHostAssoc { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; diff --git a/core/src/com/cloud/storage/StoragePoolVO.java b/core/src/com/cloud/storage/StoragePoolVO.java index 343e440e1fa..cb5209f3e63 100644 --- a/core/src/com/cloud/storage/StoragePoolVO.java +++ b/core/src/com/cloud/storage/StoragePoolVO.java @@ -37,7 +37,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="storage_pool") -public class StoragePoolVO implements StoragePool, Identity, InternalIdentity { +public class StoragePoolVO implements StoragePool { @Id @TableGenerator(name="storage_pool_sq", table="sequence", pkColumnName="name", valueColumnName="value", pkColumnValue="storage_pool_seq", allocationSize=1) @Column(name="id", updatable=false, nullable = false) diff --git a/core/src/com/cloud/storage/UploadVO.java b/core/src/com/cloud/storage/UploadVO.java index be2b642f215..d761bf17e3b 100755 --- a/core/src/com/cloud/storage/UploadVO.java +++ b/core/src/com/cloud/storage/UploadVO.java @@ -36,7 +36,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="upload") -public class UploadVO implements Upload, InternalIdentity { +public class UploadVO implements Upload { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) long id; diff --git a/core/src/com/cloud/storage/VMTemplateHostVO.java b/core/src/com/cloud/storage/VMTemplateHostVO.java index e07a9b9639e..9eae1a00303 100755 --- a/core/src/com/cloud/storage/VMTemplateHostVO.java +++ b/core/src/com/cloud/storage/VMTemplateHostVO.java @@ -38,7 +38,7 @@ import org.apache.cloudstack.api.InternalIdentity; */ @Entity @Table(name="template_host_ref") -public class VMTemplateHostVO implements VMTemplateStorageResourceAssoc, InternalIdentity { +public class VMTemplateHostVO implements VMTemplateStorageResourceAssoc { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) Long id; diff --git a/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java b/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java index cb8c7aa2a29..32c9dd2ece5 100644 --- a/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java +++ b/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java @@ -38,7 +38,7 @@ import org.apache.cloudstack.api.InternalIdentity; */ @Entity @Table(name="template_spool_ref") -public class VMTemplateStoragePoolVO implements VMTemplateStorageResourceAssoc, InternalIdentity { +public class VMTemplateStoragePoolVO implements VMTemplateStorageResourceAssoc { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) long id; diff --git a/core/src/com/cloud/storage/VMTemplateVO.java b/core/src/com/cloud/storage/VMTemplateVO.java index aa089ac8c3f..fcfdd0067e1 100755 --- a/core/src/com/cloud/storage/VMTemplateVO.java +++ b/core/src/com/cloud/storage/VMTemplateVO.java @@ -41,7 +41,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="vm_template") -public class VMTemplateVO implements VirtualMachineTemplate, InternalIdentity { +public class VMTemplateVO implements VirtualMachineTemplate { @Id @TableGenerator(name="vm_template_sq", table="sequence", pkColumnName="name", valueColumnName="value", pkColumnValue="vm_template_seq", allocationSize=1) @Column(name="id", nullable = false) diff --git a/core/src/com/cloud/storage/VolumeVO.java b/core/src/com/cloud/storage/VolumeVO.java index 070fb64b776..aac82df80ce 100755 --- a/core/src/com/cloud/storage/VolumeVO.java +++ b/core/src/com/cloud/storage/VolumeVO.java @@ -39,7 +39,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name = "volumes") -public class VolumeVO implements Volume, Identity, InternalIdentity { +public class VolumeVO implements Volume { @Id @TableGenerator(name = "volume_sq", table = "sequence", pkColumnName = "name", valueColumnName = "value", pkColumnValue = "volume_seq", allocationSize = 1) @GeneratedValue(strategy = GenerationType.TABLE) diff --git a/core/src/com/cloud/storage/snapshot/SnapshotSchedule.java b/core/src/com/cloud/storage/snapshot/SnapshotSchedule.java index 55a24841068..6f3d2ce5468 100644 --- a/core/src/com/cloud/storage/snapshot/SnapshotSchedule.java +++ b/core/src/com/cloud/storage/snapshot/SnapshotSchedule.java @@ -16,12 +16,12 @@ // under the License. package com.cloud.storage.snapshot; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + import java.util.Date; -public interface SnapshotSchedule { - long getId(); - - String getUuid(); +public interface SnapshotSchedule extends InternalIdentity, Identity { Long getVolumeId(); diff --git a/core/src/com/cloud/user/AccountVO.java b/core/src/com/cloud/user/AccountVO.java index d7228e6c091..922c8b99eb5 100644 --- a/core/src/com/cloud/user/AccountVO.java +++ b/core/src/com/cloud/user/AccountVO.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="account") -public class AccountVO implements Account, Identity, InternalIdentity { +public class AccountVO implements Account { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/core/src/com/cloud/user/SSHKeyPairVO.java b/core/src/com/cloud/user/SSHKeyPairVO.java index 025e858f8a0..ab7eb8ea0b5 100644 --- a/core/src/com/cloud/user/SSHKeyPairVO.java +++ b/core/src/com/cloud/user/SSHKeyPairVO.java @@ -28,7 +28,7 @@ import javax.persistence.Transient; @Entity @Table(name="ssh_keypairs") -public class SSHKeyPairVO implements SSHKeyPair, InternalIdentity { +public class SSHKeyPairVO implements SSHKeyPair { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) diff --git a/core/src/com/cloud/vm/InstanceGroupVO.java b/core/src/com/cloud/vm/InstanceGroupVO.java index 39bebb16d1b..ad66b5a4b2c 100644 --- a/core/src/com/cloud/vm/InstanceGroupVO.java +++ b/core/src/com/cloud/vm/InstanceGroupVO.java @@ -36,7 +36,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Table(name="instance_group") @SecondaryTable(name="account", pkJoinColumns={@PrimaryKeyJoinColumn(name="account_id", referencedColumnName="id")}) -public class InstanceGroupVO implements InstanceGroup, Identity, InternalIdentity { +public class InstanceGroupVO implements InstanceGroup { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/core/src/com/cloud/vm/VMInstanceVO.java b/core/src/com/cloud/vm/VMInstanceVO.java index cd5d581268a..13c1cf35902 100644 --- a/core/src/com/cloud/vm/VMInstanceVO.java +++ b/core/src/com/cloud/vm/VMInstanceVO.java @@ -48,7 +48,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Table(name="vm_instance") @Inheritance(strategy=InheritanceType.JOINED) @DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32) -public class VMInstanceVO implements VirtualMachine, InternalIdentity, FiniteStateObject { +public class VMInstanceVO implements VirtualMachine, FiniteStateObject { @Id @TableGenerator(name="vm_instance_sq", table="sequence", pkColumnName="name", valueColumnName="value", pkColumnValue="vm_instance_seq", allocationSize=1) @Column(name="id", updatable=false, nullable = false) diff --git a/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDevice.java b/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDevice.java index 8fc68d167e5..19da27116de 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDevice.java +++ b/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDevice.java @@ -16,7 +16,10 @@ // under the License. package com.cloud.network; -public interface CiscoNexusVSMDevice { +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +public interface CiscoNexusVSMDevice extends InternalIdentity, Identity { // This tells us whether the VSM is currently enabled or disabled. We may // need this if we would like to carry out any sort of maintenance on the @@ -39,10 +42,6 @@ public interface CiscoNexusVSMDevice { Standby } - long getId(); - - String getUuid(); - public String getvsmName(); public long getHostId(); diff --git a/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDeviceVO.java b/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDeviceVO.java index 0082f6d9550..d24f15def97 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDeviceVO.java +++ b/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDeviceVO.java @@ -38,7 +38,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="virtual_supervisor_module") -public class CiscoNexusVSMDeviceVO implements CiscoNexusVSMDevice, Identity, InternalIdentity { +public class CiscoNexusVSMDeviceVO implements CiscoNexusVSMDevice { // We need to know what properties a VSM has. Put them here. diff --git a/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java b/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java index c5c45f1cacb..89c174ae798 100644 --- a/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java +++ b/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java @@ -447,5 +447,4 @@ public class SecurityGroupJoinVO extends BaseViewVO implements ControlledViewEnt this.tagCustomer = tagCustomer; } - } diff --git a/server/src/com/cloud/cluster/ManagementServerHostVO.java b/server/src/com/cloud/cluster/ManagementServerHostVO.java index 4279e04fbcb..31642e4d0c5 100644 --- a/server/src/com/cloud/cluster/ManagementServerHostVO.java +++ b/server/src/com/cloud/cluster/ManagementServerHostVO.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="mshost") -public class ManagementServerHostVO implements ManagementServerHost, InternalIdentity { +public class ManagementServerHostVO implements ManagementServerHost { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) diff --git a/server/src/com/cloud/dc/ClusterVO.java b/server/src/com/cloud/dc/ClusterVO.java index cf562c19093..4195b74f87f 100644 --- a/server/src/com/cloud/dc/ClusterVO.java +++ b/server/src/com/cloud/dc/ClusterVO.java @@ -39,7 +39,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="cluster") -public class ClusterVO implements Cluster, Identity, InternalIdentity { +public class ClusterVO implements Cluster { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/server/src/com/cloud/dc/DataCenterVO.java b/server/src/com/cloud/dc/DataCenterVO.java index 18546ce17cd..28fb11f8cc0 100644 --- a/server/src/com/cloud/dc/DataCenterVO.java +++ b/server/src/com/cloud/dc/DataCenterVO.java @@ -40,7 +40,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="data_center") -public class DataCenterVO implements DataCenter, InternalIdentity, Identity { +public class DataCenterVO implements DataCenter { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) diff --git a/server/src/com/cloud/dc/HostPodVO.java b/server/src/com/cloud/dc/HostPodVO.java index 45571e1d0b2..e4ba9d0c111 100644 --- a/server/src/com/cloud/dc/HostPodVO.java +++ b/server/src/com/cloud/dc/HostPodVO.java @@ -36,7 +36,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name = "host_pod_ref") -public class HostPodVO implements Pod, InternalIdentity { +public class HostPodVO implements Pod { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) long id; diff --git a/server/src/com/cloud/dc/StorageNetworkIpRangeVO.java b/server/src/com/cloud/dc/StorageNetworkIpRangeVO.java index c61cadf44c6..e410d22959e 100755 --- a/server/src/com/cloud/dc/StorageNetworkIpRangeVO.java +++ b/server/src/com/cloud/dc/StorageNetworkIpRangeVO.java @@ -36,7 +36,7 @@ import javax.persistence.Table; @SecondaryTable(name="host_pod_ref", pkJoinColumns={@PrimaryKeyJoinColumn(name="pod_id", referencedColumnName="id")}), @SecondaryTable(name="data_center", pkJoinColumns={@PrimaryKeyJoinColumn(name="data_center_id", referencedColumnName="id")}) }) -public class StorageNetworkIpRangeVO implements StorageNetworkIpRange, InternalIdentity { +public class StorageNetworkIpRangeVO implements StorageNetworkIpRange { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") diff --git a/server/src/com/cloud/dc/VlanVO.java b/server/src/com/cloud/dc/VlanVO.java index 04317cba929..fcb46c4971e 100644 --- a/server/src/com/cloud/dc/VlanVO.java +++ b/server/src/com/cloud/dc/VlanVO.java @@ -32,7 +32,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="vlan") -public class VlanVO implements Vlan, Identity, InternalIdentity { +public class VlanVO implements Vlan { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) diff --git a/server/src/com/cloud/domain/DomainVO.java b/server/src/com/cloud/domain/DomainVO.java index 275395a70d6..bb4ce0cecf7 100644 --- a/server/src/com/cloud/domain/DomainVO.java +++ b/server/src/com/cloud/domain/DomainVO.java @@ -34,7 +34,7 @@ import com.cloud.utils.db.GenericDao; @Entity @Table(name="domain") -public class DomainVO implements Domain, Identity, InternalIdentity { +public class DomainVO implements Domain { public static final Logger s_logger = Logger.getLogger(DomainVO.class.getName()); @Id diff --git a/server/src/com/cloud/network/IPAddressVO.java b/server/src/com/cloud/network/IPAddressVO.java index 1c846b82667..c17d68f0787 100644 --- a/server/src/com/cloud/network/IPAddressVO.java +++ b/server/src/com/cloud/network/IPAddressVO.java @@ -41,7 +41,7 @@ import org.apache.cloudstack.api.InternalIdentity; */ @Entity @Table(name=("user_ip_address")) -public class IPAddressVO implements IpAddress, Identity, InternalIdentity { +public class IPAddressVO implements IpAddress { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/server/src/com/cloud/network/LBStickinessPolicyVO.java b/server/src/com/cloud/network/LBStickinessPolicyVO.java index 0e0df6457db..9a629ce017c 100644 --- a/server/src/com/cloud/network/LBStickinessPolicyVO.java +++ b/server/src/com/cloud/network/LBStickinessPolicyVO.java @@ -37,7 +37,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name = ("load_balancer_stickiness_policies")) @PrimaryKeyJoinColumn(name = "load_balancer_id", referencedColumnName = "id") -public class LBStickinessPolicyVO implements StickinessPolicy, InternalIdentity { +public class LBStickinessPolicyVO implements StickinessPolicy { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") diff --git a/server/src/com/cloud/network/NetworkVO.java b/server/src/com/cloud/network/NetworkVO.java index d83f4585edc..818f44c6462 100644 --- a/server/src/com/cloud/network/NetworkVO.java +++ b/server/src/com/cloud/network/NetworkVO.java @@ -45,7 +45,7 @@ import org.apache.cloudstack.api.InternalIdentity; */ @Entity @Table(name="networks") -public class NetworkVO implements Network, Identity, InternalIdentity { +public class NetworkVO implements Network { @Id @TableGenerator(name="networks_sq", table="sequence", pkColumnName="name", valueColumnName="value", pkColumnValue="networks_seq", allocationSize=1) @Column(name="id") diff --git a/server/src/com/cloud/network/PhysicalNetworkVO.java b/server/src/com/cloud/network/PhysicalNetworkVO.java index e12f5e4be03..9bf8601c503 100644 --- a/server/src/com/cloud/network/PhysicalNetworkVO.java +++ b/server/src/com/cloud/network/PhysicalNetworkVO.java @@ -43,7 +43,7 @@ import org.apache.cloudstack.api.InternalIdentity; */ @Entity @Table(name="physical_network") -public class PhysicalNetworkVO implements PhysicalNetwork, InternalIdentity { +public class PhysicalNetworkVO implements PhysicalNetwork { @Id @TableGenerator(name="physical_networks_sq", table="sequence", pkColumnName="name", valueColumnName="value", pkColumnValue="physical_networks_seq", allocationSize=1) @Column(name="id") diff --git a/server/src/com/cloud/network/Site2SiteCustomerGatewayVO.java b/server/src/com/cloud/network/Site2SiteCustomerGatewayVO.java index 46a63f02ce4..c327b1e33e5 100644 --- a/server/src/com/cloud/network/Site2SiteCustomerGatewayVO.java +++ b/server/src/com/cloud/network/Site2SiteCustomerGatewayVO.java @@ -31,7 +31,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name=("s2s_customer_gateway")) -public class Site2SiteCustomerGatewayVO implements Site2SiteCustomerGateway, InternalIdentity { +public class Site2SiteCustomerGatewayVO implements Site2SiteCustomerGateway { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/server/src/com/cloud/network/Site2SiteVpnGatewayVO.java b/server/src/com/cloud/network/Site2SiteVpnGatewayVO.java index 6124ecb41b0..ada50c40869 100644 --- a/server/src/com/cloud/network/Site2SiteVpnGatewayVO.java +++ b/server/src/com/cloud/network/Site2SiteVpnGatewayVO.java @@ -31,7 +31,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name=("s2s_vpn_gateway")) -public class Site2SiteVpnGatewayVO implements Site2SiteVpnGateway, InternalIdentity { +public class Site2SiteVpnGatewayVO implements Site2SiteVpnGateway { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/server/src/com/cloud/network/dao/PhysicalNetworkTrafficTypeVO.java b/server/src/com/cloud/network/dao/PhysicalNetworkTrafficTypeVO.java index ee20e86290b..4c32d0a949b 100644 --- a/server/src/com/cloud/network/dao/PhysicalNetworkTrafficTypeVO.java +++ b/server/src/com/cloud/network/dao/PhysicalNetworkTrafficTypeVO.java @@ -33,7 +33,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name = "physical_network_traffic_types") -public class PhysicalNetworkTrafficTypeVO implements PhysicalNetworkTrafficType, InternalIdentity { +public class PhysicalNetworkTrafficTypeVO implements PhysicalNetworkTrafficType { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") diff --git a/server/src/com/cloud/network/element/VirtualRouterProviderVO.java b/server/src/com/cloud/network/element/VirtualRouterProviderVO.java index 1548e1ae621..ff2b6210504 100644 --- a/server/src/com/cloud/network/element/VirtualRouterProviderVO.java +++ b/server/src/com/cloud/network/element/VirtualRouterProviderVO.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name=("virtual_router_providers")) -public class VirtualRouterProviderVO implements VirtualRouterProvider, InternalIdentity { +public class VirtualRouterProviderVO implements VirtualRouterProvider { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/server/src/com/cloud/network/rules/FirewallRuleVO.java b/server/src/com/cloud/network/rules/FirewallRuleVO.java index 7cdd9927197..63ace5baa6e 100644 --- a/server/src/com/cloud/network/rules/FirewallRuleVO.java +++ b/server/src/com/cloud/network/rules/FirewallRuleVO.java @@ -45,7 +45,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Table(name="firewall_rules") @Inheritance(strategy=InheritanceType.JOINED) @DiscriminatorColumn(name="purpose", discriminatorType=DiscriminatorType.STRING, length=32) -public class FirewallRuleVO implements FirewallRule, Identity, InternalIdentity { +public class FirewallRuleVO implements FirewallRule { protected final FirewallRulesCidrsDaoImpl _firewallRulesCidrsDao = ComponentLocator.inject(FirewallRulesCidrsDaoImpl.class); @Id diff --git a/server/src/com/cloud/network/rules/StaticNatRuleImpl.java b/server/src/com/cloud/network/rules/StaticNatRuleImpl.java index d2632582505..6103689a31b 100644 --- a/server/src/com/cloud/network/rules/StaticNatRuleImpl.java +++ b/server/src/com/cloud/network/rules/StaticNatRuleImpl.java @@ -19,7 +19,7 @@ package com.cloud.network.rules; import java.util.List; -public class StaticNatRuleImpl implements StaticNatRule{ +public class StaticNatRuleImpl implements StaticNatRule { long id; String xid; String uuid; diff --git a/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java b/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java index 4ad1fb6f525..2595a6a0fa4 100644 --- a/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java +++ b/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java @@ -17,7 +17,7 @@ package com.cloud.network.vpc; -public class PrivateGatewayProfile implements PrivateGateway{ +public class PrivateGatewayProfile implements PrivateGateway { VpcGateway vpcGateway; long physicalNetworkId; diff --git a/server/src/com/cloud/network/vpc/StaticRouteVO.java b/server/src/com/cloud/network/vpc/StaticRouteVO.java index 99294e1f50d..eb4c61b7860 100644 --- a/server/src/com/cloud/network/vpc/StaticRouteVO.java +++ b/server/src/com/cloud/network/vpc/StaticRouteVO.java @@ -35,7 +35,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="static_routes") -public class StaticRouteVO implements StaticRoute, InternalIdentity { +public class StaticRouteVO implements StaticRoute { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") diff --git a/server/src/com/cloud/network/vpc/VpcGatewayVO.java b/server/src/com/cloud/network/vpc/VpcGatewayVO.java index ebf6e289143..718e4df82df 100644 --- a/server/src/com/cloud/network/vpc/VpcGatewayVO.java +++ b/server/src/com/cloud/network/vpc/VpcGatewayVO.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="vpc_gateways") -public class VpcGatewayVO implements VpcGateway, InternalIdentity { +public class VpcGatewayVO implements VpcGateway { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) diff --git a/server/src/com/cloud/network/vpc/VpcOfferingVO.java b/server/src/com/cloud/network/vpc/VpcOfferingVO.java index 6cf0cd62b92..dce7a81e4d0 100644 --- a/server/src/com/cloud/network/vpc/VpcOfferingVO.java +++ b/server/src/com/cloud/network/vpc/VpcOfferingVO.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="vpc_offerings") -public class VpcOfferingVO implements VpcOffering, InternalIdentity { +public class VpcOfferingVO implements VpcOffering { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/server/src/com/cloud/network/vpc/VpcVO.java b/server/src/com/cloud/network/vpc/VpcVO.java index 9bf83af8eda..634df052850 100644 --- a/server/src/com/cloud/network/vpc/VpcVO.java +++ b/server/src/com/cloud/network/vpc/VpcVO.java @@ -32,7 +32,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="vpc") -public class VpcVO implements Vpc, Identity, InternalIdentity { +public class VpcVO implements Vpc { @Id @Column(name="id") long id; diff --git a/server/src/com/cloud/offerings/NetworkOfferingVO.java b/server/src/com/cloud/offerings/NetworkOfferingVO.java index eff0d1934f6..49f2a40031e 100755 --- a/server/src/com/cloud/offerings/NetworkOfferingVO.java +++ b/server/src/com/cloud/offerings/NetworkOfferingVO.java @@ -43,7 +43,7 @@ import java.util.UUID; @Entity @Table(name = "network_offerings") -public class NetworkOfferingVO implements NetworkOffering, InternalIdentity { +public class NetworkOfferingVO implements NetworkOffering { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/server/src/com/cloud/projects/ProjectInvitationVO.java b/server/src/com/cloud/projects/ProjectInvitationVO.java index bf54f3c90d4..78f05c792e6 100644 --- a/server/src/com/cloud/projects/ProjectInvitationVO.java +++ b/server/src/com/cloud/projects/ProjectInvitationVO.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name = "project_invitations") -public class ProjectInvitationVO implements ProjectInvitation, Identity, InternalIdentity { +public class ProjectInvitationVO implements ProjectInvitation { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") diff --git a/server/src/com/cloud/tags/ResourceTagVO.java b/server/src/com/cloud/tags/ResourceTagVO.java index ffb73af7e0b..04ae757bf75 100644 --- a/server/src/com/cloud/tags/ResourceTagVO.java +++ b/server/src/com/cloud/tags/ResourceTagVO.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="resource_tags") -public class ResourceTagVO implements Identity, InternalIdentity, ResourceTag{ +public class ResourceTagVO implements ResourceTag { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) diff --git a/server/src/com/cloud/vm/NicVO.java b/server/src/com/cloud/vm/NicVO.java index befe0a93204..64b9153a347 100644 --- a/server/src/com/cloud/vm/NicVO.java +++ b/server/src/com/cloud/vm/NicVO.java @@ -37,7 +37,7 @@ import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name = "nics") -public class NicVO implements Nic, Identity, InternalIdentity { +public class NicVO implements Nic { protected NicVO() { }