Skip to content

Commit ae1d6a7

Browse files
committed
Remove IAMEntityType to use existing VO interface class to annotate
entityType.
1 parent dadaf85 commit ae1d6a7

220 files changed

Lines changed: 479 additions & 715 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/src/com/cloud/network/NetworkProfile.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
import java.net.URI;
2020

21-
import org.apache.cloudstack.acl.IAMEntityType;
22-
2321
import com.cloud.network.Networks.BroadcastDomainType;
2422
import com.cloud.network.Networks.Mode;
2523
import com.cloud.network.Networks.TrafficType;
@@ -279,7 +277,7 @@ public String getIp6Cidr() {
279277
}
280278

281279
@Override
282-
public IAMEntityType getEntityType() {
283-
return IAMEntityType.Network;
280+
public Class<?> getEntityType() {
281+
return Network.class;
284282
}
285283
}

api/src/com/cloud/network/vpc/StaticRouteProfile.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// under the License.
1717
package com.cloud.network.vpc;
1818

19-
import org.apache.cloudstack.acl.IAMEntityType;
2019

2120
public class StaticRouteProfile implements StaticRoute {
2221
private long id;
@@ -104,7 +103,7 @@ public String getNetmask() {
104103
}
105104

106105
@Override
107-
public IAMEntityType getEntityType() {
108-
return IAMEntityType.StaticRoute;
106+
public Class<?> getEntityType() {
107+
return StaticRoute.class;
109108
}
110109
}

api/src/org/apache/cloudstack/acl/ControlledEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ public enum ACLType {
2929
Account, Domain
3030
}
3131

32-
IAMEntityType getEntityType();
32+
Class<?> getEntityType();
3333
}

api/src/org/apache/cloudstack/acl/IAMEntityType.java

Lines changed: 0 additions & 61 deletions
This file was deleted.

api/src/org/apache/cloudstack/api/APICommand.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import java.lang.annotation.RetentionPolicy;
2323
import java.lang.annotation.Target;
2424

25-
import org.apache.cloudstack.acl.IAMEntityType;
2625
import org.apache.cloudstack.acl.RoleType;
2726
import org.apache.cloudstack.api.ResponseObject.ResponseView;
2827

@@ -49,5 +48,5 @@
4948

5049
RoleType[] authorized() default {};
5150

52-
IAMEntityType[] entityType() default {};
51+
Class<?>[] entityType() default {};
5352
}

api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import org.apache.log4j.Logger;
2323

24-
import org.apache.cloudstack.acl.IAMEntityType;
2524
import org.apache.cloudstack.api.APICommand;
2625
import org.apache.cloudstack.api.ApiConstants;
2726
import org.apache.cloudstack.api.ApiErrorCode;
@@ -37,7 +36,7 @@
3736
import com.cloud.user.UserAccount;
3837

3938

40-
@APICommand(name = "createAccount", description = "Creates an account", responseObject = AccountResponse.class, entityType = {IAMEntityType.Account},
39+
@APICommand(name = "createAccount", description = "Creates an account", responseObject = AccountResponse.class, entityType = {Account.class},
4140
requestHasSensitiveInfo = true, responseHasSensitiveInfo = true)
4241
public class CreateAccountCmd extends BaseCmd {
4342
public static final Logger s_logger = Logger.getLogger(CreateAccountCmd.class.getName());

api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import org.apache.log4j.Logger;
2222

23-
import org.apache.cloudstack.acl.IAMEntityType;
2423
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
2524
import org.apache.cloudstack.api.ACL;
2625
import org.apache.cloudstack.api.APICommand;
@@ -39,7 +38,7 @@
3938
import com.cloud.user.Account;
4039
import com.cloud.user.User;
4140

42-
@APICommand(name = "deleteAccount", description = "Deletes a account, and all users associated with this account", responseObject = SuccessResponse.class, entityType = {IAMEntityType.Account},
41+
@APICommand(name = "deleteAccount", description = "Deletes a account, and all users associated with this account", responseObject = SuccessResponse.class, entityType = {Account.class},
4342
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
4443
public class DeleteAccountCmd extends BaseAsyncCmd {
4544
public static final Logger s_logger = Logger.getLogger(DeleteAccountCmd.class.getName());

api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import org.apache.log4j.Logger;
2222

23-
import org.apache.cloudstack.acl.IAMEntityType;
2423
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
2524
import org.apache.cloudstack.api.ACL;
2625
import org.apache.cloudstack.api.APICommand;
@@ -41,7 +40,7 @@
4140
import com.cloud.exception.ResourceUnavailableException;
4241
import com.cloud.user.Account;
4342

44-
@APICommand(name = "disableAccount", description = "Disables an account", responseObject = AccountResponse.class, entityType = {IAMEntityType.Account},
43+
@APICommand(name = "disableAccount", description = "Disables an account", responseObject = AccountResponse.class, entityType = {Account.class},
4544
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
4645
public class DisableAccountCmd extends BaseAsyncCmd {
4746
public static final Logger s_logger = Logger.getLogger(DisableAccountCmd.class.getName());

api/src/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import org.apache.log4j.Logger;
2222

23-
import org.apache.cloudstack.acl.IAMEntityType;
2423
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
2524
import org.apache.cloudstack.api.ACL;
2625
import org.apache.cloudstack.api.APICommand;
@@ -36,7 +35,7 @@
3635

3736
import com.cloud.user.Account;
3837

39-
@APICommand(name = "enableAccount", description = "Enables an account", responseObject = AccountResponse.class, entityType = {IAMEntityType.Account},
38+
@APICommand(name = "enableAccount", description = "Enables an account", responseObject = AccountResponse.class, entityType = {Account.class},
4039
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
4140
public class EnableAccountCmd extends BaseCmd {
4241
public static final Logger s_logger = Logger.getLogger(EnableAccountCmd.class.getName());

api/src/org/apache/cloudstack/api/command/admin/account/LockAccountCmd.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import org.apache.log4j.Logger;
2020

21-
import org.apache.cloudstack.acl.IAMEntityType;
2221
import org.apache.cloudstack.api.APICommand;
2322
import org.apache.cloudstack.api.ApiConstants;
2423
import org.apache.cloudstack.api.BaseCmd;
@@ -28,7 +27,7 @@
2827

2928
import com.cloud.user.Account;
3029

31-
@APICommand(name = "lockAccount", description = "Locks an account", responseObject = AccountResponse.class, entityType = {IAMEntityType.Account},
30+
@APICommand(name = "lockAccount", description = "Locks an account", responseObject = AccountResponse.class, entityType = {Account.class},
3231
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
3332
public class LockAccountCmd extends BaseCmd {
3433
public static final Logger s_logger = Logger.getLogger(LockAccountCmd.class.getName());

0 commit comments

Comments
 (0)