cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [2/5] Remove IAMEntityType to use existing VO interface class to annotate entityType.
Date Tue, 18 Mar 2014 00:21:48 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java
index 1d8ea85..9af060a 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java
@@ -21,7 +21,6 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
@@ -32,7 +31,7 @@ import org.apache.cloudstack.api.response.VpnUsersResponse;
 import com.cloud.network.VpnUser;
 import com.cloud.utils.Pair;
 
-@APICommand(name = "listVpnUsers", description = "Lists vpn users", responseObject = VpnUsersResponse.class, entityType = {IAMEntityType.VpnUser},
+@APICommand(name = "listVpnUsers", description = "Lists vpn users", responseObject = VpnUsersResponse.class, entityType = {VpnUser.class},
         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
 public class ListVpnUsersCmd extends BaseListProjectAndAccountResourcesCmd {
     public static final Logger s_logger = Logger.getLogger(ListVpnUsersCmd.class.getName());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/api/src/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java
index 0687469..f552b14 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java
@@ -18,7 +18,6 @@ package org.apache.cloudstack.api.command.user.vpn;
 
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
@@ -31,9 +30,10 @@ import org.apache.cloudstack.api.response.SuccessResponse;
 import org.apache.cloudstack.context.CallContext;
 
 import com.cloud.event.EventTypes;
+import com.cloud.network.VpnUser;
 import com.cloud.user.Account;
 
-@APICommand(name = "removeVpnUser", description = "Removes vpn user", responseObject = SuccessResponse.class, entityType = {IAMEntityType.VpnUser},
+@APICommand(name = "removeVpnUser", description = "Removes vpn user", responseObject = SuccessResponse.class, entityType = {VpnUser.class},
         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
 public class RemoveVpnUserCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(RemoveVpnUserCmd.class.getName());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/api/src/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java
index 21eb182..75e74ad 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java
@@ -18,7 +18,6 @@ package org.apache.cloudstack.api.command.user.vpn;
 
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
@@ -34,7 +33,7 @@ import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.network.Site2SiteVpnConnection;
 import com.cloud.user.Account;
 
-@APICommand(name = "resetVpnConnection", description = "Reset site to site vpn connection", responseObject = Site2SiteVpnConnectionResponse.class, entityType = {IAMEntityType.Site2SiteVpnConnection},
+@APICommand(name = "resetVpnConnection", description = "Reset site to site vpn connection", responseObject = Site2SiteVpnConnectionResponse.class, entityType = {Site2SiteVpnConnection.class},
         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
 public class ResetVpnConnectionCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(ResetVpnConnectionCmd.class.getName());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/api/src/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java
index 9e178ef..ceb67d5 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java
@@ -18,7 +18,6 @@ package org.apache.cloudstack.api.command.user.vpn;
 
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
@@ -32,7 +31,7 @@ import org.apache.cloudstack.context.CallContext;
 import com.cloud.event.EventTypes;
 import com.cloud.network.Site2SiteCustomerGateway;
 
-@APICommand(name = "updateVpnCustomerGateway", description = "Update site to site vpn customer gateway", responseObject = Site2SiteCustomerGatewayResponse.class, entityType = {IAMEntityType.Site2SiteCustomerGateway},
+@APICommand(name = "updateVpnCustomerGateway", description = "Update site to site vpn customer gateway", responseObject = Site2SiteCustomerGatewayResponse.class, entityType = {Site2SiteCustomerGateway.class},
         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
 public class UpdateVpnCustomerGatewayCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(UpdateVpnCustomerGatewayCmd.class.getName());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/components-api/src/com/cloud/network/addr/PublicIp.java
----------------------------------------------------------------------
diff --git a/engine/components-api/src/com/cloud/network/addr/PublicIp.java b/engine/components-api/src/com/cloud/network/addr/PublicIp.java
index ff11b33..ec4a9ee 100644
--- a/engine/components-api/src/com/cloud/network/addr/PublicIp.java
+++ b/engine/components-api/src/com/cloud/network/addr/PublicIp.java
@@ -18,8 +18,6 @@ package com.cloud.network.addr;
 
 import java.util.Date;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.dc.VlanVO;
 import com.cloud.network.PublicIpAddress;
 import com.cloud.network.dao.IPAddressVO;
@@ -240,7 +238,7 @@ public class PublicIp implements PublicIpAddress {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.PublicIpAddress;
+    public Class<?> getEntityType() {
+        return PublicIpAddress.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/components-api/src/com/cloud/network/rules/StaticNatRuleImpl.java
----------------------------------------------------------------------
diff --git a/engine/components-api/src/com/cloud/network/rules/StaticNatRuleImpl.java b/engine/components-api/src/com/cloud/network/rules/StaticNatRuleImpl.java
index bdaf2bc..9a49db0 100644
--- a/engine/components-api/src/com/cloud/network/rules/StaticNatRuleImpl.java
+++ b/engine/components-api/src/com/cloud/network/rules/StaticNatRuleImpl.java
@@ -18,8 +18,6 @@ package com.cloud.network.rules;
 
 import java.util.List;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 public class StaticNatRuleImpl implements StaticNatRule {
     long id;
     String xid;
@@ -152,7 +150,7 @@ public class StaticNatRuleImpl implements StaticNatRule {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.FirewallRule;
+    public Class<?> getEntityType() {
+        return FirewallRule.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
index 6aa1e36..00c2d1a 100755
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@ -40,7 +40,6 @@ import javax.naming.ConfigurationException;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.acl.ControlledEntity.ACLType;
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
@@ -675,7 +674,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
                             _networksDao.addDomainToNetwork(id, domainId, subdomainAccess == null ? true : subdomainAccess);
                             //send event for storing the domain wide resource access
                             Map<String, Object> params = new HashMap<String, Object>();
-                            params.put(ApiConstants.ENTITY_TYPE, IAMEntityType.Network);
+                            params.put(ApiConstants.ENTITY_TYPE, Network.class);
                             params.put(ApiConstants.ENTITY_ID, id);
                             params.put(ApiConstants.DOMAIN_ID, domainId);
                             params.put(ApiConstants.SUBDOMAIN_ACCESS, subdomainAccess == null ? true : subdomainAccess);
@@ -2245,7 +2244,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
                                     _networkAccountDao.remove(networkAccount.getId());
 
                                 // remove its related ACL permission
-                                Pair<IAMEntityType, Long> networkMsg = new Pair<IAMEntityType, Long>(IAMEntityType.Network, networkFinal.getId());
+                                Pair<Class<?>, Long> networkMsg = new Pair<Class<?>, Long>(Network.class, networkFinal.getId());
                                 _messageBus.publish(_name, EntityManager.MESSAGE_REMOVE_ENTITY_EVENT, PublishScope.LOCAL, networkMsg);
                             }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/event/EventVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/event/EventVO.java b/engine/schema/src/com/cloud/event/EventVO.java
index 3ae46d6..9be37dd 100644
--- a/engine/schema/src/com/cloud/event/EventVO.java
+++ b/engine/schema/src/com/cloud/event/EventVO.java
@@ -29,8 +29,6 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
 
 @Entity
@@ -223,7 +221,7 @@ public class EventVO implements Event {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Event;
+    public Class<?> getEntityType() {
+        return Event.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/UserIpv6AddressVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/UserIpv6AddressVO.java b/engine/schema/src/com/cloud/network/UserIpv6AddressVO.java
index 9314993..397c7b3 100644
--- a/engine/schema/src/com/cloud/network/UserIpv6AddressVO.java
+++ b/engine/schema/src/com/cloud/network/UserIpv6AddressVO.java
@@ -28,8 +28,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
 
 @Entity
@@ -188,7 +186,7 @@ public class UserIpv6AddressVO implements UserIpv6Address {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.UserIpv6Address;
+    public Class<?> getEntityType() {
+        return UserIpv6Address.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/VpnUserVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/VpnUserVO.java b/engine/schema/src/com/cloud/network/VpnUserVO.java
index 695aac0..d6c4b60 100644
--- a/engine/schema/src/com/cloud/network/VpnUserVO.java
+++ b/engine/schema/src/com/cloud/network/VpnUserVO.java
@@ -27,8 +27,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.Encrypt;
 
 @Entity
@@ -129,7 +127,7 @@ public class VpnUserVO implements VpnUser {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VpnUser;
+    public Class<?> getEntityType() {
+        return VpnUser.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/as/AutoScalePolicyVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/as/AutoScalePolicyVO.java b/engine/schema/src/com/cloud/network/as/AutoScalePolicyVO.java
index bde38f8..1842533 100644
--- a/engine/schema/src/com/cloud/network/as/AutoScalePolicyVO.java
+++ b/engine/schema/src/com/cloud/network/as/AutoScalePolicyVO.java
@@ -30,7 +30,6 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.InternalIdentity;
 
 import com.cloud.utils.db.GenericDao;
@@ -153,8 +152,8 @@ public class AutoScalePolicyVO implements AutoScalePolicy, InternalIdentity {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.AutoScalePolicy;
+    public Class<?> getEntityType() {
+        return AutoScalePolicy.class;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/as/AutoScaleVmGroupVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/as/AutoScaleVmGroupVO.java b/engine/schema/src/com/cloud/network/as/AutoScaleVmGroupVO.java
index 3a05a7b..d32e7f8 100644
--- a/engine/schema/src/com/cloud/network/as/AutoScaleVmGroupVO.java
+++ b/engine/schema/src/com/cloud/network/as/AutoScaleVmGroupVO.java
@@ -30,7 +30,6 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.InternalIdentity;
 
 import com.cloud.utils.db.GenericDao;
@@ -227,7 +226,7 @@ public class AutoScaleVmGroupVO implements AutoScaleVmGroup, InternalIdentity {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.AutoScaleVmGroup;
+    public Class<?> getEntityType() {
+        return AutoScaleVmGroup.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/as/AutoScaleVmProfileVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/as/AutoScaleVmProfileVO.java b/engine/schema/src/com/cloud/network/as/AutoScaleVmProfileVO.java
index 0b59394..69e4c81 100644
--- a/engine/schema/src/com/cloud/network/as/AutoScaleVmProfileVO.java
+++ b/engine/schema/src/com/cloud/network/as/AutoScaleVmProfileVO.java
@@ -33,7 +33,6 @@ import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.Identity;
 import org.apache.cloudstack.api.InternalIdentity;
 
@@ -235,8 +234,8 @@ public class AutoScaleVmProfileVO implements AutoScaleVmProfile, Identity, Inter
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.AutoScaleVmProfile;
+    public Class<?> getEntityType() {
+        return AutoScaleVmProfile.class;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/as/ConditionVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/as/ConditionVO.java b/engine/schema/src/com/cloud/network/as/ConditionVO.java
index e8c1d0b..5035f73 100644
--- a/engine/schema/src/com/cloud/network/as/ConditionVO.java
+++ b/engine/schema/src/com/cloud/network/as/ConditionVO.java
@@ -29,7 +29,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.Identity;
 import org.apache.cloudstack.api.InternalIdentity;
 
@@ -130,8 +129,8 @@ public class ConditionVO implements Condition, Identity, InternalIdentity {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Condition;
+    public Class<?> getEntityType() {
+        return Condition.class;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/dao/IPAddressVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/IPAddressVO.java b/engine/schema/src/com/cloud/network/dao/IPAddressVO.java
index d06b8c5..de2d934 100644
--- a/engine/schema/src/com/cloud/network/dao/IPAddressVO.java
+++ b/engine/schema/src/com/cloud/network/dao/IPAddressVO.java
@@ -31,8 +31,6 @@ import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.Transient;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.network.IpAddress;
 import com.cloud.utils.net.Ip;
 
@@ -350,7 +348,7 @@ public class IPAddressVO implements IpAddress {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.IpAddress;
+    public Class<?> getEntityType() {
+        return IpAddress.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/dao/MonitoringServiceVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/MonitoringServiceVO.java b/engine/schema/src/com/cloud/network/dao/MonitoringServiceVO.java
index 999fdfc..01fba00 100644
--- a/engine/schema/src/com/cloud/network/dao/MonitoringServiceVO.java
+++ b/engine/schema/src/com/cloud/network/dao/MonitoringServiceVO.java
@@ -25,8 +25,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.network.MonitoringService;
 
 @Entity
@@ -120,7 +118,7 @@ public class MonitoringServiceVO implements MonitoringService {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.MonitorService;
+    public Class<?> getEntityType() {
+        return MonitoringService.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/dao/NetworkVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/NetworkVO.java b/engine/schema/src/com/cloud/network/dao/NetworkVO.java
index 13e8dbf..ee2692d 100644
--- a/engine/schema/src/com/cloud/network/dao/NetworkVO.java
+++ b/engine/schema/src/com/cloud/network/dao/NetworkVO.java
@@ -30,7 +30,6 @@ import javax.persistence.TableGenerator;
 import javax.persistence.Transient;
 
 import org.apache.cloudstack.acl.ControlledEntity;
-import org.apache.cloudstack.acl.IAMEntityType;
 
 import com.cloud.network.Network;
 import com.cloud.network.Networks.BroadcastDomainType;
@@ -586,7 +585,7 @@ public class NetworkVO implements Network {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Network;
+    public Class<?> getEntityType() {
+        return Network.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/dao/RemoteAccessVpnVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/RemoteAccessVpnVO.java b/engine/schema/src/com/cloud/network/dao/RemoteAccessVpnVO.java
index 8f95f18..0616939 100644
--- a/engine/schema/src/com/cloud/network/dao/RemoteAccessVpnVO.java
+++ b/engine/schema/src/com/cloud/network/dao/RemoteAccessVpnVO.java
@@ -25,8 +25,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.network.RemoteAccessVpn;
 
 @Entity
@@ -168,7 +166,7 @@ public class RemoteAccessVpnVO implements RemoteAccessVpn {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.RemoteAccessVpn;
+    public Class<?> getEntityType() {
+        return RemoteAccessVpn.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/dao/Site2SiteCustomerGatewayVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/Site2SiteCustomerGatewayVO.java b/engine/schema/src/com/cloud/network/dao/Site2SiteCustomerGatewayVO.java
index 6de4d42..5bcf361 100644
--- a/engine/schema/src/com/cloud/network/dao/Site2SiteCustomerGatewayVO.java
+++ b/engine/schema/src/com/cloud/network/dao/Site2SiteCustomerGatewayVO.java
@@ -26,8 +26,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.network.Site2SiteCustomerGateway;
 import com.cloud.utils.db.Encrypt;
 import com.cloud.utils.db.GenericDao;
@@ -211,7 +209,7 @@ public class Site2SiteCustomerGatewayVO implements Site2SiteCustomerGateway {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Site2SiteCustomerGateway;
+    public Class<?> getEntityType() {
+        return Site2SiteCustomerGateway.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/dao/Site2SiteVpnConnectionVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/Site2SiteVpnConnectionVO.java b/engine/schema/src/com/cloud/network/dao/Site2SiteVpnConnectionVO.java
index f0074c0..85643fc 100644
--- a/engine/schema/src/com/cloud/network/dao/Site2SiteVpnConnectionVO.java
+++ b/engine/schema/src/com/cloud/network/dao/Site2SiteVpnConnectionVO.java
@@ -28,7 +28,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.InternalIdentity;
 
 import com.cloud.network.Site2SiteVpnConnection;
@@ -175,7 +174,7 @@ public class Site2SiteVpnConnectionVO implements Site2SiteVpnConnection, Interna
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Site2SiteVpnConnection;
+    public Class<?> getEntityType() {
+        return Site2SiteVpnConnection.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/dao/Site2SiteVpnGatewayVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/Site2SiteVpnGatewayVO.java b/engine/schema/src/com/cloud/network/dao/Site2SiteVpnGatewayVO.java
index 33236b9..260e5fc 100644
--- a/engine/schema/src/com/cloud/network/dao/Site2SiteVpnGatewayVO.java
+++ b/engine/schema/src/com/cloud/network/dao/Site2SiteVpnGatewayVO.java
@@ -26,8 +26,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.network.Site2SiteVpnGateway;
 import com.cloud.utils.db.GenericDao;
 
@@ -133,7 +131,7 @@ public class Site2SiteVpnGatewayVO implements Site2SiteVpnGateway {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Site2SiteVpnGateway;
+    public Class<?> getEntityType() {
+        return Site2SiteVpnGateway.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/dao/SslCertVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/SslCertVO.java b/engine/schema/src/com/cloud/network/dao/SslCertVO.java
index 6ef7afd..2676d61 100644
--- a/engine/schema/src/com/cloud/network/dao/SslCertVO.java
+++ b/engine/schema/src/com/cloud/network/dao/SslCertVO.java
@@ -23,8 +23,6 @@ import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.network.lb.SslCert;
 import com.cloud.utils.db.Encrypt;
 
@@ -124,8 +122,8 @@ public class SslCertVO implements SslCert {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.SSLCert;
+    public Class<?> getEntityType() {
+        return SslCert.class;
     }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/rules/FirewallRuleVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/rules/FirewallRuleVO.java b/engine/schema/src/com/cloud/network/rules/FirewallRuleVO.java
index 5e22dd4..169102a 100644
--- a/engine/schema/src/com/cloud/network/rules/FirewallRuleVO.java
+++ b/engine/schema/src/com/cloud/network/rules/FirewallRuleVO.java
@@ -34,8 +34,6 @@ import javax.persistence.InheritanceType;
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
 import com.cloud.utils.net.NetUtils;
 
@@ -285,7 +283,7 @@ public class FirewallRuleVO implements FirewallRule {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.FirewallRule;
+    public Class<?> getEntityType() {
+        return FirewallRule.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/security/SecurityGroupVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/security/SecurityGroupVO.java b/engine/schema/src/com/cloud/network/security/SecurityGroupVO.java
index 26859f7..4a4c83a 100644
--- a/engine/schema/src/com/cloud/network/security/SecurityGroupVO.java
+++ b/engine/schema/src/com/cloud/network/security/SecurityGroupVO.java
@@ -25,8 +25,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 @Entity
 @Table(name = ("security_group"))
 public class SecurityGroupVO implements SecurityGroup {
@@ -97,7 +95,7 @@ public class SecurityGroupVO implements SecurityGroup {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.SecurityGroup;
+    public Class<?> getEntityType() {
+        return SecurityGroup.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/vpc/StaticRouteVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/StaticRouteVO.java b/engine/schema/src/com/cloud/network/vpc/StaticRouteVO.java
index a9ba051..2c2d53e 100644
--- a/engine/schema/src/com/cloud/network/vpc/StaticRouteVO.java
+++ b/engine/schema/src/com/cloud/network/vpc/StaticRouteVO.java
@@ -28,8 +28,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
 
 @Entity
@@ -139,7 +137,7 @@ public class StaticRouteVO implements StaticRoute {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.StaticRoute;
+    public Class<?> getEntityType() {
+        return StaticRoute.class;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/vpc/VpcGatewayVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/VpcGatewayVO.java b/engine/schema/src/com/cloud/network/vpc/VpcGatewayVO.java
index 48238b1..23568b4 100644
--- a/engine/schema/src/com/cloud/network/vpc/VpcGatewayVO.java
+++ b/engine/schema/src/com/cloud/network/vpc/VpcGatewayVO.java
@@ -28,8 +28,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
 
 @Entity
@@ -219,7 +217,7 @@ public class VpcGatewayVO implements VpcGateway {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VpcGateway;
+    public Class<?> getEntityType() {
+        return VpcGateway.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/network/vpc/VpcVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/vpc/VpcVO.java b/engine/schema/src/com/cloud/network/vpc/VpcVO.java
index dea8c31..a7947ac 100644
--- a/engine/schema/src/com/cloud/network/vpc/VpcVO.java
+++ b/engine/schema/src/com/cloud/network/vpc/VpcVO.java
@@ -26,8 +26,6 @@ import javax.persistence.Enumerated;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
 
 @Entity
@@ -99,8 +97,8 @@ public class VpcVO implements Vpc {
         uuid = UUID.randomUUID().toString();
         state = State.Enabled;
         this.networkDomain = networkDomain;
-        this.vpcOfferingId = vpcOffId;
-        this.usesDistributedRouter = useDistributedRouter;
+        vpcOfferingId = vpcOffId;
+        usesDistributedRouter = useDistributedRouter;
     }
 
     @Override
@@ -204,8 +202,8 @@ public class VpcVO implements Vpc {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Vpc;
+    public Class<?> getEntityType() {
+        return Vpc.class;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/projects/ProjectInvitationVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/projects/ProjectInvitationVO.java b/engine/schema/src/com/cloud/projects/ProjectInvitationVO.java
index 885c148..9775135 100644
--- a/engine/schema/src/com/cloud/projects/ProjectInvitationVO.java
+++ b/engine/schema/src/com/cloud/projects/ProjectInvitationVO.java
@@ -28,8 +28,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
 
 @Entity
@@ -149,7 +147,7 @@ public class ProjectInvitationVO implements ProjectInvitation {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.ProjectInvitation;
+    public Class<?> getEntityType() {
+        return ProjectInvitation.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/storage/SnapshotVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/SnapshotVO.java b/engine/schema/src/com/cloud/storage/SnapshotVO.java
index 4c8ceb7..dae049f 100644
--- a/engine/schema/src/com/cloud/storage/SnapshotVO.java
+++ b/engine/schema/src/com/cloud/storage/SnapshotVO.java
@@ -30,8 +30,6 @@ import javax.persistence.Table;
 
 import com.google.gson.annotations.Expose;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.utils.db.GenericDao;
 
@@ -239,7 +237,7 @@ public class SnapshotVO implements Snapshot {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Snapshot;
+    public Class<?> getEntityType() {
+        return Snapshot.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/storage/VMTemplateVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/VMTemplateVO.java b/engine/schema/src/com/cloud/storage/VMTemplateVO.java
index c0b7d0f..9a77cbf 100755
--- a/engine/schema/src/com/cloud/storage/VMTemplateVO.java
+++ b/engine/schema/src/com/cloud/storage/VMTemplateVO.java
@@ -31,8 +31,6 @@ import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.Transient;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.Storage.TemplateType;
@@ -635,7 +633,7 @@ public class VMTemplateVO implements VirtualMachineTemplate {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VirtualMachineTemplate;
+    public Class<?> getEntityType() {
+        return VirtualMachineTemplate.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/storage/VolumeVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/VolumeVO.java b/engine/schema/src/com/cloud/storage/VolumeVO.java
index af99a16..9f27c23 100755
--- a/engine/schema/src/com/cloud/storage/VolumeVO.java
+++ b/engine/schema/src/com/cloud/storage/VolumeVO.java
@@ -32,8 +32,6 @@ import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.Transient;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.storage.Storage.StoragePoolType;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.db.GenericDao;
@@ -601,7 +599,7 @@ public class VolumeVO implements Volume {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Volume;
+    public Class<?> getEntityType() {
+        return Volume.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/tags/ResourceTagVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/tags/ResourceTagVO.java b/engine/schema/src/com/cloud/tags/ResourceTagVO.java
index 6b743ff..eadddd1 100644
--- a/engine/schema/src/com/cloud/tags/ResourceTagVO.java
+++ b/engine/schema/src/com/cloud/tags/ResourceTagVO.java
@@ -27,8 +27,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.server.ResourceTag;
 
 
@@ -166,7 +164,7 @@ public class ResourceTagVO implements ResourceTag {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.ResourceTag;
+    public Class<?> getEntityType() {
+        return ResourceTag.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/user/AccountVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/user/AccountVO.java b/engine/schema/src/com/cloud/user/AccountVO.java
index 674cdb9..0f5a044 100644
--- a/engine/schema/src/com/cloud/user/AccountVO.java
+++ b/engine/schema/src/com/cloud/user/AccountVO.java
@@ -28,8 +28,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
 
 @Entity
@@ -190,7 +188,7 @@ public class AccountVO implements Account {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Account;
+    public Class<?> getEntityType() {
+        return Account.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/user/SSHKeyPairVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/user/SSHKeyPairVO.java b/engine/schema/src/com/cloud/user/SSHKeyPairVO.java
index 4dc03c4..fd7173e 100644
--- a/engine/schema/src/com/cloud/user/SSHKeyPairVO.java
+++ b/engine/schema/src/com/cloud/user/SSHKeyPairVO.java
@@ -24,8 +24,6 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 @Entity
 @Table(name = "ssh_keypairs")
 public class SSHKeyPairVO implements SSHKeyPair {
@@ -117,7 +115,7 @@ public class SSHKeyPairVO implements SSHKeyPair {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.SSHKeyPair;
+    public Class<?> getEntityType() {
+        return SSHKeyPair.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/vm/InstanceGroupVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/InstanceGroupVO.java b/engine/schema/src/com/cloud/vm/InstanceGroupVO.java
index 9b463d3..395751b 100644
--- a/engine/schema/src/com/cloud/vm/InstanceGroupVO.java
+++ b/engine/schema/src/com/cloud/vm/InstanceGroupVO.java
@@ -28,8 +28,6 @@ import javax.persistence.PrimaryKeyJoinColumn;
 import javax.persistence.SecondaryTable;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
 
 @Entity
@@ -120,7 +118,7 @@ public class InstanceGroupVO implements InstanceGroup {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.InstanceGroup;
+    public Class<?> getEntityType() {
+        return InstanceGroup.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/vm/VMInstanceVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/VMInstanceVO.java b/engine/schema/src/com/cloud/vm/VMInstanceVO.java
index ddeebfe..c7206d0 100644
--- a/engine/schema/src/com/cloud/vm/VMInstanceVO.java
+++ b/engine/schema/src/com/cloud/vm/VMInstanceVO.java
@@ -36,8 +36,6 @@ import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.Transient;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.utils.db.Encrypt;
 import com.cloud.utils.db.GenericDao;
@@ -506,8 +504,8 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VirtualMachine;
+    public Class<?> getEntityType() {
+        return VirtualMachine.class;
     }
 
     public VirtualMachine.PowerState getPowerState() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/vm/dao/NicIpAliasVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/NicIpAliasVO.java b/engine/schema/src/com/cloud/vm/dao/NicIpAliasVO.java
index 3df9909..2f000fd 100644
--- a/engine/schema/src/com/cloud/vm/dao/NicIpAliasVO.java
+++ b/engine/schema/src/com/cloud/vm/dao/NicIpAliasVO.java
@@ -28,8 +28,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
 import com.cloud.utils.net.NetUtils;
 import com.cloud.vm.NicIpAlias;
@@ -235,7 +233,7 @@ public class NicIpAliasVO implements NicIpAlias  {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.NicIpAlias;
+    public Class<?> getEntityType() {
+        return NicIpAlias.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/vm/dao/NicSecondaryIpVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/NicSecondaryIpVO.java b/engine/schema/src/com/cloud/vm/dao/NicSecondaryIpVO.java
index 995da17..f8730aa 100644
--- a/engine/schema/src/com/cloud/vm/dao/NicSecondaryIpVO.java
+++ b/engine/schema/src/com/cloud/vm/dao/NicSecondaryIpVO.java
@@ -26,8 +26,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
 import com.cloud.vm.NicSecondaryIp;
 
@@ -128,7 +126,7 @@ public class NicSecondaryIpVO implements NicSecondaryIp {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.NicSecondaryIp;
+    public Class<?> getEntityType() {
+        return NicSecondaryIp.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/com/cloud/vm/snapshot/VMSnapshotVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/snapshot/VMSnapshotVO.java b/engine/schema/src/com/cloud/vm/snapshot/VMSnapshotVO.java
index 042b276..df2966d 100644
--- a/engine/schema/src/com/cloud/vm/snapshot/VMSnapshotVO.java
+++ b/engine/schema/src/com/cloud/vm/snapshot/VMSnapshotVO.java
@@ -33,7 +33,6 @@ import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.Transient;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.engine.subsystem.api.storage.VMSnapshotOptions;
 
 import com.cloud.utils.db.GenericDao;
@@ -246,7 +245,7 @@ public class VMSnapshotVO implements VMSnapshot {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VMSnapshot;
+    public Class<?> getEntityType() {
+        return VMSnapshot.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/affinity/AffinityGroupVO.java b/engine/schema/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
index b9fda8e..03274ad 100644
--- a/engine/schema/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
+++ b/engine/schema/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
@@ -28,7 +28,6 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 
 import org.apache.cloudstack.acl.ControlledEntity;
-import org.apache.cloudstack.acl.IAMEntityType;
 
 @Entity
 @Table(name = ("affinity_group"))
@@ -126,8 +125,8 @@ public class AffinityGroupVO implements AffinityGroup {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.AffinityGroup;
+    public Class<?> getEntityType() {
+        return AffinityGroup.class;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMEntityVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMEntityVO.java b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMEntityVO.java
index 7403d62..ced2f22 100644
--- a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMEntityVO.java
+++ b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMEntityVO.java
@@ -37,8 +37,6 @@ import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.Transient;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.utils.db.Encrypt;
 import com.cloud.utils.db.GenericDao;
@@ -538,7 +536,7 @@ public class VMEntityVO implements VirtualMachine, FiniteStateObject<State, Virt
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VirtualMachine;
+    public Class<?> getEntityType() {
+        return VirtualMachine.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/schema/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancerRuleVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancerRuleVO.java b/engine/schema/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancerRuleVO.java
index a37fec2..88cd000 100644
--- a/engine/schema/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancerRuleVO.java
+++ b/engine/schema/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancerRuleVO.java
@@ -28,8 +28,6 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.region.ha.GlobalLoadBalancerRule;
 
 @Entity
@@ -191,7 +189,7 @@ public class GlobalLoadBalancerRuleVO implements GlobalLoadBalancerRule {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.GlobalLoadBalancerRule;
+    public Class<?> getEntityType() {
+        return GlobalLoadBalancerRule.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/storage/image/src/org/apache/cloudstack/storage/image/store/TemplateObject.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/TemplateObject.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/TemplateObject.java
index bd14df5..7288d45 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/TemplateObject.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/TemplateObject.java
@@ -23,7 +23,8 @@ import java.util.Map;
 
 import javax.inject.Inject;
 
-import org.apache.cloudstack.acl.IAMEntityType;
+import org.apache.log4j.Logger;
+
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
@@ -35,7 +36,6 @@ import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
 import org.apache.cloudstack.storage.to.TemplateObjectTO;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.to.DataObjectType;
@@ -50,6 +50,7 @@ import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
 import com.cloud.storage.VMTemplateVO;
 import com.cloud.storage.dao.VMTemplateDao;
 import com.cloud.storage.dao.VMTemplatePoolDao;
+import com.cloud.template.VirtualMachineTemplate;
 import com.cloud.utils.component.ComponentContext;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.fsm.NoTransitionException;
@@ -452,7 +453,7 @@ public class TemplateObject implements TemplateInfo {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VirtualMachineTemplate;
+    public Class<?> getEntityType() {
+        return VirtualMachineTemplate.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
----------------------------------------------------------------------
diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
index a8f1a56..da8d341 100644
--- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
+++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
@@ -24,7 +24,6 @@ import javax.inject.Inject;
 
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
@@ -383,7 +382,7 @@ public class SnapshotObject implements SnapshotInfo {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Snapshot;
+    public Class<?> getEntityType() {
+        return Snapshot.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
index fde13e1..c1aa8c2 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
@@ -23,7 +23,6 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.engine.cloud.entity.api.TemplateEntity;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
 import org.apache.cloudstack.storage.image.datastore.ImageStoreInfo;
@@ -31,6 +30,7 @@ import org.apache.cloudstack.storage.image.datastore.ImageStoreInfo;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.Storage.TemplateType;
+import com.cloud.template.VirtualMachineTemplate;
 
 public class TemplateEntityImpl implements TemplateEntity {
     protected TemplateInfo templateInfo;
@@ -287,7 +287,7 @@ public class TemplateEntityImpl implements TemplateEntity {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VirtualMachineTemplate;
+    public Class<?> getEntityType() {
+        return VirtualMachineTemplate.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/storage/src/org/apache/cloudstack/storage/snapshot/SnapshotEntityImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/snapshot/SnapshotEntityImpl.java b/engine/storage/src/org/apache/cloudstack/storage/snapshot/SnapshotEntityImpl.java
index 848b165..a660f41 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/snapshot/SnapshotEntityImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/snapshot/SnapshotEntityImpl.java
@@ -21,10 +21,10 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.engine.cloud.entity.api.SnapshotEntity;
 
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
+import com.cloud.storage.Snapshot;
 
 public class SnapshotEntityImpl implements SnapshotEntity {
 
@@ -185,7 +185,7 @@ public class SnapshotEntityImpl implements SnapshotEntity {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Snapshot;
+    public Class<?> getEntityType() {
+        return Snapshot.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
index 1f05be2..385f8e6 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
@@ -22,7 +22,6 @@ import javax.inject.Inject;
 
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
@@ -670,7 +669,7 @@ public class VolumeObject implements VolumeInfo {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Volume;
+    public Class<?> getEntityType() {
+        return Volume.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java b/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
index f659ed9..bcd0fdc 100644
--- a/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
@@ -24,7 +24,7 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 
 import org.apache.cloudstack.acl.ControlledEntity;
-import org.apache.cloudstack.acl.IAMEntityType;
+import org.apache.cloudstack.affinity.AffinityGroup;
 
 import com.cloud.vm.VirtualMachine;
 
@@ -194,8 +194,8 @@ public class AffinityGroupJoinVO extends BaseViewVO implements ControlledViewEnt
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.AffinityGroup;
+    public Class<?> getEntityType() {
+        return AffinityGroup.class;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/query/vo/AsyncJobJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/AsyncJobJoinVO.java b/server/src/com/cloud/api/query/vo/AsyncJobJoinVO.java
index 7889b76..be85c2a 100644
--- a/server/src/com/cloud/api/query/vo/AsyncJobJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/AsyncJobJoinVO.java
@@ -25,8 +25,8 @@ import javax.persistence.Enumerated;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.ApiCommandJobType;
+import org.apache.cloudstack.framework.jobs.AsyncJob;
 
 import com.cloud.utils.db.GenericDao;
 
@@ -203,8 +203,8 @@ public class AsyncJobJoinVO extends BaseViewVO implements ControlledViewEntity {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.AsyncJob;
+    public Class<?> getEntityType() {
+        return AsyncJob.class;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
index ac32859..79eb3bf 100644
--- a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
@@ -26,13 +26,12 @@ import javax.persistence.Enumerated;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.network.Network.GuestType;
 import com.cloud.network.Networks.TrafficType;
 import com.cloud.network.router.VirtualRouter;
 import com.cloud.network.router.VirtualRouter.RedundantState;
 import com.cloud.utils.db.GenericDao;
+import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachine.State;
 
 @Entity
@@ -514,7 +513,7 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VirtualMachine;
+    public Class<?> getEntityType() {
+        return VirtualMachine.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/query/vo/EventJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/EventJoinVO.java b/server/src/com/cloud/api/query/vo/EventJoinVO.java
index b6b023e..8fba938 100644
--- a/server/src/com/cloud/api/query/vo/EventJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/EventJoinVO.java
@@ -25,8 +25,7 @@ import javax.persistence.Enumerated;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
+import com.cloud.event.Event;
 import com.cloud.event.Event.State;
 import com.cloud.utils.db.GenericDao;
 
@@ -227,7 +226,7 @@ public class EventJoinVO extends BaseViewVO implements ControlledViewEntity {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Event;
+    public Class<?> getEntityType() {
+        return Event.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/query/vo/InstanceGroupJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/InstanceGroupJoinVO.java b/server/src/com/cloud/api/query/vo/InstanceGroupJoinVO.java
index 98d1a52..857cebf 100644
--- a/server/src/com/cloud/api/query/vo/InstanceGroupJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/InstanceGroupJoinVO.java
@@ -23,9 +23,8 @@ import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.utils.db.GenericDao;
+import com.cloud.vm.InstanceGroup;
 
 @Entity
 @Table(name = "instance_group_view")
@@ -160,7 +159,7 @@ public class InstanceGroupJoinVO extends BaseViewVO implements ControlledViewEnt
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.InstanceGroup;
+    public Class<?> getEntityType() {
+        return InstanceGroup.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/query/vo/ProjectInvitationJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/ProjectInvitationJoinVO.java b/server/src/com/cloud/api/query/vo/ProjectInvitationJoinVO.java
index ba619a9..8b49185 100644
--- a/server/src/com/cloud/api/query/vo/ProjectInvitationJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/ProjectInvitationJoinVO.java
@@ -25,8 +25,7 @@ import javax.persistence.Enumerated;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
+import com.cloud.projects.ProjectInvitation;
 import com.cloud.projects.ProjectInvitation.State;
 import com.cloud.utils.db.GenericDao;
 
@@ -164,7 +163,7 @@ public class ProjectInvitationJoinVO extends BaseViewVO implements ControlledVie
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.ProjectInvitation;
+    public Class<?> getEntityType() {
+        return ProjectInvitation.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/query/vo/ResourceTagJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/ResourceTagJoinVO.java b/server/src/com/cloud/api/query/vo/ResourceTagJoinVO.java
index e1b8b81..2c1ff47 100644
--- a/server/src/com/cloud/api/query/vo/ResourceTagJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/ResourceTagJoinVO.java
@@ -23,8 +23,7 @@ import javax.persistence.Enumerated;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
+import com.cloud.server.ResourceTag;
 import com.cloud.server.ResourceTag.ResourceObjectType;
 
 @Entity
@@ -182,7 +181,7 @@ public class ResourceTagJoinVO extends BaseViewVO implements ControlledViewEntit
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.ResourceTag;
+    public Class<?> getEntityType() {
+        return ResourceTag.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java b/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java
index 3c9e3bf..69604e8 100644
--- a/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/SecurityGroupJoinVO.java
@@ -23,8 +23,7 @@ import javax.persistence.Enumerated;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
+import com.cloud.network.security.SecurityGroup;
 import com.cloud.network.security.SecurityRule.SecurityRuleType;
 import com.cloud.server.ResourceTag.ResourceObjectType;
 
@@ -306,7 +305,7 @@ public class SecurityGroupJoinVO extends BaseViewVO implements ControlledViewEnt
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.SecurityGroup;
+    public Class<?> getEntityType() {
+        return SecurityGroup.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/query/vo/TemplateJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/TemplateJoinVO.java b/server/src/com/cloud/api/query/vo/TemplateJoinVO.java
index de0da2f..834a9ce 100644
--- a/server/src/com/cloud/api/query/vo/TemplateJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/TemplateJoinVO.java
@@ -27,7 +27,6 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
 
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
@@ -35,6 +34,7 @@ import com.cloud.server.ResourceTag.ResourceObjectType;
 import com.cloud.storage.ScopeType;
 import com.cloud.storage.Storage;
 import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
+import com.cloud.template.VirtualMachineTemplate;
 import com.cloud.template.VirtualMachineTemplate.State;
 import com.cloud.utils.db.GenericDao;
 
@@ -544,7 +544,7 @@ public class TemplateJoinVO extends BaseViewVO implements ControlledViewEntity {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VirtualMachineTemplate;
+    public Class<?> getEntityType() {
+        return VirtualMachineTemplate.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
index fcee393..f3f48fc 100644
--- a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
@@ -28,8 +28,6 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.network.Network.GuestType;
 import com.cloud.network.Networks.TrafficType;
@@ -913,7 +911,7 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VirtualMachine;
+    public Class<?> getEntityType() {
+        return VirtualMachine.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
index 289b0b8..8165d68 100644
--- a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
@@ -27,8 +27,6 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 
-import org.apache.cloudstack.acl.IAMEntityType;
-
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.server.ResourceTag.ResourceObjectType;
 import com.cloud.storage.Storage;
@@ -578,7 +576,7 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.Volume;
+    public Class<?> getEntityType() {
+        return Volume.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/api/response/SecurityGroupResultObject.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/response/SecurityGroupResultObject.java b/server/src/com/cloud/api/response/SecurityGroupResultObject.java
index 66ba487..c2cd423 100644
--- a/server/src/com/cloud/api/response/SecurityGroupResultObject.java
+++ b/server/src/com/cloud/api/response/SecurityGroupResultObject.java
@@ -22,7 +22,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.cloudstack.acl.ControlledEntity;
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.InternalIdentity;
 
 import com.cloud.api.ApiDBUtils;
@@ -212,7 +211,7 @@ public class SecurityGroupResultObject implements ControlledEntity, InternalIden
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.SecurityGroup;
+    public Class<?> getEntityType() {
+        return SecurityGroup.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java b/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java
index b912e22..3dc984e 100644
--- a/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java
+++ b/server/src/com/cloud/network/vpc/PrivateGatewayProfile.java
@@ -16,7 +16,6 @@
 // under the License.
 package com.cloud.network.vpc;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 
 public class PrivateGatewayProfile implements PrivateGateway {
     VpcGateway vpcGateway;
@@ -113,7 +112,7 @@ public class PrivateGatewayProfile implements PrivateGateway {
     }
 
     @Override
-    public IAMEntityType getEntityType() {
-        return IAMEntityType.VpcGateway;
+    public Class<?> getEntityType() {
+        return VpcGateway.class;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/template/HypervisorTemplateAdapter.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/HypervisorTemplateAdapter.java b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
index 2b6f1eb..9d52b39 100755
--- a/server/src/com/cloud/template/HypervisorTemplateAdapter.java
+++ b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
@@ -29,7 +29,6 @@ import javax.inject.Inject;
 
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.api.command.user.iso.DeleteIsoCmd;
 import org.apache.cloudstack.api.command.user.iso.RegisterIsoCmd;
 import org.apache.cloudstack.api.command.user.template.DeleteTemplateCmd;
@@ -423,7 +422,7 @@ public class HypervisorTemplateAdapter extends TemplateAdapterBase {
             }
 
             // remove its related ACL permission
-            Pair<IAMEntityType, Long> tmplt = new Pair<IAMEntityType, Long>(IAMEntityType.VirtualMachineTemplate, template.getId());
+            Pair<Class<?>, Long> tmplt = new Pair<Class<?>, Long>(VirtualMachineTemplate.class, template.getId());
             _messageBus.publish(_name, EntityManager.MESSAGE_REMOVE_ENTITY_EVENT, PublishScope.LOCAL, tmplt);
 
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/com/cloud/template/TemplateManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java b/server/src/com/cloud/template/TemplateManagerImpl.java
index 34123cd..81dc198 100755
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@ -33,7 +33,6 @@ import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.acl.SecurityChecker.AccessType;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseListTemplateOrIsoPermissionsCmd;
@@ -1304,7 +1303,7 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
 
             // add ACL permission in IAM
             Map<String, Object> permit = new HashMap<String, Object>();
-            permit.put(ApiConstants.ENTITY_TYPE, IAMEntityType.VirtualMachineTemplate.toString());
+            permit.put(ApiConstants.ENTITY_TYPE, VirtualMachineTemplate.class);
             permit.put(ApiConstants.ENTITY_ID, id);
             permit.put(ApiConstants.ACCESS_TYPE, AccessType.UseEntry);
             permit.put(ApiConstants.IAM_ACTION, "listTemplates");
@@ -1321,7 +1320,7 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
             _launchPermissionDao.removePermissions(id, accountIds);
             // remove ACL permission in IAM
             Map<String, Object> permit = new HashMap<String, Object>();
-            permit.put(ApiConstants.ENTITY_TYPE, IAMEntityType.VirtualMachineTemplate.toString());
+            permit.put(ApiConstants.ENTITY_TYPE, VirtualMachineTemplate.class);
             permit.put(ApiConstants.ENTITY_ID, id);
             permit.put(ApiConstants.ACCESS_TYPE, AccessType.UseEntry);
             permit.put(ApiConstants.IAM_ACTION, "listTemplates");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
index f375fde..8e606ca 100644
--- a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
+++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
@@ -28,7 +28,6 @@ import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.acl.ControlledEntity;
 import org.apache.cloudstack.acl.ControlledEntity.ACLType;
 import org.apache.cloudstack.acl.SecurityChecker.AccessType;
@@ -218,7 +217,7 @@ public class AffinityGroupServiceImpl extends ManagerBase implements AffinityGro
                     _affinityGroupDomainMapDao.persist(domainMap);
                     //send event for storing the domain wide resource access
                     Map<String, Object> params = new HashMap<String, Object>();
-                    params.put(ApiConstants.ENTITY_TYPE, IAMEntityType.AffinityGroup);
+                    params.put(ApiConstants.ENTITY_TYPE, AffinityGroup.class);
                     params.put(ApiConstants.ENTITY_ID, group.getId());
                     params.put(ApiConstants.DOMAIN_ID, domainId);
                     params.put(ApiConstants.SUBDOMAIN_ACCESS, subDomainAccess);
@@ -300,7 +299,7 @@ public class AffinityGroupServiceImpl extends ManagerBase implements AffinityGro
                         _affinityGroupDomainMapDao.remove(groupDomain.getId());
                     }
                     // remove its related ACL permission
-                    Pair<IAMEntityType, Long> params = new Pair<IAMEntityType, Long>(IAMEntityType.AffinityGroup, affinityGroupIdFinal);
+                    Pair<Class<?>, Long> params = new Pair<Class<?>, Long>(AffinityGroup.class, affinityGroupIdFinal);
                     _messageBus.publish(_name, EntityManager.MESSAGE_REMOVE_ENTITY_EVENT, PublishScope.LOCAL, params);
                 }
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae1d6a77/services/iam/plugin/src/org/apache/cloudstack/api/response/iam/IAMPermissionResponse.java
----------------------------------------------------------------------
diff --git a/services/iam/plugin/src/org/apache/cloudstack/api/response/iam/IAMPermissionResponse.java b/services/iam/plugin/src/org/apache/cloudstack/api/response/iam/IAMPermissionResponse.java
index 5def248..046e1f4 100644
--- a/services/iam/plugin/src/org/apache/cloudstack/api/response/iam/IAMPermissionResponse.java
+++ b/services/iam/plugin/src/org/apache/cloudstack/api/response/iam/IAMPermissionResponse.java
@@ -18,7 +18,6 @@ package org.apache.cloudstack.api.response.iam;
 
 import com.google.gson.annotations.SerializedName;
 
-import org.apache.cloudstack.acl.IAMEntityType;
 import org.apache.cloudstack.acl.PermissionScope;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseResponse;
@@ -34,7 +33,7 @@ public class IAMPermissionResponse extends BaseResponse {
 
     @SerializedName(ApiConstants.ENTITY_TYPE)
     @Param(description = "the entity type of this permission")
-    private IAMEntityType entityType;
+    private String entityType;
 
     @SerializedName(ApiConstants.IAM_SCOPE)
     @Param(description = "scope of this permission")
@@ -48,11 +47,11 @@ public class IAMPermissionResponse extends BaseResponse {
     @Param(description = "allow or deny of this permission")
     private IAMPolicyPermission.Permission permission;
 
-    public IAMEntityType getEntityType() {
+    public String getEntityType() {
         return entityType;
     }
 
-    public void setEntityType(IAMEntityType entityType) {
+    public void setEntityType(String entityType) {
         this.entityType = entityType;
     }
 


Mime
View raw message