cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject git commit: updated refs/heads/rbac to 4a30102
Date Sat, 25 Jan 2014 02:00:00 GMT
Updated Branches:
  refs/heads/rbac 1d98ef982 -> 4a30102ca


ListSecurityGroupCmd should have the EntityType added to the command


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4a30102c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4a30102c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4a30102c

Branch: refs/heads/rbac
Commit: 4a30102ca813310d629ec154cabab66b5125b5f0
Parents: 1d98ef9
Author: Prachi Damle <prachi@cloud.com>
Authored: Fri Jan 24 17:58:35 2014 -0800
Committer: Prachi Damle <prachi@cloud.com>
Committed: Fri Jan 24 17:58:35 2014 -0800

----------------------------------------------------------------------
 .../api/command/user/securitygroup/ListSecurityGroupsCmd.java | 3 ++-
 .../cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java | 3 ++-
 .../cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java | 6 +++++-
 .../cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java  | 3 ++-
 .../cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java | 7 +++++--
 5 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a30102c/api/src/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java
b/api/src/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java
index ae745b3..bb66d7d 100644
--- a/api/src/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java
@@ -18,6 +18,7 @@ package org.apache.cloudstack.api.command.user.securitygroup;
 
 import org.apache.log4j.Logger;
 
+import org.apache.cloudstack.acl.AclEntityType;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.ApiConstants;
@@ -27,7 +28,7 @@ import org.apache.cloudstack.api.response.ListResponse;
 import org.apache.cloudstack.api.response.SecurityGroupResponse;
 import org.apache.cloudstack.api.response.UserVmResponse;
 
-@APICommand(name = "listSecurityGroups", description = "Lists security groups", responseObject
= SecurityGroupResponse.class)
+@APICommand(name = "listSecurityGroups", description = "Lists security groups", responseObject
= SecurityGroupResponse.class, entityType = { AclEntityType.SecurityGroup })
 public class ListSecurityGroupsCmd extends BaseListTaggedResourcesCmd {
     public static final Logger s_logger = Logger.getLogger(ListSecurityGroupsCmd.class.getName());
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a30102c/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java
b/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java
index 937fca3..07dd3d9 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java
@@ -18,6 +18,7 @@ package org.apache.cloudstack.api.command.user.vmgroup;
 
 import org.apache.log4j.Logger;
 
+import org.apache.cloudstack.acl.AclEntityType;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
@@ -31,7 +32,7 @@ import org.apache.cloudstack.context.CallContext;
 
 import com.cloud.vm.InstanceGroup;
 
-@APICommand(name = "createInstanceGroup", description = "Creates a vm group", responseObject
= InstanceGroupResponse.class)
+@APICommand(name = "createInstanceGroup", description = "Creates a vm group", responseObject
= InstanceGroupResponse.class, entityType = { AclEntityType.InstanceGroup })
 public class CreateVMGroupCmd extends BaseCmd {
     public static final Logger s_logger = Logger.getLogger(CreateVMGroupCmd.class.getName());
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a30102c/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java
b/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java
index fbfb85a..08ea4b0 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java
@@ -18,6 +18,9 @@ package org.apache.cloudstack.api.command.user.vmgroup;
 
 import org.apache.log4j.Logger;
 
+import org.apache.cloudstack.acl.AclEntityType;
+import org.apache.cloudstack.acl.SecurityChecker.AccessType;
+import org.apache.cloudstack.api.ACL;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
@@ -30,7 +33,7 @@ import org.apache.cloudstack.api.response.SuccessResponse;
 import com.cloud.user.Account;
 import com.cloud.vm.InstanceGroup;
 
-@APICommand(name = "deleteInstanceGroup", description = "Deletes a vm group", responseObject
= SuccessResponse.class)
+@APICommand(name = "deleteInstanceGroup", description = "Deletes a vm group", responseObject
= SuccessResponse.class, entityType = { AclEntityType.InstanceGroup })
 public class DeleteVMGroupCmd extends BaseCmd {
     public static final Logger s_logger = Logger.getLogger(DeleteVMGroupCmd.class.getName());
     private static final String s_name = "deleteinstancegroupresponse";
@@ -39,6 +42,7 @@ public class DeleteVMGroupCmd extends BaseCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
+    @ACL(accessType = AccessType.OperateEntry)
     @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class,
required = true, description = "the ID of the instance group")
     private Long id;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a30102c/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java
index fda3e88..5e5e3c6 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java
@@ -18,6 +18,7 @@ package org.apache.cloudstack.api.command.user.vmgroup;
 
 import org.apache.log4j.Logger;
 
+import org.apache.cloudstack.acl.AclEntityType;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
@@ -25,7 +26,7 @@ import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.response.InstanceGroupResponse;
 import org.apache.cloudstack.api.response.ListResponse;
 
-@APICommand(name = "listInstanceGroups", description = "Lists vm groups", responseObject
= InstanceGroupResponse.class)
+@APICommand(name = "listInstanceGroups", description = "Lists vm groups", responseObject
= InstanceGroupResponse.class, entityType = { AclEntityType.InstanceGroup })
 public class ListVMGroupsCmd extends BaseListProjectAndAccountResourcesCmd {
     public static final Logger s_logger = Logger.getLogger(ListVMGroupsCmd.class.getName());
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a30102c/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java
b/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java
index 1930bd8..179b536 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java
@@ -18,6 +18,9 @@ package org.apache.cloudstack.api.command.user.vmgroup;
 
 import org.apache.log4j.Logger;
 
+import org.apache.cloudstack.acl.AclEntityType;
+import org.apache.cloudstack.acl.SecurityChecker.AccessType;
+import org.apache.cloudstack.api.ACL;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
@@ -29,7 +32,7 @@ import org.apache.cloudstack.api.response.InstanceGroupResponse;
 import com.cloud.user.Account;
 import com.cloud.vm.InstanceGroup;
 
-@APICommand(name = "updateInstanceGroup", description = "Updates a vm group", responseObject
= InstanceGroupResponse.class)
+@APICommand(name = "updateInstanceGroup", description = "Updates a vm group", responseObject
= InstanceGroupResponse.class, entityType = { AclEntityType.InstanceGroup })
 public class UpdateVMGroupCmd extends BaseCmd {
 
     private static final String s_name = "updateinstancegroupresponse";
@@ -38,7 +41,7 @@ public class UpdateVMGroupCmd extends BaseCmd {
     /////////////////////////////////////////////////////
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
-
+    @ACL(accessType = AccessType.OperateEntry)
     @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class,
required = true, description = "Instance group ID")
     private Long id;
 


Mime
View raw message