mirror of https://github.com/apache/cloudstack.git
@ACl and @EntityType annotations for: AffinityGroup, AutoScale, Events
This commit is contained in:
parent
d47d4bbd20
commit
695de1eaed
|
|
@ -19,7 +19,9 @@ package org.apache.cloudstack.api.command.user.affinitygroup;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.acl.AclEntityType;
|
||||
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
|
||||
import org.apache.cloudstack.affinity.AffinityGroupResponse;
|
||||
import org.apache.cloudstack.api.ACL;
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.ApiCommandJobType;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
|
@ -53,6 +55,7 @@ public class DeleteAffinityGroupCmd extends BaseAsyncCmd {
|
|||
entityType = DomainResponse.class)
|
||||
private Long domainId;
|
||||
|
||||
@ACL(accessType = AccessType.OperateEntry)
|
||||
@Parameter(name = ApiConstants.ID,
|
||||
type = CommandType.UUID,
|
||||
description = "The ID of the affinity group. Mutually exclusive with name parameter",
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ import java.util.List;
|
|||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.acl.AclEntityType;
|
||||
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
|
||||
import org.apache.cloudstack.affinity.AffinityGroupResponse;
|
||||
import org.apache.cloudstack.api.ACL;
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
|
|
@ -44,7 +46,7 @@ import com.cloud.user.Account;
|
|||
import com.cloud.uservm.UserVm;
|
||||
|
||||
@APICommand(name = "updateVMAffinityGroup", description = "Updates the affinity/anti-affinity group associations of a virtual machine. The VM has to be stopped and restarted for the "
|
||||
+ "new properties to take effect.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted)
|
||||
+ "new properties to take effect.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = { AclEntityType.VirtualMachine })
|
||||
public class UpdateVMAffinityGroupCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(UpdateVMAffinityGroupCmd.class.getName());
|
||||
private static final String s_name = "updatevirtualmachineresponse";
|
||||
|
|
@ -53,7 +55,7 @@ public class UpdateVMAffinityGroupCmd extends BaseAsyncCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ACL
|
||||
@ACL(accessType = AccessType.OperateEntry)
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the virtual machine")
|
||||
private Long id;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import java.util.List;
|
|||
|
||||
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;
|
||||
|
|
@ -39,7 +40,7 @@ import com.cloud.user.Account;
|
|||
|
||||
@APICommand(name = "createAutoScalePolicy",
|
||||
description = "Creates an autoscale policy for a provision or deprovision action, the action is taken when the all the conditions evaluates to true for the specified duration. The policy is in effect once it is attached to a autscale vm group.",
|
||||
responseObject = AutoScalePolicyResponse.class)
|
||||
responseObject = AutoScalePolicyResponse.class, entityType = { AclEntityType.AutoScalePolicy })
|
||||
public class CreateAutoScalePolicyCmd extends BaseAsyncCreateCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(CreateAutoScalePolicyCmd.class.getName());
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import java.util.List;
|
|||
|
||||
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;
|
||||
|
|
@ -40,7 +41,7 @@ import com.cloud.network.rules.LoadBalancer;
|
|||
|
||||
@APICommand(name = "createAutoScaleVmGroup",
|
||||
description = "Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.",
|
||||
responseObject = AutoScaleVmGroupResponse.class)
|
||||
responseObject = AutoScaleVmGroupResponse.class, entityType = { AclEntityType.AutoScaleVmGroup })
|
||||
public class CreateAutoScaleVmGroupCmd extends BaseAsyncCreateCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(CreateAutoScaleVmGroupCmd.class.getName());
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.util.Map;
|
|||
|
||||
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;
|
||||
|
|
@ -44,7 +45,7 @@ import com.cloud.user.User;
|
|||
|
||||
@APICommand(name = "createAutoScaleVmProfile",
|
||||
description = "Creates a profile that contains information about the virtual machine which will be provisioned automatically by autoscale feature.",
|
||||
responseObject = AutoScaleVmProfileResponse.class)
|
||||
responseObject = AutoScaleVmProfileResponse.class, entityType = { AclEntityType.AutoScaleVmProfile })
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class CreateAutoScaleVmProfileCmd extends BaseAsyncCreateCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(CreateAutoScaleVmProfileCmd.class.getName());
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.user.autoscale;
|
|||
|
||||
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;
|
||||
|
|
@ -35,7 +36,7 @@ import com.cloud.event.EventTypes;
|
|||
import com.cloud.exception.ResourceAllocationException;
|
||||
import com.cloud.network.as.Condition;
|
||||
|
||||
@APICommand(name = "createCondition", description = "Creates a condition", responseObject = ConditionResponse.class)
|
||||
@APICommand(name = "createCondition", description = "Creates a condition", responseObject = ConditionResponse.class, entityType = { AclEntityType.Condition })
|
||||
public class CreateConditionCmd extends BaseAsyncCreateCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(CreateConditionCmd.class.getName());
|
||||
private static final String s_name = "conditionresponse";
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ package org.apache.cloudstack.api.command.user.autoscale;
|
|||
|
||||
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.ApiCommandJobType;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
|
@ -33,7 +36,7 @@ import com.cloud.event.EventTypes;
|
|||
import com.cloud.network.as.AutoScalePolicy;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "deleteAutoScalePolicy", description = "Deletes a autoscale policy.", responseObject = SuccessResponse.class)
|
||||
@APICommand(name = "deleteAutoScalePolicy", description = "Deletes a autoscale policy.", responseObject = SuccessResponse.class, entityType = { AclEntityType.AutoScalePolicy })
|
||||
public class DeleteAutoScalePolicyCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(DeleteAutoScalePolicyCmd.class.getName());
|
||||
private static final String s_name = "deleteautoscalepolicyresponse";
|
||||
|
|
@ -41,6 +44,7 @@ public class DeleteAutoScalePolicyCmd extends BaseAsyncCmd {
|
|||
// ////////////// API parameters /////////////////////
|
||||
// ///////////////////////////////////////////////////
|
||||
|
||||
@ACL(accessType = AccessType.OperateEntry)
|
||||
@Parameter(name = ApiConstants.ID,
|
||||
type = CommandType.UUID,
|
||||
entityType = AutoScalePolicyResponse.class,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ package org.apache.cloudstack.api.command.user.autoscale;
|
|||
|
||||
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.ApiCommandJobType;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
|
@ -33,7 +36,7 @@ import com.cloud.event.EventTypes;
|
|||
import com.cloud.network.as.AutoScaleVmGroup;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "deleteAutoScaleVmGroup", description = "Deletes a autoscale vm group.", responseObject = SuccessResponse.class)
|
||||
@APICommand(name = "deleteAutoScaleVmGroup", description = "Deletes a autoscale vm group.", responseObject = SuccessResponse.class, entityType = { AclEntityType.AutoScaleVmGroup })
|
||||
public class DeleteAutoScaleVmGroupCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(DeleteAutoScaleVmGroupCmd.class.getName());
|
||||
private static final String s_name = "deleteautoscalevmgroupresponse";
|
||||
|
|
@ -41,6 +44,7 @@ public class DeleteAutoScaleVmGroupCmd extends BaseAsyncCmd {
|
|||
// ////////////// API parameters /////////////////////
|
||||
// ///////////////////////////////////////////////////
|
||||
|
||||
@ACL(accessType = AccessType.OperateEntry)
|
||||
@Parameter(name = ApiConstants.ID,
|
||||
type = CommandType.UUID,
|
||||
entityType = AutoScaleVmGroupResponse.class,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ package org.apache.cloudstack.api.command.user.autoscale;
|
|||
|
||||
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.ApiCommandJobType;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
|
@ -33,7 +36,7 @@ import com.cloud.event.EventTypes;
|
|||
import com.cloud.network.as.AutoScaleVmProfile;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "deleteAutoScaleVmProfile", description = "Deletes a autoscale vm profile.", responseObject = SuccessResponse.class)
|
||||
@APICommand(name = "deleteAutoScaleVmProfile", description = "Deletes a autoscale vm profile.", responseObject = SuccessResponse.class, entityType = { AclEntityType.AutoScaleVmProfile })
|
||||
public class DeleteAutoScaleVmProfileCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(DeleteAutoScaleVmProfileCmd.class.getName());
|
||||
private static final String s_name = "deleteautoscalevmprofileresponse";
|
||||
|
|
@ -41,6 +44,7 @@ public class DeleteAutoScaleVmProfileCmd extends BaseAsyncCmd {
|
|||
// ////////////// API parameters /////////////////////
|
||||
// ///////////////////////////////////////////////////
|
||||
|
||||
@ACL(accessType = AccessType.OperateEntry)
|
||||
@Parameter(name = ApiConstants.ID,
|
||||
type = CommandType.UUID,
|
||||
entityType = AutoScaleVmProfileResponse.class,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ package org.apache.cloudstack.api.command.user.autoscale;
|
|||
|
||||
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.ApiCommandJobType;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
|
@ -34,7 +37,7 @@ import com.cloud.exception.ResourceInUseException;
|
|||
import com.cloud.network.as.Condition;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "deleteCondition", description = "Removes a condition", responseObject = SuccessResponse.class)
|
||||
@APICommand(name = "deleteCondition", description = "Removes a condition", responseObject = SuccessResponse.class, entityType = { AclEntityType.Condition })
|
||||
public class DeleteConditionCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(DeleteConditionCmd.class.getName());
|
||||
private static final String s_name = "deleteconditionresponse";
|
||||
|
|
@ -43,6 +46,7 @@ public class DeleteConditionCmd extends BaseAsyncCmd {
|
|||
// ////////////// API parameters /////////////////////
|
||||
// ///////////////////////////////////////////////////
|
||||
|
||||
@ACL(accessType = AccessType.OperateEntry)
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ConditionResponse.class, required = true, description = "the ID of the condition.")
|
||||
private Long id;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ package org.apache.cloudstack.api.command.user.autoscale;
|
|||
|
||||
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.ApiCommandJobType;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
|
@ -32,7 +35,7 @@ import com.cloud.event.EventTypes;
|
|||
import com.cloud.network.as.AutoScaleVmGroup;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "disableAutoScaleVmGroup", description = "Disables an AutoScale Vm Group", responseObject = AutoScaleVmGroupResponse.class)
|
||||
@APICommand(name = "disableAutoScaleVmGroup", description = "Disables an AutoScale Vm Group", responseObject = AutoScaleVmGroupResponse.class, entityType = { AclEntityType.AutoScaleVmGroup })
|
||||
public class DisableAutoScaleVmGroupCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(DisableAutoScaleVmGroupCmd.class.getName());
|
||||
private static final String s_name = "disableautoscalevmGroupresponse";
|
||||
|
|
@ -41,6 +44,7 @@ public class DisableAutoScaleVmGroupCmd extends BaseAsyncCmd {
|
|||
// ////////////// API parameters /////////////////////
|
||||
// ///////////////////////////////////////////////////
|
||||
|
||||
@ACL(accessType = AccessType.OperateEntry)
|
||||
@Parameter(name = ApiConstants.ID,
|
||||
type = CommandType.UUID,
|
||||
entityType = AutoScaleVmGroupResponse.class,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ package org.apache.cloudstack.api.command.user.autoscale;
|
|||
|
||||
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.ApiCommandJobType;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
|
@ -32,7 +35,7 @@ import com.cloud.event.EventTypes;
|
|||
import com.cloud.network.as.AutoScaleVmGroup;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "enableAutoScaleVmGroup", description = "Enables an AutoScale Vm Group", responseObject = AutoScaleVmGroupResponse.class)
|
||||
@APICommand(name = "enableAutoScaleVmGroup", description = "Enables an AutoScale Vm Group", responseObject = AutoScaleVmGroupResponse.class, entityType = { AclEntityType.AutoScaleVmGroup })
|
||||
public class EnableAutoScaleVmGroupCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(EnableAutoScaleVmGroupCmd.class.getName());
|
||||
private static final String s_name = "enableautoscalevmGroupresponse";
|
||||
|
|
@ -41,6 +44,7 @@ public class EnableAutoScaleVmGroupCmd extends BaseAsyncCmd {
|
|||
// ////////////// API parameters /////////////////////
|
||||
// ///////////////////////////////////////////////////
|
||||
|
||||
@ACL(accessType = AccessType.OperateEntry)
|
||||
@Parameter(name = ApiConstants.ID,
|
||||
type = CommandType.UUID,
|
||||
entityType = AutoScaleVmGroupResponse.class,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.util.List;
|
|||
|
||||
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.BaseListAccountResourcesCmd;
|
||||
|
|
@ -32,7 +33,7 @@ import org.apache.cloudstack.api.response.ListResponse;
|
|||
|
||||
import com.cloud.network.as.AutoScalePolicy;
|
||||
|
||||
@APICommand(name = "listAutoScalePolicies", description = "Lists autoscale policies.", responseObject = AutoScalePolicyResponse.class)
|
||||
@APICommand(name = "listAutoScalePolicies", description = "Lists autoscale policies.", responseObject = AutoScalePolicyResponse.class, entityType = { AclEntityType.AutoScalePolicy })
|
||||
public class ListAutoScalePoliciesCmd extends BaseListAccountResourcesCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(ListAutoScalePoliciesCmd.class.getName());
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.util.List;
|
|||
|
||||
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;
|
||||
|
|
@ -35,7 +36,7 @@ import org.apache.cloudstack.api.response.ZoneResponse;
|
|||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.network.as.AutoScaleVmGroup;
|
||||
|
||||
@APICommand(name = "listAutoScaleVmGroups", description = "Lists autoscale vm groups.", responseObject = AutoScaleVmGroupResponse.class)
|
||||
@APICommand(name = "listAutoScaleVmGroups", description = "Lists autoscale vm groups.", responseObject = AutoScaleVmGroupResponse.class, entityType = { AclEntityType.AutoScaleVmGroup })
|
||||
public class ListAutoScaleVmGroupsCmd extends BaseListProjectAndAccountResourcesCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(ListAutoScaleVmGroupsCmd.class.getName());
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.util.List;
|
|||
|
||||
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;
|
||||
|
|
@ -31,7 +32,7 @@ import org.apache.cloudstack.api.response.TemplateResponse;
|
|||
|
||||
import com.cloud.network.as.AutoScaleVmProfile;
|
||||
|
||||
@APICommand(name = "listAutoScaleVmProfiles", description = "Lists autoscale vm profiles.", responseObject = AutoScaleVmProfileResponse.class)
|
||||
@APICommand(name = "listAutoScaleVmProfiles", description = "Lists autoscale vm profiles.", responseObject = AutoScaleVmProfileResponse.class, entityType = { AclEntityType.AutoScaleVmProfile })
|
||||
public class ListAutoScaleVmProfilesCmd extends BaseListProjectAndAccountResourcesCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(ListAutoScaleVmProfilesCmd.class.getName());
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ import java.util.List;
|
|||
|
||||
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.ApiCommandJobType;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
|
@ -36,7 +39,7 @@ import com.cloud.event.EventTypes;
|
|||
import com.cloud.network.as.AutoScalePolicy;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "updateAutoScalePolicy", description = "Updates an existing autoscale policy.", responseObject = AutoScalePolicyResponse.class)
|
||||
@APICommand(name = "updateAutoScalePolicy", description = "Updates an existing autoscale policy.", responseObject = AutoScalePolicyResponse.class, entityType = { AclEntityType.AutoScalePolicy })
|
||||
public class UpdateAutoScalePolicyCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(UpdateAutoScalePolicyCmd.class.getName());
|
||||
|
||||
|
|
@ -61,6 +64,7 @@ public class UpdateAutoScalePolicyCmd extends BaseAsyncCmd {
|
|||
description = "the list of IDs of the conditions that are being evaluated on every interval")
|
||||
private List<Long> conditionIds;
|
||||
|
||||
@ACL(accessType = AccessType.OperateEntry)
|
||||
@Parameter(name = ApiConstants.ID,
|
||||
type = CommandType.UUID,
|
||||
entityType = AutoScalePolicyResponse.class,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ import java.util.List;
|
|||
|
||||
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.ApiCommandJobType;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
|
@ -36,7 +39,7 @@ import com.cloud.event.EventTypes;
|
|||
import com.cloud.network.as.AutoScaleVmGroup;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "updateAutoScaleVmGroup", description = "Updates an existing autoscale vm group.", responseObject = AutoScaleVmGroupResponse.class)
|
||||
@APICommand(name = "updateAutoScaleVmGroup", description = "Updates an existing autoscale vm group.", responseObject = AutoScaleVmGroupResponse.class, entityType = { AclEntityType.AutoScaleVmGroup })
|
||||
public class UpdateAutoScaleVmGroupCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(UpdateAutoScaleVmGroupCmd.class.getName());
|
||||
|
||||
|
|
@ -73,6 +76,7 @@ public class UpdateAutoScaleVmGroupCmd extends BaseAsyncCmd {
|
|||
description = "list of scaledown autoscale policies")
|
||||
private List<Long> scaleDownPolicyIds;
|
||||
|
||||
@ACL(accessType = AccessType.OperateEntry)
|
||||
@Parameter(name = ApiConstants.ID,
|
||||
type = CommandType.UUID,
|
||||
entityType = AutoScaleVmGroupResponse.class,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ import java.util.Map;
|
|||
|
||||
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.ApiCommandJobType;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
|
@ -37,7 +40,7 @@ import com.cloud.event.EventTypes;
|
|||
import com.cloud.network.as.AutoScaleVmProfile;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "updateAutoScaleVmProfile", description = "Updates an existing autoscale vm profile.", responseObject = AutoScaleVmProfileResponse.class)
|
||||
@APICommand(name = "updateAutoScaleVmProfile", description = "Updates an existing autoscale vm profile.", responseObject = AutoScaleVmProfileResponse.class, entityType = { AclEntityType.AutoScaleVmProfile })
|
||||
public class UpdateAutoScaleVmProfileCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(UpdateAutoScaleVmProfileCmd.class.getName());
|
||||
|
||||
|
|
@ -47,6 +50,7 @@ public class UpdateAutoScaleVmProfileCmd extends BaseAsyncCmd {
|
|||
// ////////////// API parameters /////////////////////
|
||||
// ///////////////////////////////////////////////////
|
||||
|
||||
@ACL(accessType = AccessType.OperateEntry)
|
||||
@Parameter(name = ApiConstants.ID,
|
||||
type = CommandType.UUID,
|
||||
entityType = AutoScaleVmProfileResponse.class,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.util.List;
|
|||
|
||||
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;
|
||||
|
|
@ -34,7 +35,7 @@ import org.apache.cloudstack.context.CallContext;
|
|||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "archiveEvents", description = "Archive one or more events.", responseObject = SuccessResponse.class)
|
||||
@APICommand(name = "archiveEvents", description = "Archive one or more events.", responseObject = SuccessResponse.class, entityType = { AclEntityType.Event })
|
||||
public class ArchiveEventsCmd extends BaseCmd {
|
||||
|
||||
public static final Logger s_logger = Logger.getLogger(ArchiveEventsCmd.class.getName());
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.util.List;
|
|||
|
||||
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;
|
||||
|
|
@ -34,7 +35,7 @@ import org.apache.cloudstack.context.CallContext;
|
|||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "deleteEvents", description = "Delete one or more events.", responseObject = SuccessResponse.class)
|
||||
@APICommand(name = "deleteEvents", description = "Delete one or more events.", responseObject = SuccessResponse.class, entityType = { AclEntityType.Event })
|
||||
public class DeleteEventsCmd extends BaseCmd {
|
||||
|
||||
public static final Logger s_logger = Logger.getLogger(DeleteEventsCmd.class.getName());
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import java.util.Date;
|
|||
|
||||
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;
|
||||
|
|
@ -27,7 +28,7 @@ import org.apache.cloudstack.api.Parameter;
|
|||
import org.apache.cloudstack.api.response.EventResponse;
|
||||
import org.apache.cloudstack.api.response.ListResponse;
|
||||
|
||||
@APICommand(name = "listEvents", description = "A command to list events.", responseObject = EventResponse.class)
|
||||
@APICommand(name = "listEvents", description = "A command to list events.", responseObject = EventResponse.class, entityType = { AclEntityType.Event })
|
||||
public class ListEventsCmd extends BaseListProjectAndAccountResourcesCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(ListEventsCmd.class.getName());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue