mirror of https://github.com/apache/cloudstack.git
ListSecurityGroupCmd should have the EntityType added to the command
This commit is contained in:
parent
1d98ef9821
commit
4a30102ca8
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue