mirror of https://github.com/apache/cloudstack.git
Merge branch '4.22'
This commit is contained in:
commit
22da57f922
|
|
@ -175,12 +175,12 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
|
||||||
try {
|
try {
|
||||||
is.close();
|
is.close();
|
||||||
} catch (final IOException e) {
|
} catch (final IOException e) {
|
||||||
logger.warn("Exception when closing , console proxy address : {}", proxyManagementIp);
|
logger.warn("Exception when closing , console proxy address: {}", proxyManagementIp);
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (final IOException e) {
|
} catch (final IOException e) {
|
||||||
logger.warn("Unable to open console proxy command port url, console proxy address : {}", proxyManagementIp);
|
logger.warn("Unable to open console proxy command port url, console proxy address: {}", proxyManagementIp);
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -277,8 +277,8 @@ public class OVFHelper {
|
||||||
if (StringUtils.isNotBlank(path)) {
|
if (StringUtils.isNotBlank(path)) {
|
||||||
File f = new File(path);
|
File f = new File(path);
|
||||||
if (!f.exists() || f.isDirectory()) {
|
if (!f.exists() || f.isDirectory()) {
|
||||||
logger.error("One of the attached disk or iso does not exists {}", path);
|
logger.error("One of the attached disk or ISOs does not exists {}", path);
|
||||||
throw new InternalErrorException("One of the attached disk or iso as stated on OVF does not exists " + path);
|
throw new InternalErrorException("One of the attached disk or ISOs as stated on OVF does not exists " + path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Long capacity = disk != null ? disk._capacity : file._size;
|
Long capacity = disk != null ? disk._capacity : file._size;
|
||||||
|
|
@ -541,7 +541,7 @@ public class OVFHelper {
|
||||||
nicCount++;
|
nicCount++;
|
||||||
String name = e.getTextContent(); // should be in our nets
|
String name = e.getTextContent(); // should be in our nets
|
||||||
if(nets.get(name) == null) {
|
if(nets.get(name) == null) {
|
||||||
logger.info("Found a nic definition without a network definition by name {}, adding it to the list.", name);
|
logger.info("Found a NIC definition without a Network definition by name {}, adding it to the list.", name);
|
||||||
nets.put(name, new OVFNetworkTO());
|
nets.put(name, new OVFNetworkTO());
|
||||||
}
|
}
|
||||||
OVFNetworkTO thisNet = nets.get(name);
|
OVFNetworkTO thisNet = nets.get(name);
|
||||||
|
|
@ -617,7 +617,7 @@ public class OVFHelper {
|
||||||
|
|
||||||
nets.put(networkName,network);
|
nets.put(networkName,network);
|
||||||
}
|
}
|
||||||
logger.trace("Found {} networks in template", nets.size());
|
logger.trace("Found {} Networks in Template", nets.size());
|
||||||
return nets;
|
return nets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,10 @@ public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "lists recurring snapshots by snapshot policy ID")
|
@Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "Lists recurring Snapshots by Snapshot policy ID")
|
||||||
private Long snapshotPolicyId;
|
private Long snapshotPolicyId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "list recurring snapshots by volume ID")
|
@Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "List recurring Snapshots by volume ID")
|
||||||
private Long volumeId;
|
private Long volumeId;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public interface Ipv6Service extends PluggableService, Configurable {
|
||||||
static final ConfigKey<Boolean> Ipv6OfferingCreationEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class,
|
static final ConfigKey<Boolean> Ipv6OfferingCreationEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class,
|
||||||
"ipv6.offering.enabled",
|
"ipv6.offering.enabled",
|
||||||
"false",
|
"false",
|
||||||
"Indicates whether creation of IPv6 network/VPC offering is enabled or not.",
|
"Indicates whether creation of IPv6 Network/VPC offering is enabled or not.",
|
||||||
true);
|
true);
|
||||||
|
|
||||||
static final ConfigKey<Integer> Ipv6PrefixSubnetCleanupInterval = new ConfigKey<Integer>("Advanced", Integer.class,
|
static final ConfigKey<Integer> Ipv6PrefixSubnetCleanupInterval = new ConfigKey<Integer>("Advanced", Integer.class,
|
||||||
|
|
|
||||||
|
|
@ -325,9 +325,9 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
|
||||||
|
|
||||||
public enum State {
|
public enum State {
|
||||||
|
|
||||||
Allocated("Indicates the network configuration is in allocated but not setup"), Setup("Indicates the network configuration is setup"), Implementing(
|
Allocated("Indicates the Network configuration is in allocated but not setup"), Setup("Indicates the Network configuration is setup"), Implementing(
|
||||||
"Indicates the network configuration is being implemented"), Implemented("Indicates the network configuration is in use"), Shutdown(
|
"Indicates the Network configuration is being implemented"), Implemented("Indicates the Network configuration is in use"), Shutdown(
|
||||||
"Indicates the network configuration is being destroyed"), Destroy("Indicates that the network is destroyed");
|
"Indicates the Network configuration is being destroyed"), Destroy("Indicates that the Network is destroyed");
|
||||||
|
|
||||||
protected static final StateMachine2<State, Network.Event, Network> s_fsm = new StateMachine2<State, Network.Event, Network>();
|
protected static final StateMachine2<State, Network.Event, Network> s_fsm = new StateMachine2<State, Network.Event, Network>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ public interface NetworkService {
|
||||||
true, ConfigKey.Scope.Zone);
|
true, ConfigKey.Scope.Zone);
|
||||||
|
|
||||||
public static final ConfigKey<Boolean> AllowUsersToSpecifyVRMtu = new ConfigKey<>("Advanced", Boolean.class,
|
public static final ConfigKey<Boolean> AllowUsersToSpecifyVRMtu = new ConfigKey<>("Advanced", Boolean.class,
|
||||||
"allow.end.users.to.specify.vr.mtu", "false", "Allow end users to specify VR MTU",
|
"allow.end.users.to.specify.vr.mtu", "false", "Allow end Users to specify VR MTU",
|
||||||
true, ConfigKey.Scope.Zone);
|
true, ConfigKey.Scope.Zone);
|
||||||
|
|
||||||
List<? extends Network> getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner);
|
List<? extends Network> getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner);
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public interface AutoScaleVmGroup extends ControlledEntity, InternalIdentity, Di
|
||||||
} else if (state.equalsIgnoreCase("scaling")) {
|
} else if (state.equalsIgnoreCase("scaling")) {
|
||||||
return SCALING;
|
return SCALING;
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Unexpected AutoScale VM group state : " + state);
|
throw new IllegalArgumentException("Unexpected AutoScale Instance group state : " + state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ import com.cloud.template.VirtualMachineTemplate;
|
||||||
public interface ResourceLimitService {
|
public interface ResourceLimitService {
|
||||||
|
|
||||||
static final ConfigKey<Long> MaxAccountSecondaryStorage = new ConfigKey<>("Account Defaults", Long.class, "max.account.secondary.storage", "400",
|
static final ConfigKey<Long> MaxAccountSecondaryStorage = new ConfigKey<>("Account Defaults", Long.class, "max.account.secondary.storage", "400",
|
||||||
"The default maximum secondary storage space (in GiB) that can be used for an account", false);
|
"The default maximum secondary storage space (in GiB) that can be used for an Account", false);
|
||||||
static final ConfigKey<Long> MaxProjectSecondaryStorage = new ConfigKey<>("Project Defaults", Long.class, "max.project.secondary.storage", "400",
|
static final ConfigKey<Long> MaxProjectSecondaryStorage = new ConfigKey<>("Project Defaults", Long.class, "max.project.secondary.storage", "400",
|
||||||
"The default maximum secondary storage space (in GiB) that can be used for a project", false);
|
"The default maximum secondary storage space (in GiB) that can be used for a project", false);
|
||||||
static final ConfigKey<Long> ResourceCountCheckInterval = new ConfigKey<>("Advanced", Long.class, "resourcecount.check.interval", "300",
|
static final ConfigKey<Long> ResourceCountCheckInterval = new ConfigKey<>("Advanced", Long.class, "resourcecount.check.interval", "300",
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,10 @@ import com.cloud.utils.fsm.StateObject;
|
||||||
public interface VMSnapshot extends ControlledEntity, Identity, InternalIdentity, StateObject<VMSnapshot.State> {
|
public interface VMSnapshot extends ControlledEntity, Identity, InternalIdentity, StateObject<VMSnapshot.State> {
|
||||||
|
|
||||||
enum State {
|
enum State {
|
||||||
Allocated("The VM snapshot is allocated but has not been created yet."), Creating("The VM snapshot is being created."), Ready(
|
Allocated("The Instance Snapshot is allocated but has not been created yet."), Creating("The Instance Snapshot is being created."), Ready(
|
||||||
"The VM snapshot is ready to be used."), Reverting("The VM snapshot is being used to revert"), Expunging("The volume is being expunging"), Removed(
|
"The Instance Snapshot is ready to be used."), Reverting("The Instance Snapshot is being used to revert"), Expunging("The volume is being expunging"), Removed(
|
||||||
"The volume is destroyed, and can't be recovered."), Error("The volume is in error state, and can't be recovered"),
|
"The volume is destroyed, and can't be recovered."), Error("The volume is in error state, and can't be recovered"),
|
||||||
Hidden("The VM snapshot is hidden from the user and cannot be recovered.");
|
Hidden("The Instance snapshot is hidden from the user and cannot be recovered.");
|
||||||
|
|
||||||
String _description;
|
String _description;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,10 +132,10 @@ public enum RoleType {
|
||||||
* */
|
* */
|
||||||
public static Account.Type getAccountTypeByRole(final Role role, final Account.Type defautAccountType) {
|
public static Account.Type getAccountTypeByRole(final Role role, final Account.Type defautAccountType) {
|
||||||
if (role != null) {
|
if (role != null) {
|
||||||
LOGGER.debug("Role [{}] is not null; therefore, we use its account type [{}].", role, defautAccountType);
|
LOGGER.debug("Role [{}] is not null; therefore, we use its Account type [{}].", role, defautAccountType);
|
||||||
return role.getRoleType().getAccountType();
|
return role.getRoleType().getAccountType();
|
||||||
}
|
}
|
||||||
LOGGER.debug("Role is null; therefore, we use the default account type [{}] value.", defautAccountType);
|
LOGGER.debug("Role is null; therefore, we use the default Account type [{}] value.", defautAccountType);
|
||||||
return defautAccountType;
|
return defautAccountType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,27 +34,27 @@ import com.cloud.serializer.Param;
|
||||||
public class AffinityGroupResponse extends BaseResponse implements ControlledViewEntityResponse {
|
public class AffinityGroupResponse extends BaseResponse implements ControlledViewEntityResponse {
|
||||||
|
|
||||||
@SerializedName(ApiConstants.ID)
|
@SerializedName(ApiConstants.ID)
|
||||||
@Param(description = "the ID of the affinity group")
|
@Param(description = "The ID of the affinity group")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.NAME)
|
@SerializedName(ApiConstants.NAME)
|
||||||
@Param(description = "the name of the affinity group")
|
@Param(description = "The name of the affinity group")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.DESCRIPTION)
|
@SerializedName(ApiConstants.DESCRIPTION)
|
||||||
@Param(description = "the description of the affinity group")
|
@Param(description = "The description of the affinity group")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.ACCOUNT)
|
@SerializedName(ApiConstants.ACCOUNT)
|
||||||
@Param(description = "the account owning the affinity group")
|
@Param(description = "The account owning the affinity group")
|
||||||
private String accountName;
|
private String accountName;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.DOMAIN_ID)
|
@SerializedName(ApiConstants.DOMAIN_ID)
|
||||||
@Param(description = "the domain ID of the affinity group")
|
@Param(description = "The domain ID of the affinity group")
|
||||||
private String domainId;
|
private String domainId;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.DOMAIN)
|
@SerializedName(ApiConstants.DOMAIN)
|
||||||
@Param(description = "the domain name of the affinity group")
|
@Param(description = "The domain name of the affinity group")
|
||||||
private String domainName;
|
private String domainName;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.DOMAIN_PATH)
|
@SerializedName(ApiConstants.DOMAIN_PATH)
|
||||||
|
|
@ -62,19 +62,19 @@ public class AffinityGroupResponse extends BaseResponse implements ControlledVie
|
||||||
private String domainPath;
|
private String domainPath;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.PROJECT_ID)
|
@SerializedName(ApiConstants.PROJECT_ID)
|
||||||
@Param(description = "the project ID of the affinity group")
|
@Param(description = "The project ID of the affinity group")
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.PROJECT)
|
@SerializedName(ApiConstants.PROJECT)
|
||||||
@Param(description = "the project name of the affinity group")
|
@Param(description = "The project name of the affinity group")
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.TYPE)
|
@SerializedName(ApiConstants.TYPE)
|
||||||
@Param(description = "the type of the affinity group")
|
@Param(description = "The type of the affinity group")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@SerializedName("virtualmachineIds")
|
@SerializedName("virtualmachineIds")
|
||||||
@Param(description = "virtual machine IDs associated with this affinity group")
|
@Param(description = "Instance IDs associated with this affinity group")
|
||||||
private List<String> vmIdList;
|
private List<String> vmIdList;
|
||||||
|
|
||||||
@SerializedName("dedicatedresources")
|
@SerializedName("dedicatedresources")
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ import com.cloud.serializer.Param;
|
||||||
public class AffinityGroupTypeResponse extends BaseResponse {
|
public class AffinityGroupTypeResponse extends BaseResponse {
|
||||||
|
|
||||||
@SerializedName(ApiConstants.TYPE)
|
@SerializedName(ApiConstants.TYPE)
|
||||||
@Param(description = "the type of the affinity group")
|
@Param(description = "The type of the affinity group")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
public AffinityGroupTypeResponse() {
|
public AffinityGroupTypeResponse() {
|
||||||
|
|
|
||||||
|
|
@ -29,28 +29,28 @@ import org.apache.cloudstack.api.response.ZoneResponse;
|
||||||
public abstract class AbstractGetUploadParamsCmd extends BaseCmd {
|
public abstract class AbstractGetUploadParamsCmd extends BaseCmd {
|
||||||
|
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the volume/template/iso")
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the Volume/Template/ISO")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, required = true, description = "the format for the volume/template/iso. Possible values include QCOW2, OVA, "
|
@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, required = true, description = "The format for the Volume/Template/ISO. Possible values include QCOW2, OVA, "
|
||||||
+ "and VHD.")
|
+ "and VHD.")
|
||||||
private String format;
|
private String format;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the zone the volume/template/iso is "
|
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "The ID of the zone the Volume/Template/ISO is "
|
||||||
+ "to be hosted on")
|
+ "to be hosted on")
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "the checksum value of this volume/template/iso " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION)
|
@Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "The checksum value of this Volume/Template/ISO " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION)
|
||||||
private String checksum;
|
private String checksum;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional accountName. Must be used with domainId.")
|
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional accountName. Must be used with domainId.")
|
||||||
private String accountName;
|
private String accountName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "an optional domainId. If the account parameter is used, "
|
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "An optional domainId. If the Account parameter is used, "
|
||||||
+ "domainId must also be used.")
|
+ "domainId must also be used.")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Upload volume/template/iso for the project")
|
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Upload Volume/Template/ISO for the project")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ package org.apache.cloudstack.api;
|
||||||
public abstract class BaseAsyncCreateCustomIdCmd extends BaseAsyncCreateCmd {
|
public abstract class BaseAsyncCreateCustomIdCmd extends BaseAsyncCreateCmd {
|
||||||
@Parameter(name = ApiConstants.CUSTOM_ID,
|
@Parameter(name = ApiConstants.CUSTOM_ID,
|
||||||
type = CommandType.STRING,
|
type = CommandType.STRING,
|
||||||
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only")
|
description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only")
|
||||||
private String customId;
|
private String customId;
|
||||||
|
|
||||||
public String getCustomId() {
|
public String getCustomId() {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import org.apache.cloudstack.acl.RoleType;
|
||||||
public abstract class BaseAsyncCustomIdCmd extends BaseAsyncCmd {
|
public abstract class BaseAsyncCustomIdCmd extends BaseAsyncCmd {
|
||||||
@Parameter(name = ApiConstants.CUSTOM_ID,
|
@Parameter(name = ApiConstants.CUSTOM_ID,
|
||||||
type = CommandType.STRING,
|
type = CommandType.STRING,
|
||||||
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
|
description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
|
||||||
private String customId;
|
private String customId;
|
||||||
|
|
||||||
public String getCustomId() {
|
public String getCustomId() {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ public abstract class BaseCustomIdCmd extends BaseCmd {
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CUSTOM_ID,
|
@Parameter(name = ApiConstants.CUSTOM_ID,
|
||||||
type = CommandType.STRING,
|
type = CommandType.STRING,
|
||||||
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
|
description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
|
||||||
private String customId;
|
private String customId;
|
||||||
|
|
||||||
public String getCustomId() {
|
public String getCustomId() {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ package org.apache.cloudstack.api;
|
||||||
|
|
||||||
public abstract class BaseListAccountResourcesCmd extends BaseListDomainResourcesCmd implements IBaseListAccountResourcesCmd {
|
public abstract class BaseListAccountResourcesCmd extends BaseListDomainResourcesCmd implements IBaseListAccountResourcesCmd {
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "list resources by account. Must be used with the domainId parameter.")
|
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "List resources by Account. Must be used with the domainId parameter.")
|
||||||
private String accountName;
|
private String accountName;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,10 @@ public abstract class BaseListDomainResourcesCmd extends BaseListCmd implements
|
||||||
@Parameter(name = ApiConstants.DOMAIN_ID,
|
@Parameter(name = ApiConstants.DOMAIN_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = DomainResponse.class,
|
entityType = DomainResponse.class,
|
||||||
description = "list only resources belonging to the domain specified")
|
description = "List only resources belonging to the domain specified")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IS_RECURSIVE, type = CommandType.BOOLEAN, description = "defaults to false,"
|
@Parameter(name = ApiConstants.IS_RECURSIVE, type = CommandType.BOOLEAN, description = "Defaults to false,"
|
||||||
+ " but if true, lists all resources from the parent specified by the domainId till leaves.")
|
+ " but if true, lists all resources from the parent specified by the domainId till leaves.")
|
||||||
private Boolean recursive;
|
private Boolean recursive;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import org.apache.cloudstack.api.response.ProjectResponse;
|
||||||
|
|
||||||
public abstract class BaseListProjectAndAccountResourcesCmd extends BaseListAccountResourcesCmd implements IBaseListProjectAndAccountResourcesCmd {
|
public abstract class BaseListProjectAndAccountResourcesCmd extends BaseListAccountResourcesCmd implements IBaseListProjectAndAccountResourcesCmd {
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "list objects by project; if projectid=-1 lists All VMs")
|
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "List objects by project; if projectid=-1 lists All Instances")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ package org.apache.cloudstack.api;
|
||||||
import org.apache.commons.lang3.BooleanUtils;
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
|
|
||||||
public abstract class BaseListRetrieveOnlyResourceCountCmd extends BaseListTaggedResourcesCmd {
|
public abstract class BaseListRetrieveOnlyResourceCountCmd extends BaseListTaggedResourcesCmd {
|
||||||
@Parameter(name = ApiConstants.RETRIEVE_ONLY_RESOURCE_COUNT, type = CommandType.BOOLEAN, description = "makes the API's response contains only the resource count")
|
@Parameter(name = ApiConstants.RETRIEVE_ONLY_RESOURCE_COUNT, type = CommandType.BOOLEAN, description = "Makes the API's response contains only the resource count")
|
||||||
private Boolean retrieveOnlyResourceCount;
|
private Boolean retrieveOnlyResourceCount;
|
||||||
|
|
||||||
public Boolean getRetrieveOnlyResourceCount() {
|
public Boolean getRetrieveOnlyResourceCount() {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public abstract class BaseListTemplateOrIsoPermissionsCmd extends BaseCmd implem
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplatePermissionsResponse.class, required = true, description = "the template ID")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplatePermissionsResponse.class, required = true, description = "The Template ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@ public abstract class BaseResponse implements ResponseObject {
|
||||||
private transient String objectName;
|
private transient String objectName;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.JOB_ID)
|
@SerializedName(ApiConstants.JOB_ID)
|
||||||
@Param(description = "the UUID of the latest async job acting on this object")
|
@Param(description = "The UUID of the latest async job acting on this object")
|
||||||
protected String jobId;
|
protected String jobId;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.JOB_STATUS)
|
@SerializedName(ApiConstants.JOB_STATUS)
|
||||||
@Param(description = "the current status of the latest async job acting on this object")
|
@Param(description = "The current status of the latest async job acting on this object")
|
||||||
private Integer jobStatus;
|
private Integer jobStatus;
|
||||||
|
|
||||||
public BaseResponse() {
|
public BaseResponse() {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import com.google.gson.annotations.SerializedName;
|
||||||
public abstract class BaseResponseWithAnnotations extends BaseResponse {
|
public abstract class BaseResponseWithAnnotations extends BaseResponse {
|
||||||
|
|
||||||
@SerializedName(ApiConstants.HAS_ANNOTATIONS)
|
@SerializedName(ApiConstants.HAS_ANNOTATIONS)
|
||||||
@Param(description = "true if the entity/resource has annotations")
|
@Param(description = "True if the entity/resource has annotations")
|
||||||
private Boolean hasAnnotation;
|
private Boolean hasAnnotation;
|
||||||
|
|
||||||
public Boolean hasAnnotation() {
|
public Boolean hasAnnotation() {
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,11 @@ import com.google.gson.annotations.SerializedName;
|
||||||
public abstract class BaseResponseWithAssociatedNetwork extends BaseResponseWithAnnotations {
|
public abstract class BaseResponseWithAssociatedNetwork extends BaseResponseWithAnnotations {
|
||||||
|
|
||||||
@SerializedName(ApiConstants.ASSOCIATED_NETWORK_ID)
|
@SerializedName(ApiConstants.ASSOCIATED_NETWORK_ID)
|
||||||
@Param(description = "the ID of the Network associated with this private gateway")
|
@Param(description = "The ID of the Network associated with this private gateway")
|
||||||
private String associatedNetworkId;
|
private String associatedNetworkId;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.ASSOCIATED_NETWORK)
|
@SerializedName(ApiConstants.ASSOCIATED_NETWORK)
|
||||||
@Param(description = "the name of the Network associated with this private gateway")
|
@Param(description = "The name of the Network associated with this private gateway")
|
||||||
private String associatedNetworkName;
|
private String associatedNetworkName;
|
||||||
|
|
||||||
public void setAssociatedNetworkId(String associatedNetworkId) {
|
public void setAssociatedNetworkId(String associatedNetworkId) {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import com.google.gson.annotations.SerializedName;
|
||||||
public abstract class BaseResponseWithTagInformation extends BaseResponseWithAnnotations {
|
public abstract class BaseResponseWithTagInformation extends BaseResponseWithAnnotations {
|
||||||
|
|
||||||
@SerializedName(ApiConstants.TAGS)
|
@SerializedName(ApiConstants.TAGS)
|
||||||
@Param(description = "the list of resource tags associated", responseObject = ResourceTagResponse.class)
|
@Param(description = "The list of resource tags associated", responseObject = ResourceTagResponse.class)
|
||||||
protected Set<ResourceTagResponse> tags;
|
protected Set<ResourceTagResponse> tags;
|
||||||
|
|
||||||
public void addTag(ResourceTagResponse tag) {
|
public void addTag(ResourceTagResponse tag) {
|
||||||
|
|
|
||||||
|
|
@ -30,49 +30,49 @@ public abstract class BaseUpdateTemplateOrIsoCmd extends BaseCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.BOOTABLE, type = CommandType.BOOLEAN, description = "true if image is bootable, false otherwise; available only for updateIso API")
|
@Parameter(name = ApiConstants.BOOTABLE, type = CommandType.BOOLEAN, description = "True if image is bootable, false otherwise; available only for updateIso API")
|
||||||
private Boolean bootable;
|
private Boolean bootable;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "true if the template requires HVM, false otherwise; available only for updateTemplate API")
|
@Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "True if the Template requires HVM, false otherwise; available only for updateTemplate API")
|
||||||
private Boolean requiresHvm;
|
private Boolean requiresHvm;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the image", length = 4096)
|
@Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the image", length = 4096)
|
||||||
private String displayText;
|
private String displayText;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "the ID of the image file")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "The ID of the image file")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the image file")
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the image file")
|
||||||
private String templateName;
|
private String templateName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.OS_TYPE_ID,
|
@Parameter(name = ApiConstants.OS_TYPE_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = GuestOSResponse.class,
|
entityType = GuestOSResponse.class,
|
||||||
description = "the ID of the OS type that best represents the OS of this image.")
|
description = "The ID of the OS type that best represents the OS of this image.")
|
||||||
private Long osTypeId;
|
private Long osTypeId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.FORCE_UPDATE_OS_TYPE, type = CommandType.BOOLEAN, since = "4.21", description = "Force OS type update. Warning: Updating OS type will " +
|
@Parameter(name = ApiConstants.FORCE_UPDATE_OS_TYPE, type = CommandType.BOOLEAN, since = "4.21", description = "Force OS type update. Warning: Updating OS type will " +
|
||||||
"update the guest OS configuration for all the existing Instances deployed with this template/iso, which may affect their behavior.")
|
"update the guest OS configuration for all the existing Instances deployed with this template/iso, which may affect their behavior.")
|
||||||
private Boolean forceUpdateOsType;
|
private Boolean forceUpdateOsType;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, description = "the format for the image")
|
@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, description = "The format for the image")
|
||||||
private String format;
|
private String format;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PASSWORD_ENABLED, type = CommandType.BOOLEAN, description = "true if the image supports the password reset feature; default is false")
|
@Parameter(name = ApiConstants.PASSWORD_ENABLED, type = CommandType.BOOLEAN, description = "True if the image supports the password reset feature; default is false")
|
||||||
private Boolean passwordEnabled;
|
private Boolean passwordEnabled;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "true if the template supports the sshkey upload feature; default is false")
|
@Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "True if the Template supports the SSHkey upload feature; default is false")
|
||||||
private Boolean sshKeyEnabled;
|
private Boolean sshKeyEnabled;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "sort key of the template, integer")
|
@Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "Sort key of the Template, integer")
|
||||||
private Integer sortKey;
|
private Integer sortKey;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IS_DYNAMICALLY_SCALABLE,
|
@Parameter(name = ApiConstants.IS_DYNAMICALLY_SCALABLE,
|
||||||
type = CommandType.BOOLEAN,
|
type = CommandType.BOOLEAN,
|
||||||
description = "true if template/ISO contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory")
|
description = "True if Template/ISO contains XS/VMWare tools in order to support dynamic scaling of Instance CPU/memory")
|
||||||
private Boolean isDynamicallyScalable;
|
private Boolean isDynamicallyScalable;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ROUTING, type = CommandType.BOOLEAN, description = "true if the template type is routing i.e., if template is used to deploy router")
|
@Parameter(name = ApiConstants.ROUTING, type = CommandType.BOOLEAN, description = "True if the Template type is routing i.e., if Template is used to deploy router")
|
||||||
protected Boolean isRoutingType;
|
protected Boolean isRoutingType;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Details in key/value pairs using format details[i].keyname=keyvalue. Example: details[0].hypervisortoolsversion=xenserver61")
|
@Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Details in key/value pairs using format details[i].keyname=keyvalue. Example: details[0].hypervisortoolsversion=xenserver61")
|
||||||
|
|
@ -80,7 +80,7 @@ public abstract class BaseUpdateTemplateOrIsoCmd extends BaseCmd {
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLEAN_UP_DETAILS,
|
@Parameter(name = ApiConstants.CLEAN_UP_DETAILS,
|
||||||
type = CommandType.BOOLEAN,
|
type = CommandType.BOOLEAN,
|
||||||
description = "optional boolean field, which indicates if details should be cleaned up or not (if set to true, details removed for this resource, details field ignored; if false or not set, no action)")
|
description = "Optional boolean field, which indicates if details should be cleaned up or not (if set to true, details removed for this resource, details field ignored; if false or not set, no action)")
|
||||||
private Boolean cleanupDetails;
|
private Boolean cleanupDetails;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
|
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
|
||||||
|
|
|
||||||
|
|
@ -40,31 +40,31 @@ public abstract class BaseUpdateTemplateOrIsoPermissionsCmd extends BaseCmd {
|
||||||
@Parameter(name = ApiConstants.ACCOUNTS,
|
@Parameter(name = ApiConstants.ACCOUNTS,
|
||||||
type = CommandType.LIST,
|
type = CommandType.LIST,
|
||||||
collectionType = CommandType.STRING,
|
collectionType = CommandType.STRING,
|
||||||
description = "a comma delimited list of accounts within caller's domain. If specified, \"op\" parameter has to be passed in.")
|
description = "A comma delimited list of Accounts within caller's domain. If specified, \"op\" parameter has to be passed in.")
|
||||||
private List<String> accountNames;
|
private List<String> accountNames;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "the template ID")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "The Template ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "true for featured template/iso, false otherwise")
|
@Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "True for featured Template/ISO, false otherwise")
|
||||||
private Boolean featured;
|
private Boolean featured;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "true for public template/iso, false for private templates/isos")
|
@Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "True for public Template/ISO, false for private Templates/ISOs")
|
||||||
private Boolean isPublic;
|
private Boolean isPublic;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IS_EXTRACTABLE,
|
@Parameter(name = ApiConstants.IS_EXTRACTABLE,
|
||||||
type = CommandType.BOOLEAN,
|
type = CommandType.BOOLEAN,
|
||||||
description = "true if the template/iso is extractable, false other wise. Can be set only by root admin")
|
description = "True if the Template/ISO is extractable, false otherwise. Can be set only by root admin")
|
||||||
private Boolean isExtractable;
|
private Boolean isExtractable;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.OP, type = CommandType.STRING, description = "permission operator (add, remove, reset)")
|
@Parameter(name = ApiConstants.OP, type = CommandType.STRING, description = "Permission operator (add, remove, reset)")
|
||||||
private String operation;
|
private String operation;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PROJECT_IDS,
|
@Parameter(name = ApiConstants.PROJECT_IDS,
|
||||||
type = CommandType.LIST,
|
type = CommandType.LIST,
|
||||||
collectionType = CommandType.UUID,
|
collectionType = CommandType.UUID,
|
||||||
entityType = ProjectResponse.class,
|
entityType = ProjectResponse.class,
|
||||||
description = "a comma delimited list of projects. If specified, \"op\" parameter has to be passed in.")
|
description = "A comma delimited list of projects. If specified, \"op\" parameter has to be passed in.")
|
||||||
private List<Long> projectIds;
|
private List<Long> projectIds;
|
||||||
|
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
|
|
@ -121,7 +121,7 @@ public abstract class BaseUpdateTemplateOrIsoPermissionsCmd extends BaseCmd {
|
||||||
SuccessResponse response = new SuccessResponse(getCommandName());
|
SuccessResponse response = new SuccessResponse(getCommandName());
|
||||||
setResponseObject(response);
|
setResponseObject(response);
|
||||||
} else {
|
} else {
|
||||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update template/iso permissions");
|
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Template/ISO permissions");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public class CreateAccountCmd extends BaseCmd {
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT,
|
@Parameter(name = ApiConstants.ACCOUNT,
|
||||||
type = CommandType.STRING,
|
type = CommandType.STRING,
|
||||||
description = "Name of the account to be created. The user will be added to this newly created account. If no account is specified, the username will be used as the account name.")
|
description = "Name of the Account to be created. The user will be added to this newly created account. If no Account is specified, the username will be used as the Account name.")
|
||||||
private String accountName;
|
private String accountName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT_TYPE,
|
@Parameter(name = ApiConstants.ACCOUNT_TYPE,
|
||||||
|
|
@ -64,13 +64,13 @@ public class CreateAccountCmd extends BaseCmd {
|
||||||
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Creates the user under the specified domain.")
|
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Creates the user under the specified domain.")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, required = true, description = "email")
|
@Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, required = true, description = "E-mail")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.FIRSTNAME, type = CommandType.STRING, required = true, description = "firstname")
|
@Parameter(name = ApiConstants.FIRSTNAME, type = CommandType.STRING, required = true, description = "First name")
|
||||||
private String firstName;
|
private String firstName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.LASTNAME, type = CommandType.STRING, required = true, description = "lastname")
|
@Parameter(name = ApiConstants.LASTNAME, type = CommandType.STRING, required = true, description = "Last name")
|
||||||
private String lastName;
|
private String lastName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PASSWORD,
|
@Parameter(name = ApiConstants.PASSWORD,
|
||||||
|
|
@ -87,16 +87,16 @@ public class CreateAccountCmd extends BaseCmd {
|
||||||
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "Unique username.")
|
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "Unique username.")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "Network domain for the account's networks")
|
@Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "Network domain for the Account's Networks")
|
||||||
private String networkDomain;
|
private String networkDomain;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "details for account used to store specific parameters")
|
@Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "Details for Account used to store specific parameters")
|
||||||
private Map<String, String> details;
|
private Map<String, String> details;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.STRING, description = "Account UUID, required for adding account from external provisioning system")
|
@Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.STRING, description = "Account UUID, required for adding Account from external provisioning system")
|
||||||
private String accountUUID;
|
private String accountUUID;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.USER_ID, type = CommandType.STRING, description = "User UUID, required for adding account from external provisioning system")
|
@Parameter(name = ApiConstants.USER_ID, type = CommandType.STRING, description = "User UUID, required for adding Account from external provisioning system")
|
||||||
private String userUUID;
|
private String userUUID;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import org.apache.cloudstack.region.RegionService;
|
||||||
import com.cloud.event.EventTypes;
|
import com.cloud.event.EventTypes;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
|
|
||||||
@APICommand(name = "deleteAccount", description = "Deletes a account, and all users associated with this account", responseObject = SuccessResponse.class, entityType = {Account.class},
|
@APICommand(name = "deleteAccount", description = "Deletes an Account and all Users associated with this Account", responseObject = SuccessResponse.class, entityType = {Account.class},
|
||||||
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
|
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
|
||||||
public class DeleteAccountCmd extends BaseAsyncCmd {
|
public class DeleteAccountCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
|
|
@ -79,8 +79,8 @@ public class DeleteAccountCmd extends BaseAsyncCmd {
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
Account account = _accountService.getAccount(getId());
|
Account account = _accountService.getAccount(getId());
|
||||||
return (account != null ? "Deleting user account " + account.getAccountName() + " (ID: " + account.getUuid() + ") and all corresponding users"
|
return (account != null ? "Deleting user Account " + account.getAccountName() + " (ID: " + account.getUuid() + ") and all corresponding users"
|
||||||
: "Account delete, but this account does not exist in the system");
|
: "Cannot delete Account - it does not exist in the system");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -50,13 +50,13 @@ public class DisableAccountCmd extends BaseAsyncCmd {
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account id")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Disables specified account.")
|
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Disables specified Account.")
|
||||||
private String accountName;
|
private String accountName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Disables specified account in this domain.")
|
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Disables specified Account in this domain.")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.LOCK, type = CommandType.BOOLEAN, required = true, description = "If true, only lock the account; else disable the account")
|
@Parameter(name = ApiConstants.LOCK, type = CommandType.BOOLEAN, required = true, description = "If true, only lock the Account; else disable the Account")
|
||||||
private Boolean lockRequested;
|
private Boolean lockRequested;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|
@ -108,7 +108,7 @@ public class DisableAccountCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "disabling account: " + getAccountName() + " in domain: " + getDomainId();
|
return "Disabling Account: " + getAccountName() + " in domain: " + getDomainId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -120,7 +120,7 @@ public class DisableAccountCmd extends BaseAsyncCmd {
|
||||||
response.setResponseName(getCommandName());
|
response.setResponseName(getCommandName());
|
||||||
setResponseObject(response);
|
setResponseObject(response);
|
||||||
} else {
|
} else {
|
||||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, lockRequested == true ? "Failed to lock account" : "Failed to disable account");
|
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, lockRequested == true ? "Failed to lock Account" : "Failed to disable Account");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,10 @@ public class EnableAccountCmd extends BaseCmd {
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account id")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Enables specified account.")
|
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Enables specified Account.")
|
||||||
private String accountName;
|
private String accountName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Enables specified account in this domain.")
|
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Enables specified Account in this domain.")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|
@ -98,7 +98,7 @@ public class EnableAccountCmd extends BaseCmd {
|
||||||
response.setResponseName(getCommandName());
|
response.setResponseName(getCommandName());
|
||||||
setResponseObject(response);
|
setResponseObject(response);
|
||||||
} else {
|
} else {
|
||||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to enable account");
|
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to enable Account");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import org.apache.cloudstack.api.response.AccountResponse;
|
||||||
|
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
|
|
||||||
@APICommand(name = "listAccounts", description = "Lists accounts and provides detailed account information for listed accounts", responseObject = AccountResponse.class, responseView = ResponseView.Full, entityType = {Account.class},
|
@APICommand(name = "listAccounts", description = "Lists Accounts and provides detailed Account information for listed Accounts", responseObject = AccountResponse.class, responseView = ResponseView.Full, entityType = {Account.class},
|
||||||
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
|
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
|
||||||
public class ListAccountsCmdByAdmin extends ListAccountsCmd {
|
public class ListAccountsCmdByAdmin extends ListAccountsCmd {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import com.cloud.user.Account;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|
||||||
@APICommand(name = "lockAccount",
|
@APICommand(name = "lockAccount",
|
||||||
description = "This deprecated function used to locks an account. Look for the API DisableAccount instead",
|
description = "This deprecated function used to lock an Account. Look for the API DisableAccount instead",
|
||||||
responseObject = AccountResponse.class,
|
responseObject = AccountResponse.class,
|
||||||
entityType = {Account.class},
|
entityType = {Account.class},
|
||||||
requestHasSensitiveInfo = false,
|
requestHasSensitiveInfo = false,
|
||||||
|
|
@ -47,7 +47,7 @@ public class LockAccountCmd extends BaseCmd {
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = DomainResponse.class,
|
entityType = DomainResponse.class,
|
||||||
required = true,
|
required = true,
|
||||||
description = "Locks the specified account on this domain.")
|
description = "Locks the specified Account on this domain.")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
@ -78,6 +78,6 @@ public class LockAccountCmd extends BaseCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
throw new CloudRuntimeException("LockAccount does not lock accounts. Its implementation is disabled. Use DisableAccount instead");
|
throw new CloudRuntimeException("LockAccount does not lock Accounts. Its implementation is disabled. Use DisableAccount instead.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ import org.apache.cloudstack.region.RegionService;
|
||||||
|
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
|
|
||||||
@APICommand(name = "updateAccount", description = "Updates account information for the authenticated user", responseObject = AccountResponse.class, entityType = {Account.class},
|
@APICommand(name = "updateAccount", description = "Updates Account information for the authenticated user", responseObject = AccountResponse.class, entityType = {Account.class},
|
||||||
responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
|
responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
|
||||||
public class UpdateAccountCmd extends BaseCmd implements UserCmd {
|
public class UpdateAccountCmd extends BaseCmd implements UserCmd {
|
||||||
|
|
||||||
|
|
@ -52,24 +52,24 @@ public class UpdateAccountCmd extends BaseCmd implements UserCmd {
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account UUID")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account UUID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Current account name")
|
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Current Account name")
|
||||||
private String accountName;
|
private String accountName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "The UUID of the domain where the account exists")
|
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "The UUID of the domain where the Account exists")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ROLE_ID, type = CommandType.UUID, entityType = RoleResponse.class, description = "The UUID of the dynamic role to set for the account")
|
@Parameter(name = ApiConstants.ROLE_ID, type = CommandType.UUID, entityType = RoleResponse.class, description = "The UUID of the dynamic role to set for the Account")
|
||||||
private Long roleId;
|
private Long roleId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NEW_NAME, type = CommandType.STRING, description = "New name for the account")
|
@Parameter(name = ApiConstants.NEW_NAME, type = CommandType.STRING, description = "New name for the Account")
|
||||||
private String newName;
|
private String newName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NETWORK_DOMAIN,
|
@Parameter(name = ApiConstants.NETWORK_DOMAIN,
|
||||||
type = CommandType.STRING,
|
type = CommandType.STRING,
|
||||||
description = "Network domain for the account's networks; empty string will update domainName with NULL value")
|
description = "Network domain for the Account's networks; empty string will update domainName with NULL value")
|
||||||
private String networkDomain;
|
private String networkDomain;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "Details for the account used to store specific parameters")
|
@Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "Details for the Account used to store specific parameters")
|
||||||
private Map details;
|
private Map details;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.API_KEY_ACCESS, type = CommandType.STRING, description = "Determines if Api key access for this user is enabled, disabled or inherits the value from its parent, the domain level setting api.key.access", since = "4.20.1.0", authorized = {RoleType.Admin})
|
@Parameter(name = ApiConstants.API_KEY_ACCESS, type = CommandType.STRING, description = "Determines if Api key access for this user is enabled, disabled or inherits the value from its parent, the domain level setting api.key.access", since = "4.20.1.0", authorized = {RoleType.Admin})
|
||||||
|
|
@ -144,7 +144,7 @@ public class UpdateAccountCmd extends BaseCmd implements UserCmd {
|
||||||
response.setResponseName(getCommandName());
|
response.setResponseName(getCommandName());
|
||||||
setResponseObject(response);
|
setResponseObject(response);
|
||||||
} else {
|
} else {
|
||||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update account");
|
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Account");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ public class CreateRoleCmd extends RoleCmd {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getRoleId() != null && getRoleId() < 1L) {
|
if (getRoleId() != null && getRoleId() < 1L) {
|
||||||
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role id provided");
|
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role ID provided");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ public class UpdateRoleCmd extends RoleCmd {
|
||||||
description = "ID of the role", validations = {ApiArgValidator.PositiveNumber})
|
description = "ID of the role", validations = {ApiArgValidator.PositiveNumber})
|
||||||
private Long roleId;
|
private Long roleId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING, description = "creates a role with this unique name")
|
@Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING, description = "Creates a role with this unique name")
|
||||||
private String roleName;
|
private String roleName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DESCRIPTION, type = BaseCmd.CommandType.STRING, description = "The description of the role")
|
@Parameter(name = ApiConstants.DESCRIPTION, type = BaseCmd.CommandType.STRING, description = "The description of the role")
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public class UpdateRolePermissionCmd extends BaseCmd {
|
||||||
private Long roleId;
|
private Long roleId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.RULE_ORDER, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = RolePermissionResponse.class,
|
@Parameter(name = ApiConstants.RULE_ORDER, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = RolePermissionResponse.class,
|
||||||
description = "The parent role permission uuid, use 0 to move this rule at the top of the list")
|
description = "The parent role permission UUID, use 0 to move this rule at the top of the list")
|
||||||
private List<Long> rulePermissionOrder;
|
private List<Long> rulePermissionOrder;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.RULE_ID, type = CommandType.UUID, entityType = RolePermissionResponse.class,
|
@Parameter(name = ApiConstants.RULE_ID, type = CommandType.UUID, entityType = RolePermissionResponse.class,
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public class CreateProjectRoleCmd extends ProjectRoleCmd {
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING, required = true,
|
@Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING, required = true,
|
||||||
description = "creates a project role with this unique name")
|
description = "Creates a project role with this unique name")
|
||||||
private String projectRoleName;
|
private String projectRoleName;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public class UpdateProjectRoleCmd extends ProjectRoleCmd {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING,
|
@Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING,
|
||||||
description = "creates a project role with this unique name", validations = {ApiArgValidator.NotNullOrEmpty})
|
description = "Creates a project role with this unique name", validations = {ApiArgValidator.NotNullOrEmpty})
|
||||||
private String projectRoleName;
|
private String projectRoleName;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ public class UpdateProjectRolePermissionCmd extends BaseCmd {
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.RULE_ORDER, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ProjectRolePermissionResponse.class,
|
@Parameter(name = ApiConstants.RULE_ORDER, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ProjectRolePermissionResponse.class,
|
||||||
description = "The parent role permission uuid, use 0 to move this rule at the top of the list")
|
description = "ID of the parent role permission, use 0 to move this rule at the top of the list")
|
||||||
private List<Long> projectRulePermissionOrder;
|
private List<Long> projectRulePermissionOrder;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PROJECT_ROLE_PERMISSION_ID, type = CommandType.UUID, entityType = ProjectRolePermissionResponse.class,
|
@Parameter(name = ApiConstants.PROJECT_ROLE_PERMISSION_ID, type = CommandType.UUID, entityType = ProjectRolePermissionResponse.class,
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class AcquirePodIpCmdByAdmin extends BaseCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.STRING, entityType = ZoneResponse.class, required = true, description = "the ID of the zone")
|
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.STRING, entityType = ZoneResponse.class, required = true, description = "The ID of the zone")
|
||||||
private String zoneId;
|
private String zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.POD_ID, type = CommandType.STRING, entityType = ZoneResponse.class, required = false, description = "Pod ID")
|
@Parameter(name = ApiConstants.POD_ID, type = CommandType.STRING, entityType = ZoneResponse.class, required = false, description = "Pod ID")
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import org.apache.cloudstack.api.command.admin.AdminCmd;
|
||||||
import org.apache.cloudstack.api.command.user.address.AssociateIPAddrCmd;
|
import org.apache.cloudstack.api.command.user.address.AssociateIPAddrCmd;
|
||||||
import org.apache.cloudstack.api.response.IPAddressResponse;
|
import org.apache.cloudstack.api.response.IPAddressResponse;
|
||||||
|
|
||||||
@APICommand(name = "associateIpAddress", description = "Acquires and associates a public IP to an account.", responseObject = IPAddressResponse.class, responseView = ResponseView.Full,
|
@APICommand(name = "associateIpAddress", description = "Acquires and associates a public IP to an Account.", responseObject = IPAddressResponse.class, responseView = ResponseView.Full,
|
||||||
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
|
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
|
||||||
public class AssociateIPAddrCmdByAdmin extends AssociateIPAddrCmd implements AdminCmd {
|
public class AssociateIPAddrCmdByAdmin extends AssociateIPAddrCmd implements AdminCmd {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,6 @@ import org.apache.cloudstack.api.response.IPAddressResponse;
|
||||||
|
|
||||||
import com.cloud.network.IpAddress;
|
import com.cloud.network.IpAddress;
|
||||||
|
|
||||||
@APICommand(name = "listPublicIpAddresses", description = "Lists all public ip addresses", responseObject = IPAddressResponse.class, responseView = ResponseView.Full,
|
@APICommand(name = "listPublicIpAddresses", description = "Lists all public IP addresses", responseObject = IPAddressResponse.class, responseView = ResponseView.Full,
|
||||||
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, entityType = {IpAddress.class})
|
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, entityType = {IpAddress.class})
|
||||||
public class ListPublicIpAddressesCmdByAdmin extends ListPublicIpAddressesCmd implements AdminCmd {}
|
public class ListPublicIpAddressesCmdByAdmin extends ListPublicIpAddressesCmd implements AdminCmd {}
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ public class ReleasePodIpCmdByAdmin extends BaseCmd {
|
||||||
response.setDisplayText("IP is released successfully");
|
response.setDisplayText("IP is released successfully");
|
||||||
setResponseObject(response);
|
setResponseObject(response);
|
||||||
} else {
|
} else {
|
||||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release Pod ip ");
|
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release Pod IP");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import org.apache.cloudstack.api.response.UserVmResponse;
|
||||||
import com.cloud.vm.VirtualMachine;
|
import com.cloud.vm.VirtualMachine;
|
||||||
|
|
||||||
|
|
||||||
@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 "
|
@APICommand(name = "updateVMAffinityGroup", description = "Updates the affinity/anti-affinity group associations of an Instance. The Instance has to be stopped and restarted for the "
|
||||||
+ "new properties to take effect.", responseObject = UserVmResponse.class, responseView = ResponseView.Full,
|
+ "new properties to take effect.", responseObject = UserVmResponse.class, responseView = ResponseView.Full,
|
||||||
entityType = {VirtualMachine.class},
|
entityType = {VirtualMachine.class},
|
||||||
requestHasSensitiveInfo = false,
|
requestHasSensitiveInfo = false,
|
||||||
|
|
|
||||||
|
|
@ -33,22 +33,22 @@ import org.apache.cloudstack.api.response.AnnotationResponse;
|
||||||
import org.apache.cloudstack.context.CallContext;
|
import org.apache.cloudstack.context.CallContext;
|
||||||
import org.apache.commons.lang3.BooleanUtils;
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
|
|
||||||
@APICommand(name = "addAnnotation", description = "add an annotation.", responseObject = AnnotationResponse.class,
|
@APICommand(name = "addAnnotation", description = "Add an annotation.", responseObject = AnnotationResponse.class,
|
||||||
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.11", authorized = {RoleType.Admin})
|
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.11", authorized = {RoleType.Admin})
|
||||||
public class AddAnnotationCmd extends BaseCmd {
|
public class AddAnnotationCmd extends BaseCmd {
|
||||||
|
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ANNOTATION, type = CommandType.STRING, description = "the annotation text")
|
@Parameter(name = ApiConstants.ANNOTATION, type = CommandType.STRING, description = "The annotation text")
|
||||||
private String annotation;
|
private String annotation;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ENTITY_TYPE, type = CommandType.STRING, description = "The following entity types are allowed VM, VOLUME, SNAPSHOT, VM_SNAPSHOT, INSTANCE_GROUP, SSH_KEYPAIR, USER_DATA, NETWORK, VPC, PUBLIC_IP_ADDRESS, VPN_CUSTOMER_GATEWAY, TEMPLATE, ISO, KUBERNETES_CLUSTER, SERVICE_OFFERING, DISK_OFFERING, NETWORK_OFFERING, ZONE, POD, CLUSTER, HOST, DOMAIN, PRIMARY_STORAGE, SECONDARY_STORAGE, VR, SYSTEM_VM, AUTOSCALE_VM_GROUP, MANAGEMENT_SERVER")
|
@Parameter(name = ApiConstants.ENTITY_TYPE, type = CommandType.STRING, description = "The following entity types are allowed VM, VOLUME, SNAPSHOT, VM_SNAPSHOT, INSTANCE_GROUP, SSH_KEYPAIR, USER_DATA, NETWORK, VPC, PUBLIC_IP_ADDRESS, VPN_CUSTOMER_GATEWAY, TEMPLATE, ISO, KUBERNETES_CLUSTER, SERVICE_OFFERING, DISK_OFFERING, NETWORK_OFFERING, ZONE, POD, CLUSTER, HOST, DOMAIN, PRIMARY_STORAGE, SECONDARY_STORAGE, VR, SYSTEM_VM, AUTOSCALE_VM_GROUP, MANAGEMENT_SERVER")
|
||||||
private String entityType;
|
private String entityType;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "the id of the entity to annotate")
|
@Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "The ID of the entity to annotate")
|
||||||
private String entityUuid;
|
private String entityUuid;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ADMINS_ONLY, type = CommandType.BOOLEAN, since = "4.16.0",
|
@Parameter(name = ApiConstants.ADMINS_ONLY, type = CommandType.BOOLEAN, since = "4.16.0",
|
||||||
description = "the annotation is visible for admins only")
|
description = "The annotation is visible for admins only")
|
||||||
private Boolean adminsOnly;
|
private Boolean adminsOnly;
|
||||||
|
|
||||||
public String getAnnotation() {
|
public String getAnnotation() {
|
||||||
|
|
@ -77,7 +77,7 @@ public class AddAnnotationCmd extends BaseCmd {
|
||||||
public void execute()
|
public void execute()
|
||||||
throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException,
|
throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException,
|
||||||
NetworkRuleConflictException {
|
NetworkRuleConflictException {
|
||||||
Preconditions.checkNotNull(getEntityUuid(),"I have to have an entity to set an annotation on!");
|
Preconditions.checkNotNull(getEntityUuid(),"I need to have an entity to set an annotation on!");
|
||||||
Preconditions.checkState(AnnotationService.EntityType.contains(entityType),(java.lang.String)"'%s' is not a valid EntityType to put annotations on", entityType);
|
Preconditions.checkState(AnnotationService.EntityType.contains(entityType),(java.lang.String)"'%s' is not a valid EntityType to put annotations on", entityType);
|
||||||
AnnotationResponse annotationResponse = annotationService.addAnnotation(this);
|
AnnotationResponse annotationResponse = annotationService.addAnnotation(this);
|
||||||
annotationResponse.setResponseName(getCommandName());
|
annotationResponse.setResponseName(getCommandName());
|
||||||
|
|
|
||||||
|
|
@ -37,22 +37,22 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
public class ListAnnotationsCmd extends BaseListCmd {
|
public class ListAnnotationsCmd extends BaseListCmd {
|
||||||
|
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.STRING, description = "the id of the annotation")
|
@Parameter(name = ApiConstants.ID, type = CommandType.STRING, description = "The ID of the annotation")
|
||||||
private String uuid;
|
private String uuid;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ENTITY_TYPE, type = CommandType.STRING, description = "the entity type")
|
@Parameter(name = ApiConstants.ENTITY_TYPE, type = CommandType.STRING, description = "The entity type")
|
||||||
private String entityType;
|
private String entityType;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "the id of the entity for which to show annotations")
|
@Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "The ID of the entity for which to show annotations")
|
||||||
private String entityUuid;
|
private String entityUuid;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.USER_ID, type = CommandType.STRING, since = "4.16.0",
|
@Parameter(name = ApiConstants.USER_ID, type = CommandType.STRING, since = "4.16.0",
|
||||||
description = "optional: the id of the user of the annotation", required = false)
|
description = "Optional: The ID of the user of the annotation", required = false)
|
||||||
private String userUuid;
|
private String userUuid;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ANNOTATION_FILTER,
|
@Parameter(name = ApiConstants.ANNOTATION_FILTER,
|
||||||
type = CommandType.STRING, since = "4.16.0",
|
type = CommandType.STRING, since = "4.16.0",
|
||||||
description = "possible values are \"self\" and \"all\". "
|
description = "Possible values are \"self\" and \"all\". "
|
||||||
+ "* self : annotations that have been created by the calling user. "
|
+ "* self : annotations that have been created by the calling user. "
|
||||||
+ "* all : all the annotations the calling user can access")
|
+ "* all : all the annotations the calling user can access")
|
||||||
private String annotationFilter;
|
private String annotationFilter;
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@ import org.apache.cloudstack.api.ServerApiException;
|
||||||
import org.apache.cloudstack.api.response.AnnotationResponse;
|
import org.apache.cloudstack.api.response.AnnotationResponse;
|
||||||
import org.apache.cloudstack.context.CallContext;
|
import org.apache.cloudstack.context.CallContext;
|
||||||
|
|
||||||
@APICommand(name = "removeAnnotation", description = "remove an annotation.", responseObject = AnnotationResponse.class,
|
@APICommand(name = "removeAnnotation", description = "Remove an annotation.", responseObject = AnnotationResponse.class,
|
||||||
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.11", authorized = {RoleType.Admin})
|
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.11", authorized = {RoleType.Admin})
|
||||||
public class RemoveAnnotationCmd extends BaseCmd {
|
public class RemoveAnnotationCmd extends BaseCmd {
|
||||||
|
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.STRING, required = true, description = "the id of the annotation")
|
@Parameter(name = ApiConstants.ID, type = CommandType.STRING, required = true, description = "The ID of the annotation")
|
||||||
private String uuid;
|
private String uuid;
|
||||||
|
|
||||||
public String getUuid() {
|
public String getUuid() {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ import org.apache.cloudstack.api.ServerApiException;
|
||||||
import org.apache.cloudstack.api.response.AnnotationResponse;
|
import org.apache.cloudstack.api.response.AnnotationResponse;
|
||||||
import org.apache.cloudstack.context.CallContext;
|
import org.apache.cloudstack.context.CallContext;
|
||||||
|
|
||||||
@APICommand(name = "updateAnnotationVisibility", description = "update an annotation visibility.",
|
@APICommand(name = "updateAnnotationVisibility", description = "Update an annotation visibility.",
|
||||||
responseObject = AnnotationResponse.class,
|
responseObject = AnnotationResponse.class,
|
||||||
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false,
|
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false,
|
||||||
since = "4.16", authorized = {RoleType.Admin})
|
since = "4.16", authorized = {RoleType.Admin})
|
||||||
|
|
@ -38,11 +38,11 @@ public class UpdateAnnotationVisibilityCmd extends BaseCmd {
|
||||||
|
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.STRING, required = true,
|
@Parameter(name = ApiConstants.ID, type = CommandType.STRING, required = true,
|
||||||
description = "the id of the annotation")
|
description = "The ID of the annotation")
|
||||||
private String uuid;
|
private String uuid;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ADMINS_ONLY, type = CommandType.BOOLEAN, required = true,
|
@Parameter(name = ApiConstants.ADMINS_ONLY, type = CommandType.BOOLEAN, required = true,
|
||||||
description = "the annotation is visible for admins only")
|
description = "The annotation is visible for admins only")
|
||||||
private Boolean adminsOnly;
|
private Boolean adminsOnly;
|
||||||
|
|
||||||
public String getUuid() {
|
public String getUuid() {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ import com.cloud.event.EventTypes;
|
||||||
import com.cloud.network.as.Counter;
|
import com.cloud.network.as.Counter;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
|
|
||||||
@APICommand(name = "createCounter", description = "Adds metric counter for VM auto scaling", responseObject = CounterResponse.class,
|
@APICommand(name = "createCounter", description = "Adds metric counter for Instance auto scaling", responseObject = CounterResponse.class,
|
||||||
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
|
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
|
||||||
public class CreateCounterCmd extends BaseAsyncCreateCmd {
|
public class CreateCounterCmd extends BaseAsyncCreateCmd {
|
||||||
private static final String s_name = "counterresponse";
|
private static final String s_name = "counterresponse";
|
||||||
|
|
@ -116,7 +116,7 @@ public class CreateCounterCmd extends BaseAsyncCreateCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "creating a new Counter";
|
return "Creating a new Counter";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ import com.cloud.event.EventTypes;
|
||||||
import com.cloud.exception.ResourceInUseException;
|
import com.cloud.exception.ResourceInUseException;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
|
|
||||||
@APICommand(name = "deleteCounter", description = "Deletes a counter for VM auto scaling", responseObject = SuccessResponse.class,
|
@APICommand(name = "deleteCounter", description = "Deletes a counter for Instance auto scaling", responseObject = SuccessResponse.class,
|
||||||
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
|
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
|
||||||
public class DeleteCounterCmd extends BaseAsyncCmd {
|
public class DeleteCounterCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class DeleteCounterCmd extends BaseAsyncCmd {
|
||||||
// ////////////// API parameters /////////////////////
|
// ////////////// API parameters /////////////////////
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = CounterResponse.class, required = true, description = "the ID of the counter")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = CounterResponse.class, required = true, description = "The ID of the counter")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -55,11 +55,11 @@ public class ImportBackupOfferingCmd extends BaseAsyncCmd {
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true,
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true,
|
||||||
description = "the name of the backup offering")
|
description = "The name of the backup offering")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, required = true,
|
@Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, required = true,
|
||||||
description = "the description of the backup offering")
|
description = "The description of the backup offering")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.EXTERNAL_ID,
|
@Parameter(name = ApiConstants.EXTERNAL_ID,
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ public class ProvisionCertificateCmd extends BaseAsyncCmd {
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, required = true, entityType = HostResponse.class,
|
@Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, required = true, entityType = HostResponse.class,
|
||||||
description = "The host/agent uuid to which the certificate has to be provisioned (issued and propagated)")
|
description = "The host/agent ID to which the certificate has to be provisioned (issued and propagated)")
|
||||||
private Long hostId;
|
private Long hostId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.RECONNECT, type = CommandType.BOOLEAN,
|
@Parameter(name = ApiConstants.RECONNECT, type = CommandType.BOOLEAN,
|
||||||
|
|
@ -108,7 +108,7 @@ public class ProvisionCertificateCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "provisioning certificate for host id=" + hostId + " using provider=" + provider;
|
return "Provisioning certificate for host id=" + hostId + " using provider=" + provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,6 @@ public class RevokeCertificateCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "revoking certificate with serial id=" + serial + ", cn=" + cn;
|
return "Revoking certificate with serial id=" + serial + ", cn=" + cn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,48 +44,48 @@ import com.cloud.user.Account;
|
||||||
requestHasSensitiveInfo = true, responseHasSensitiveInfo = false)
|
requestHasSensitiveInfo = true, responseHasSensitiveInfo = false)
|
||||||
public class AddClusterCmd extends BaseCmd {
|
public class AddClusterCmd extends BaseCmd {
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, required = true, description = "the cluster name")
|
@Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, required = true, description = "The cluster name")
|
||||||
private String clusterName;
|
private String clusterName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = false, description = "the password for the host")
|
@Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = false, description = "The password for the host")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "the Pod ID for the host")
|
@Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "The Pod ID for the host")
|
||||||
private Long podId;
|
private Long podId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, description = "the URL")
|
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, description = "The URL")
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = false, description = "the username for the cluster")
|
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = false, description = "The username for the cluster")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the Zone ID for the cluster")
|
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "The Zone ID for the cluster")
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR,
|
@Parameter(name = ApiConstants.HYPERVISOR,
|
||||||
type = CommandType.STRING,
|
type = CommandType.STRING,
|
||||||
required = true,
|
required = true,
|
||||||
description = "hypervisor type of the cluster: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator,Ovm3,External")
|
description = "Hypervisor type of the cluster: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator,Ovm3,External")
|
||||||
private String hypervisor;
|
private String hypervisor;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
|
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
|
||||||
description = "the CPU arch of the cluster. Valid options are: x86_64, aarch64, s390x",
|
description = "The CPU arch of the cluster. Valid options are: x86_64, aarch64, s390x",
|
||||||
since = "4.20")
|
since = "4.20")
|
||||||
private String arch;
|
private String arch;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, required = true, description = "type of the cluster: CloudManaged, ExternalManaged")
|
@Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, required = true, description = "Type of the cluster: CloudManaged, ExternalManaged")
|
||||||
private String clusterType;
|
private String clusterType;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this cluster for allocation of new resources")
|
@Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this cluster for allocation of new resources")
|
||||||
private String allocationState;
|
private String allocationState;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.VSM_USERNAME, type = CommandType.STRING, required = false, description = "the username for the VSM associated with this cluster")
|
@Parameter(name = ApiConstants.VSM_USERNAME, type = CommandType.STRING, required = false, description = "The username for the VSM associated with this cluster")
|
||||||
private String vsmusername;
|
private String vsmusername;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.VSM_PASSWORD, type = CommandType.STRING, required = false, description = "the password for the VSM associated with this cluster")
|
@Parameter(name = ApiConstants.VSM_PASSWORD, type = CommandType.STRING, required = false, description = "The password for the VSM associated with this cluster")
|
||||||
private String vsmpassword;
|
private String vsmpassword;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.VSM_IPADDRESS, type = CommandType.STRING, required = false, description = "the ipaddress of the VSM associated with this cluster")
|
@Parameter(name = ApiConstants.VSM_IPADDRESS, type = CommandType.STRING, required = false, description = "The IP address of the VSM associated with this cluster")
|
||||||
private String vsmipaddress;
|
private String vsmipaddress;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.VSWITCH_TYPE_GUEST_TRAFFIC,
|
@Parameter(name = ApiConstants.VSWITCH_TYPE_GUEST_TRAFFIC,
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class DeleteClusterCmd extends BaseCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, required = true, description = "the cluster ID")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, required = true, description = "The cluster ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -52,31 +52,31 @@ public class ListClustersCmd extends BaseListCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "lists clusters by the cluster ID")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "Lists clusters by the cluster ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "lists clusters by the cluster name")
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Lists clusters by the cluster name")
|
||||||
private String clusterName;
|
private String clusterName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "lists clusters by Pod ID")
|
@Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "Lists clusters by Pod ID")
|
||||||
private Long podId;
|
private Long podId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "lists clusters by Zone ID")
|
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "Lists clusters by Zone ID")
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "lists clusters by hypervisor type")
|
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "Lists clusters by hypervisor type")
|
||||||
private String hypervisorType;
|
private String hypervisorType;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, description = "lists clusters by cluster type")
|
@Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, description = "Lists clusters by cluster type")
|
||||||
private String clusterType;
|
private String clusterType;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "lists clusters by allocation state")
|
@Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Lists clusters by allocation state")
|
||||||
private String allocationState;
|
private String allocationState;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.MANAGED_STATE, type = CommandType.STRING, description = "whether this cluster is managed by cloudstack")
|
@Parameter(name = ApiConstants.MANAGED_STATE, type = CommandType.STRING, description = "Whether this cluster is managed by cloudstack")
|
||||||
private String managedState;
|
private String managedState;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.SHOW_CAPACITIES, type = CommandType.BOOLEAN, description = "flag to display the capacity of the clusters")
|
@Parameter(name = ApiConstants.SHOW_CAPACITIES, type = CommandType.BOOLEAN, description = "Flag to display the capacity of the clusters")
|
||||||
private Boolean showCapacities;
|
private Boolean showCapacities;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
|
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
|
||||||
|
|
|
||||||
|
|
@ -39,22 +39,22 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
public class UpdateClusterCmd extends BaseCmd {
|
public class UpdateClusterCmd extends BaseCmd {
|
||||||
|
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, required = true, description = "the ID of the Cluster")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, required = true, description = "The ID of the Cluster")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, description = "the cluster name")
|
@Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, description = "The cluster name")
|
||||||
private String clusterName;
|
private String clusterName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "hypervisor type of the cluster")
|
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "Hypervisor type of the cluster")
|
||||||
private String hypervisor;
|
private String hypervisor;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, description = "hypervisor type of the cluster")
|
@Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, description = "Hypervisor type of the cluster")
|
||||||
private String clusterType;
|
private String clusterType;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this cluster for allocation of new resources")
|
@Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this cluster for allocation of new resources")
|
||||||
private String allocationState;
|
private String allocationState;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.MANAGED_STATE, type = CommandType.STRING, description = "whether this cluster is managed by cloudstack")
|
@Parameter(name = ApiConstants.MANAGED_STATE, type = CommandType.STRING, description = "Whether this cluster is managed by cloudstack")
|
||||||
private String managedState;
|
private String managedState;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
|
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class ListCfgGroupsByCmd extends BaseListCmd {
|
||||||
// ////////////// API parameters /////////////////////
|
// ////////////// API parameters /////////////////////
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.GROUP, type = CommandType.STRING, description = "lists configuration group by group name")
|
@Parameter(name = ApiConstants.GROUP, type = CommandType.STRING, description = "Lists configuration group by group name")
|
||||||
private String groupName;
|
private String groupName;
|
||||||
|
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -52,55 +52,55 @@ public class ListCfgsByCmd extends BaseListCmd {
|
||||||
// ////////////// API parameters /////////////////////
|
// ////////////// API parameters /////////////////////
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CATEGORY, type = CommandType.STRING, description = "lists configurations by category")
|
@Parameter(name = ApiConstants.CATEGORY, type = CommandType.STRING, description = "Lists configurations by category")
|
||||||
private String category;
|
private String category;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "lists configuration by name")
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Lists configuration by name")
|
||||||
private String configName;
|
private String configName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID,
|
@Parameter(name = ApiConstants.ZONE_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = ZoneResponse.class,
|
entityType = ZoneResponse.class,
|
||||||
description = "the ID of the Zone to update the parameter value for corresponding zone")
|
description = "The ID of the Zone to update the parameter value for corresponding zone")
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_ID,
|
@Parameter(name = ApiConstants.CLUSTER_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = ClusterResponse.class,
|
entityType = ClusterResponse.class,
|
||||||
description = "the ID of the Cluster to update the parameter value for corresponding cluster")
|
description = "The ID of the Cluster to update the parameter value for corresponding cluster")
|
||||||
private Long clusterId;
|
private Long clusterId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.STORAGE_ID,
|
@Parameter(name = ApiConstants.STORAGE_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = StoragePoolResponse.class,
|
entityType = StoragePoolResponse.class,
|
||||||
description = "the ID of the Storage pool to update the parameter value for corresponding storage pool")
|
description = "The ID of the Storage pool to update the parameter value for corresponding storage pool")
|
||||||
private Long storagePoolId;
|
private Long storagePoolId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT_ID,
|
@Parameter(name = ApiConstants.ACCOUNT_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = AccountResponse.class,
|
entityType = AccountResponse.class,
|
||||||
description = "the ID of the Account to update the parameter value for corresponding account")
|
description = "The ID of the Account to update the parameter value for corresponding account")
|
||||||
private Long accountId;
|
private Long accountId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DOMAIN_ID,
|
@Parameter(name = ApiConstants.DOMAIN_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = DomainResponse.class,
|
entityType = DomainResponse.class,
|
||||||
description = "the ID of the Domain to update the parameter value for corresponding domain")
|
description = "The ID of the Domain to update the parameter value for corresponding domain")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IMAGE_STORE_UUID,
|
@Parameter(name = ApiConstants.IMAGE_STORE_UUID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = ImageStoreResponse.class,
|
entityType = ImageStoreResponse.class,
|
||||||
description = "the ID of the Image Store to update the parameter value for corresponding image store")
|
description = "The ID of the Image Store to update the parameter value for corresponding image store")
|
||||||
private Long imageStoreId;
|
private Long imageStoreId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.GROUP, type = CommandType.STRING, description = "lists configuration by group name (primarily used for UI)", since = "4.18.0")
|
@Parameter(name = ApiConstants.GROUP, type = CommandType.STRING, description = "Lists configuration by group name (primarily used for UI)", since = "4.18.0")
|
||||||
private String groupName;
|
private String groupName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.SUBGROUP, type = CommandType.STRING, description = "lists configuration by subgroup name (primarily used for UI)", since = "4.18.0")
|
@Parameter(name = ApiConstants.SUBGROUP, type = CommandType.STRING, description = "Lists configuration by subgroup name (primarily used for UI)", since = "4.18.0")
|
||||||
private String subGroupName;
|
private String subGroupName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PARENT, type = CommandType.STRING, description = "lists configuration by parent name (primarily used for UI)", since = "4.18.0")
|
@Parameter(name = ApiConstants.PARENT, type = CommandType.STRING, description = "Lists configuration by parent name (primarily used for UI)", since = "4.18.0")
|
||||||
private String parentName;
|
private String parentName;
|
||||||
|
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public class ListHypervisorCapabilitiesCmd extends BaseListCmd {
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HypervisorCapabilitiesResponse.class, description = "ID of the hypervisor capability")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HypervisorCapabilitiesResponse.class, description = "ID of the hypervisor capability")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "the hypervisor for which to restrict the search")
|
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "The hypervisor for which to restrict the search")
|
||||||
private String hypervisor;
|
private String hypervisor;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -45,43 +45,43 @@ public class ResetCfgCmd extends BaseCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the configuration", validations = {ApiArgValidator.NotNullOrEmpty})
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the configuration", validations = {ApiArgValidator.NotNullOrEmpty})
|
||||||
private String cfgName;
|
private String cfgName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID,
|
@Parameter(name = ApiConstants.ZONE_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = ZoneResponse.class,
|
entityType = ZoneResponse.class,
|
||||||
description = "the ID of the Zone to reset the parameter value for corresponding zone")
|
description = "The ID of the Zone to reset the parameter value for corresponding zone")
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_ID,
|
@Parameter(name = ApiConstants.CLUSTER_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = ClusterResponse.class,
|
entityType = ClusterResponse.class,
|
||||||
description = "the ID of the Cluster to reset the parameter value for corresponding cluster")
|
description = "The ID of the Cluster to reset the parameter value for corresponding cluster")
|
||||||
private Long clusterId;
|
private Long clusterId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.STORAGE_ID,
|
@Parameter(name = ApiConstants.STORAGE_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = StoragePoolResponse.class,
|
entityType = StoragePoolResponse.class,
|
||||||
description = "the ID of the Storage pool to reset the parameter value for corresponding storage pool")
|
description = "The ID of the Storage pool to reset the parameter value for corresponding storage pool")
|
||||||
private Long storagePoolId;
|
private Long storagePoolId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DOMAIN_ID,
|
@Parameter(name = ApiConstants.DOMAIN_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = DomainResponse.class,
|
entityType = DomainResponse.class,
|
||||||
description = "the ID of the Domain to reset the parameter value for corresponding domain")
|
description = "The ID of the Domain to reset the parameter value for corresponding domain")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT_ID,
|
@Parameter(name = ApiConstants.ACCOUNT_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = AccountResponse.class,
|
entityType = AccountResponse.class,
|
||||||
description = "the ID of the Account to reset the parameter value for corresponding account")
|
description = "The ID of the Account to reset the parameter value for corresponding account")
|
||||||
private Long accountId;
|
private Long accountId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IMAGE_STORE_ID,
|
@Parameter(name = ApiConstants.IMAGE_STORE_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = ImageStoreResponse.class,
|
entityType = ImageStoreResponse.class,
|
||||||
description = "the ID of the Image Store to reset the parameter value for corresponding image store")
|
description = "The ID of the Image Store to reset the parameter value for corresponding image store")
|
||||||
private Long imageStoreId;
|
private Long imageStoreId;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -45,46 +45,46 @@ public class UpdateCfgCmd extends BaseCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the configuration")
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the configuration")
|
||||||
private String cfgName;
|
private String cfgName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.VALUE, type = CommandType.STRING, description = "the value of the configuration", length = 4096)
|
@Parameter(name = ApiConstants.VALUE, type = CommandType.STRING, description = "The value of the configuration", length = 4096)
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID,
|
@Parameter(name = ApiConstants.ZONE_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = ZoneResponse.class,
|
entityType = ZoneResponse.class,
|
||||||
description = "the ID of the Zone to update the parameter value for corresponding zone")
|
description = "The ID of the Zone to update the parameter value for corresponding zone")
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_ID,
|
@Parameter(name = ApiConstants.CLUSTER_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = ClusterResponse.class,
|
entityType = ClusterResponse.class,
|
||||||
description = "the ID of the Cluster to update the parameter value for corresponding cluster")
|
description = "The ID of the Cluster to update the parameter value for corresponding cluster")
|
||||||
private Long clusterId;
|
private Long clusterId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.STORAGE_ID,
|
@Parameter(name = ApiConstants.STORAGE_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = StoragePoolResponse.class,
|
entityType = StoragePoolResponse.class,
|
||||||
description = "the ID of the Storage pool to update the parameter value for corresponding storage pool")
|
description = "The ID of the Storage pool to update the parameter value for corresponding storage pool")
|
||||||
private Long storagePoolId;
|
private Long storagePoolId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ACCOUNT_ID,
|
@Parameter(name = ApiConstants.ACCOUNT_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = AccountResponse.class,
|
entityType = AccountResponse.class,
|
||||||
description = "the ID of the Account to update the parameter value for corresponding account")
|
description = "The ID of the Account to update the parameter value for corresponding account")
|
||||||
private Long accountId;
|
private Long accountId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DOMAIN_ID,
|
@Parameter(name = ApiConstants.DOMAIN_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = DomainResponse.class,
|
entityType = DomainResponse.class,
|
||||||
description = "the ID of the Domain to update the parameter value for corresponding domain")
|
description = "The ID of the Domain to update the parameter value for corresponding domain")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IMAGE_STORE_UUID,
|
@Parameter(name = ApiConstants.IMAGE_STORE_UUID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = ImageStoreResponse.class,
|
entityType = ImageStoreResponse.class,
|
||||||
description = "the ID of the Image Store to update the parameter value for corresponding image store",
|
description = "The ID of the Image Store to update the parameter value for corresponding image store",
|
||||||
validations = ApiArgValidator.PositiveNumber)
|
validations = ApiArgValidator.PositiveNumber)
|
||||||
private Long imageStoreId;
|
private Long imageStoreId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,28 +43,28 @@ public class UpdateHypervisorCapabilitiesCmd extends BaseCmd {
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HypervisorCapabilitiesResponse.class, description = "ID of the hypervisor capability")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HypervisorCapabilitiesResponse.class, description = "ID of the hypervisor capability")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "the hypervisor for which the hypervisor capabilities are to be updated", since = "4.19.1")
|
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "The hypervisor for which the hypervisor capabilities are to be updated", since = "4.19.1")
|
||||||
private String hypervisor;
|
private String hypervisor;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, description = "the hypervisor version for which the hypervisor capabilities are to be updated", since = "4.19.1")
|
@Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, description = "The hypervisor version for which the hypervisor capabilities are to be updated", since = "4.19.1")
|
||||||
private String hypervisorVersion;
|
private String hypervisorVersion;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.SECURITY_GROUP_EANBLED, type = CommandType.BOOLEAN, description = "set true to enable security group for this hypervisor.")
|
@Parameter(name = ApiConstants.SECURITY_GROUP_EANBLED, type = CommandType.BOOLEAN, description = "Set true to enable security group for this hypervisor.")
|
||||||
private Boolean securityGroupEnabled;
|
private Boolean securityGroupEnabled;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.MAX_GUESTS_LIMIT, type = CommandType.LONG, description = "the max number of Guest VMs per host for this hypervisor.")
|
@Parameter(name = ApiConstants.MAX_GUESTS_LIMIT, type = CommandType.LONG, description = "The maximum number of Guest Instances per host for this hypervisor.")
|
||||||
private Long maxGuestsLimit;
|
private Long maxGuestsLimit;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.MAX_DATA_VOLUMES_LIMIT, type = CommandType.INTEGER, description = "the maximum number of Data Volumes that can be attached to a VM for this hypervisor.", since = "4.16.0")
|
@Parameter(name = ApiConstants.MAX_DATA_VOLUMES_LIMIT, type = CommandType.INTEGER, description = "The maximum number of Data Volumes that can be attached to an Instance for this hypervisor.", since = "4.16.0")
|
||||||
private Integer maxDataVolumesLimit;
|
private Integer maxDataVolumesLimit;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.STORAGE_MOTION_ENABLED, type = CommandType.BOOLEAN, description = "set true to enable storage motion support for this hypervisor", since = "4.16.0")
|
@Parameter(name = ApiConstants.STORAGE_MOTION_ENABLED, type = CommandType.BOOLEAN, description = "Set true to enable storage motion support for this hypervisor", since = "4.16.0")
|
||||||
private Boolean storageMotionSupported;
|
private Boolean storageMotionSupported;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.MAX_HOSTS_PER_CLUSTER, type = CommandType.INTEGER, description = "the maximum number of the hypervisor hosts per cluster ", since = "4.16.0")
|
@Parameter(name = ApiConstants.MAX_HOSTS_PER_CLUSTER, type = CommandType.INTEGER, description = "The maximum number of the hypervisor hosts per cluster ", since = "4.16.0")
|
||||||
private Integer maxHostsPerClusterLimit;
|
private Integer maxHostsPerClusterLimit;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.VM_SNAPSHOT_ENABELD, type = CommandType.BOOLEAN, description = "set true to enable VM snapshots for this hypervisor", since = "4.16.0")
|
@Parameter(name = ApiConstants.VM_SNAPSHOT_ENABELD, type = CommandType.BOOLEAN, description = "Set true to enable Instance Snapshots for this hypervisor", since = "4.16.0")
|
||||||
private Boolean vmSnapshotEnabled;
|
private Boolean vmSnapshotEnabled;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ import com.cloud.vm.VirtualMachine;
|
||||||
entityType = {VirtualMachine.class},
|
entityType = {VirtualMachine.class},
|
||||||
responseHasSensitiveInfo = false,
|
responseHasSensitiveInfo = false,
|
||||||
requestHasSensitiveInfo = false,
|
requestHasSensitiveInfo = false,
|
||||||
description = "Get diagnostics and files from system VMs",
|
description = "Get diagnostics and files from System VMs",
|
||||||
since = "4.14.0.0",
|
since = "4.14.0.0",
|
||||||
authorized = {RoleType.Admin})
|
authorized = {RoleType.Admin})
|
||||||
public class GetDiagnosticsDataCmd extends BaseAsyncCmd {
|
public class GetDiagnosticsDataCmd extends BaseAsyncCmd {
|
||||||
|
|
@ -64,7 +64,7 @@ public class GetDiagnosticsDataCmd extends BaseAsyncCmd {
|
||||||
entityType = SystemVmResponse.class,
|
entityType = SystemVmResponse.class,
|
||||||
required = true,
|
required = true,
|
||||||
validations = {ApiArgValidator.PositiveNumber},
|
validations = {ApiArgValidator.PositiveNumber},
|
||||||
description = "The ID of the system VM instance to retrieve diagnostics data files from")
|
description = "The ID of the System VM to retrieve diagnostics data files from")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.FILES,
|
@Parameter(name = ApiConstants.FILES,
|
||||||
|
|
@ -113,7 +113,7 @@ public class GetDiagnosticsDataCmd extends BaseAsyncCmd {
|
||||||
response.setResponseName(getCommandName());
|
response.setResponseName(getCommandName());
|
||||||
this.setResponseObject(response);
|
this.setResponseObject(response);
|
||||||
} else {
|
} else {
|
||||||
throw new CloudRuntimeException("failed to generate valid download url: " + downloadUrl);
|
throw new CloudRuntimeException("Failed to generate valid download url: " + downloadUrl);
|
||||||
}
|
}
|
||||||
} catch (ServerApiException e) {
|
} catch (ServerApiException e) {
|
||||||
throw new CloudRuntimeException("Internal exception caught while retrieving diagnostics files: ", e);
|
throw new CloudRuntimeException("Internal exception caught while retrieving diagnostics files: ", e);
|
||||||
|
|
@ -140,7 +140,7 @@ public class GetDiagnosticsDataCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "Getting diagnostics data files from system vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId());
|
return "Getting diagnostics data files from System VM: " + this._uuidMgr.getUuid(VirtualMachine.class, getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ import com.cloud.vm.VirtualMachine;
|
||||||
@APICommand(name = "runDiagnostics", responseObject = RunDiagnosticsResponse.class, entityType = {VirtualMachine.class},
|
@APICommand(name = "runDiagnostics", responseObject = RunDiagnosticsResponse.class, entityType = {VirtualMachine.class},
|
||||||
responseHasSensitiveInfo = false,
|
responseHasSensitiveInfo = false,
|
||||||
requestHasSensitiveInfo = false,
|
requestHasSensitiveInfo = false,
|
||||||
description = "Execute network-utility command (ping/arping/tracert) on system VMs remotely",
|
description = "Execute network-utility command (ping/arping/tracert) on System VMs remotely",
|
||||||
authorized = {RoleType.Admin},
|
authorized = {RoleType.Admin},
|
||||||
since = "4.12.0.0")
|
since = "4.12.0.0")
|
||||||
public class RunDiagnosticsCmd extends BaseAsyncCmd {
|
public class RunDiagnosticsCmd extends BaseAsyncCmd {
|
||||||
|
|
@ -62,7 +62,7 @@ public class RunDiagnosticsCmd extends BaseAsyncCmd {
|
||||||
@ACL(accessType = SecurityChecker.AccessType.OperateEntry)
|
@ACL(accessType = SecurityChecker.AccessType.OperateEntry)
|
||||||
@Parameter(name = ApiConstants.TARGET_ID, type = CommandType.UUID, required = true, entityType = SystemVmResponse.class,
|
@Parameter(name = ApiConstants.TARGET_ID, type = CommandType.UUID, required = true, entityType = SystemVmResponse.class,
|
||||||
validations = {ApiArgValidator.PositiveNumber},
|
validations = {ApiArgValidator.PositiveNumber},
|
||||||
description = "The ID of the system VM instance to diagnose")
|
description = "The ID of the System VM to diagnose")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, required = true,
|
@Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, required = true,
|
||||||
|
|
@ -70,7 +70,7 @@ public class RunDiagnosticsCmd extends BaseAsyncCmd {
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, required = true,
|
@Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, required = true,
|
||||||
description = "The system VM diagnostics type valid options are: ping, traceroute, arping")
|
description = "The System VM diagnostics type valid options are: ping, traceroute, arping")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PARAMS, type = CommandType.STRING,
|
@Parameter(name = ApiConstants.PARAMS, type = CommandType.STRING,
|
||||||
|
|
@ -153,7 +153,7 @@ public class RunDiagnosticsCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "Executing diagnostics on system vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId());
|
return "Executing diagnostics on System VM: " + this._uuidMgr.getUuid(VirtualMachine.class, getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@APICommand(name = "listTemplateDirectDownloadCertificates",
|
@APICommand(name = "listTemplateDirectDownloadCertificates",
|
||||||
description = "List the uploaded certificates for direct download templates",
|
description = "List the uploaded certificates for direct download Templates",
|
||||||
responseObject = DirectDownloadCertificateResponse.class,
|
responseObject = DirectDownloadCertificateResponse.class,
|
||||||
since = "4.17.0",
|
since = "4.17.0",
|
||||||
authorized = {RoleType.Admin})
|
authorized = {RoleType.Admin})
|
||||||
|
|
@ -51,15 +51,15 @@ public class ListTemplateDirectDownloadCertificatesCmd extends BaseListCmd {
|
||||||
DirectDownloadManager directDownloadManager;
|
DirectDownloadManager directDownloadManager;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DirectDownloadCertificateResponse.class,
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DirectDownloadCertificateResponse.class,
|
||||||
description = "list direct download certificate by ID")
|
description = "List direct download certificate by ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class,
|
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class,
|
||||||
description = "the zone where certificates are uploaded")
|
description = "The zone where certificates are uploaded")
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.LIST_HOSTS, type = CommandType.BOOLEAN,
|
@Parameter(name = ApiConstants.LIST_HOSTS, type = CommandType.BOOLEAN,
|
||||||
description = "if set to true: include the hosts where the certificate is uploaded to")
|
description = "If set to true: include the hosts where the certificate is uploaded to")
|
||||||
private Boolean listHosts;
|
private Boolean listHosts;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,11 +50,11 @@ public class ProvisionTemplateDirectDownloadCertificateCmd extends BaseCmd {
|
||||||
DirectDownloadManager directDownloadManager;
|
DirectDownloadManager directDownloadManager;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DirectDownloadCertificateResponse.class,
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DirectDownloadCertificateResponse.class,
|
||||||
description = "the id of the direct download certificate to provision", required = true)
|
description = "The id of the direct download certificate to provision", required = true)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class,
|
@Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class,
|
||||||
description = "the host to provision the certificate", required = true)
|
description = "The host to provision the certificate", required = true)
|
||||||
private Long hostId;
|
private Long hostId;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -59,23 +59,23 @@ public class RevokeTemplateDirectDownloadCertificateCmd extends BaseCmd {
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID,
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID,
|
||||||
entityType = DirectDownloadCertificateResponse.class,
|
entityType = DirectDownloadCertificateResponse.class,
|
||||||
description = "id of the certificate")
|
description = "ID of the certificate")
|
||||||
private Long certificateId;
|
private Long certificateId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING,
|
@Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING,
|
||||||
description = "(optional) alias of the SSL certificate")
|
description = "(Optional) alias of the SSL certificate")
|
||||||
private String certificateAlias;
|
private String certificateAlias;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR, type = BaseCmd.CommandType.STRING,
|
@Parameter(name = ApiConstants.HYPERVISOR, type = BaseCmd.CommandType.STRING,
|
||||||
description = "(optional) hypervisor type")
|
description = "(Optional) hypervisor type")
|
||||||
private String hypervisor;
|
private String hypervisor;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class,
|
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class,
|
||||||
description = "(optional) zone to revoke certificate", required = true)
|
description = "(Optional) zone to revoke certificate", required = true)
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class,
|
@Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class,
|
||||||
description = "(optional) the host ID to revoke certificate")
|
description = "(Optional) the host ID to revoke certificate")
|
||||||
private Long hostId;
|
private Long hostId;
|
||||||
|
|
||||||
private void createResponse(final List<HostCertificateStatus> hostsRevokeStatusList) {
|
private void createResponse(final List<HostCertificateStatus> hostsRevokeStatusList) {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@APICommand(name = "uploadTemplateDirectDownloadCertificate",
|
@APICommand(name = "uploadTemplateDirectDownloadCertificate",
|
||||||
description = "Upload a certificate for HTTPS direct template download on KVM hosts",
|
description = "Upload a certificate for HTTPS direct Template download on KVM hosts",
|
||||||
responseObject = DirectDownloadCertificateResponse.class,
|
responseObject = DirectDownloadCertificateResponse.class,
|
||||||
since = "4.11.0",
|
since = "4.11.0",
|
||||||
authorized = {RoleType.Admin})
|
authorized = {RoleType.Admin})
|
||||||
|
|
@ -65,7 +65,7 @@ public class UploadTemplateDirectDownloadCertificateCmd extends BaseCmd {
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class,
|
@Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class,
|
||||||
description = "(optional) the host ID to upload certificate")
|
description = "(Optional) the host ID to upload certificate")
|
||||||
private Long hostId;
|
private Long hostId;
|
||||||
|
|
||||||
private void createResponse(DirectDownloadCertificate certificate, final List<HostCertificateStatus> hostStatusList) {
|
private void createResponse(DirectDownloadCertificate certificate, final List<HostCertificateStatus> hostStatusList) {
|
||||||
|
|
|
||||||
|
|
@ -40,13 +40,13 @@ public class CreateDomainCmd extends BaseCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "creates domain with this name")
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Creates domain with this name")
|
||||||
private String domainName;
|
private String domainName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PARENT_DOMAIN_ID,
|
@Parameter(name = ApiConstants.PARENT_DOMAIN_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = DomainResponse.class,
|
entityType = DomainResponse.class,
|
||||||
description = "assigns new domain a parent domain by domain ID of the parent. If no parent domain is specified, the ROOT domain is assumed.")
|
description = "Assigns new domain a parent domain by domain ID of the parent. If no parent domain is specified, the ROOT domain is assumed.")
|
||||||
private Long parentDomainId;
|
private Long parentDomainId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "Network domain for networks in the domain")
|
@Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "Network domain for networks in the domain")
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ public class DeleteDomainCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLEANUP,
|
@Parameter(name = ApiConstants.CLEANUP,
|
||||||
type = CommandType.BOOLEAN,
|
type = CommandType.BOOLEAN,
|
||||||
description = "true if all domain resources (child domains, accounts) have to be cleaned up, false otherwise")
|
description = "True if all domain resources (child domains, Accounts) have to be cleaned up, false otherwise")
|
||||||
private Boolean cleanup;
|
private Boolean cleanup;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|
@ -88,7 +88,7 @@ public class DeleteDomainCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "deleting domain: " + getId();
|
return "Deleting domain: " + getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -42,15 +42,15 @@ public class ListDomainChildrenCmd extends BaseListCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "list children domain by parent domain ID.")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "List children domain by parent domain ID.")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list children domains by name")
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List children domains by name")
|
||||||
private String domainName;
|
private String domainName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IS_RECURSIVE,
|
@Parameter(name = ApiConstants.IS_RECURSIVE,
|
||||||
type = CommandType.BOOLEAN,
|
type = CommandType.BOOLEAN,
|
||||||
description = "to return the entire tree, use the value \"true\". To return the first level children, use the value \"false\".")
|
description = "To return the entire tree, use the value \"true\". To return the first level children, use the value \"false\".")
|
||||||
private Boolean recursive;
|
private Boolean recursive;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.LIST_ALL,
|
@Parameter(name = ApiConstants.LIST_ALL,
|
||||||
|
|
@ -59,7 +59,7 @@ public class ListDomainChildrenCmd extends BaseListCmd {
|
||||||
private Boolean listAll;
|
private Boolean listAll;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN,
|
@Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN,
|
||||||
description = "flag to display the resource icon for domains")
|
description = "Flag to display the resource icon for domains")
|
||||||
private Boolean showIcon;
|
private Boolean showIcon;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -64,11 +64,11 @@ public class ListDomainsCmd extends BaseListCmd implements UserCmd {
|
||||||
@Parameter(name = ApiConstants.DETAILS,
|
@Parameter(name = ApiConstants.DETAILS,
|
||||||
type = CommandType.LIST,
|
type = CommandType.LIST,
|
||||||
collectionType = CommandType.STRING,
|
collectionType = CommandType.STRING,
|
||||||
description = "comma separated list of domain details requested, value can be a list of [ all, resource, min]")
|
description = "Comma separated list of domain details requested, value can be a list of [ all, resource, min]")
|
||||||
private List<String> viewDetails;
|
private List<String> viewDetails;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN,
|
@Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN,
|
||||||
description = "flag to display the resource icon for domains")
|
description = "Flag to display the resource icon for domains")
|
||||||
private Boolean showIcon;
|
private Boolean showIcon;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.TAG, type = CommandType.STRING, description = "Tag for resource type to return usage", since = "4.20.0")
|
@Parameter(name = ApiConstants.TAG, type = CommandType.STRING, description = "Tag for resource type to return usage", since = "4.20.0")
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ public class UpdateDomainCmd extends BaseCmd {
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainResponse.class, required = true, description = "ID of domain to update")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainResponse.class, required = true, description = "ID of domain to update")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "updates domain with this name")
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Updates domain with this name")
|
||||||
private String domainName;
|
private String domainName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NETWORK_DOMAIN,
|
@Parameter(name = ApiConstants.NETWORK_DOMAIN,
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ public class AddGuestOsCmd extends BaseAsyncCreateCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "adding a new guest OS type Id: " + getEntityId();
|
return "Adding a new guest OS type Id: " + getEntityId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -153,7 +153,7 @@ public class AddGuestOsCmd extends BaseAsyncCreateCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCreateEventDescription() {
|
public String getCreateEventDescription() {
|
||||||
return "adding new guest OS type";
|
return "Adding new guest OS type";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ public class AddGuestOsMappingCmd extends BaseAsyncCreateCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "adding a new guest OS mapping Id: " + getEntityId();
|
return "Adding a new guest OS mapping Id: " + getEntityId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -148,6 +148,6 @@ public class AddGuestOsMappingCmd extends BaseAsyncCreateCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCreateEventDescription() {
|
public String getCreateEventDescription() {
|
||||||
return "adding new guest OS mapping";
|
return "Adding new guest OS mapping";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,11 @@ public class GetHypervisorGuestOsNamesCmd extends BaseAsyncCmd {
|
||||||
validations = {ApiArgValidator.NotNullOrEmpty})
|
validations = {ApiArgValidator.NotNullOrEmpty})
|
||||||
private String hypervisor;
|
private String hypervisor;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, required = true, description = "Hypervisor version to get the guest os names (atleast one hypervisor host with the version specified must be available)",
|
@Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, required = true, description = "Hypervisor version to get the guest OS names (at least one hypervisor host with the version specified must be available)",
|
||||||
validations = {ApiArgValidator.NotNullOrEmpty})
|
validations = {ApiArgValidator.NotNullOrEmpty})
|
||||||
private String hypervisorVersion;
|
private String hypervisorVersion;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.KEYWORD, type = CommandType.STRING, required = false, description = "Keyword for guest os name")
|
@Parameter(name = ApiConstants.KEYWORD, type = CommandType.STRING, required = false, description = "Keyword for guest OS name")
|
||||||
private String keyword;
|
private String keyword;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -40,22 +40,22 @@ public class ListGuestOsMappingCmd extends BaseListCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOsMappingResponse.class, required = false, description = "list mapping by its UUID")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOsMappingResponse.class, required = false, description = "List mapping by its UUID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.OS_TYPE_ID, type = CommandType.UUID, entityType = GuestOSResponse.class, required = false, description = "list mapping by Guest OS Type UUID")
|
@Parameter(name = ApiConstants.OS_TYPE_ID, type = CommandType.UUID, entityType = GuestOSResponse.class, required = false, description = "List mapping by Guest OS Type UUID")
|
||||||
private Long osTypeId;
|
private Long osTypeId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.OS_DISPLAY_NAME, type = CommandType.STRING, required = false, description = "list Guest OS mapping by OS display name")
|
@Parameter(name = ApiConstants.OS_DISPLAY_NAME, type = CommandType.STRING, required = false, description = "List Guest OS mapping by OS display name")
|
||||||
private String osDisplayName;
|
private String osDisplayName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.OS_NAME_FOR_HYPERVISOR, type = CommandType.STRING, required = false, description = "list Guest OS mapping by OS mapping name with hypervisor")
|
@Parameter(name = ApiConstants.OS_NAME_FOR_HYPERVISOR, type = CommandType.STRING, required = false, description = "List Guest OS mapping by OS mapping name with hypervisor")
|
||||||
private String osNameForHypervisor;
|
private String osNameForHypervisor;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = false, description = "list Guest OS mapping by hypervisor")
|
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = false, description = "List Guest OS mapping by hypervisor")
|
||||||
private String hypervisor;
|
private String hypervisor;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, required = false, description = "list Guest OS mapping by hypervisor version. Must be used with hypervisor parameter")
|
@Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, required = false, description = "List Guest OS mapping by hypervisor version. Must be used with hypervisor parameter")
|
||||||
private String hypervisorVersion;
|
private String hypervisorVersion;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,6 @@ public final class ConfigureHAForHostCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "configure HA for host: " + getHostId();
|
return "Configure HA for host: " + getHostId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ public final class DisableHAForClusterCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "disable HA for cluster: " + getClusterId();
|
return "Disable HA for cluster: " + getClusterId();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,6 @@ public final class DisableHAForHostCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "disable HA for host: " + getHostId();
|
return "Disable HA for host: " + getHostId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ public final class DisableHAForZoneCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "disable HA for zone: " + getZoneId();
|
return "Disable HA for zone: " + getZoneId();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,6 @@ public final class EnableHAForClusterCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "enable HA for cluster: " + getClusterId();
|
return "Enable HA for cluster: " + getClusterId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,6 @@ public final class EnableHAForHostCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "enable HA for host: " + getHostId();
|
return "Enable HA for host: " + getHostId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ public final class EnableHAForZoneCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "enable HA for zone: " + getZoneId();
|
return "Enable HA for zone: " + getZoneId();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,34 +45,34 @@ public class AddHostCmd extends BaseCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "the cluster ID for the host")
|
@Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "The cluster ID for the host")
|
||||||
private Long clusterId;
|
private Long clusterId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, description = "the cluster name for the host")
|
@Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, description = "The cluster name for the host")
|
||||||
private String clusterName;
|
private String clusterName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "the username for the host; required to be passed for hypervisors other than VMWare")
|
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "The username for the host; required to be passed for hypervisors other than VMWare")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, description = "the password for the host; required to be passed for hypervisors other than VMWare")
|
@Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, description = "The password for the host; required to be passed for hypervisors other than VMWare")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "the Pod ID for the host")
|
@Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "The Pod ID for the host")
|
||||||
private Long podId;
|
private Long podId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "the host URL")
|
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "The host URL")
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the Zone ID for the host")
|
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "The Zone ID for the host")
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = true, description = "hypervisor type of the host")
|
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = true, description = "Hypervisor type of the host")
|
||||||
private String hypervisor;
|
private String hypervisor;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this Host for allocation of new resources")
|
@Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this Host for allocation of new resources")
|
||||||
private String allocationState;
|
private String allocationState;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HOST_TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "list of tags to be added to the host")
|
@Parameter(name = ApiConstants.HOST_TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "List of tags to be added to the host")
|
||||||
private List<String> hostTags;
|
private List<String> hostTags;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.STORAGE_ACCESS_GROUPS,
|
@Parameter(name = ApiConstants.STORAGE_ACCESS_GROUPS,
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,10 @@ public class AddSecondaryStorageCmd extends BaseCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "the URL for the secondary storage")
|
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "The URL for the secondary storage")
|
||||||
protected String url;
|
protected String url;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID for the secondary storage")
|
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID for the secondary storage")
|
||||||
protected Long zoneId;
|
protected Long zoneId;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public class CancelHostAsDegradedCmd extends BaseAsyncCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = BaseCmd.CommandType.UUID, entityType = HostResponse.class, description = "host ID", required = true, validations = {ApiArgValidator.PositiveNumber})
|
@Parameter(name = ApiConstants.ID, type = BaseCmd.CommandType.UUID, entityType = HostResponse.class, description = "Host ID", required = true, validations = {ApiArgValidator.PositiveNumber})
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class CancelHostMaintenanceCmd extends BaseAsyncCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the host ID")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The host ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
@ -76,7 +76,7 @@ public class CancelHostMaintenanceCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "canceling maintenance for host: " + getId();
|
return "Canceling maintenance for host: " + getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ import org.apache.cloudstack.api.response.HostResponse;
|
||||||
import org.apache.cloudstack.context.CallContext;
|
import org.apache.cloudstack.context.CallContext;
|
||||||
|
|
||||||
@APICommand(name = "declareHostAsDegraded",
|
@APICommand(name = "declareHostAsDegraded",
|
||||||
description = "Declare host as 'Degraded'. Host must be on 'Disconnected' or 'Alert' state. The ADMIN must be sure that there are no VMs running on the respective host otherwise this command might corrupted VMs that were running on the 'Degraded' host.",
|
description = "Declare host as 'Degraded'. Host must be on 'Disconnected' or 'Alert' state. The ADMIN must be sure that there are no Instances running on the respective host otherwise this command might corrupted Instances that were running on the 'Degraded' host.",
|
||||||
since = "4.16.0.0",
|
since = "4.16.0.0",
|
||||||
responseObject = HostResponse.class,
|
responseObject = HostResponse.class,
|
||||||
requestHasSensitiveInfo = false,
|
requestHasSensitiveInfo = false,
|
||||||
|
|
@ -47,7 +47,7 @@ public class DeclareHostAsDegradedCmd extends BaseAsyncCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = BaseCmd.CommandType.UUID, entityType = HostResponse.class, description = "host ID", required = true, validations = {ApiArgValidator.PositiveNumber})
|
@Parameter(name = ApiConstants.ID, type = BaseCmd.CommandType.UUID, entityType = HostResponse.class, description = "Host ID", required = true, validations = {ApiArgValidator.PositiveNumber})
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -37,17 +37,17 @@ public class DeleteHostCmd extends BaseCmd {
|
||||||
// ////////////// API parameters /////////////////////
|
// ////////////// API parameters /////////////////////
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the host ID")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The host ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.FORCED,
|
@Parameter(name = ApiConstants.FORCED,
|
||||||
type = CommandType.BOOLEAN,
|
type = CommandType.BOOLEAN,
|
||||||
description = "Force delete the host. All HA enabled vms running on the host will be put to HA; HA disabled ones will be stopped")
|
description = "Force delete the host. All HA enabled Instances running on the host will be put to HA; HA disabled ones will be stopped")
|
||||||
private Boolean forced;
|
private Boolean forced;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.FORCED_DESTROY_LOCAL_STORAGE,
|
@Parameter(name = ApiConstants.FORCED_DESTROY_LOCAL_STORAGE,
|
||||||
type = CommandType.BOOLEAN,
|
type = CommandType.BOOLEAN,
|
||||||
description = "Force destroy local storage on this host. All VMs created on this local storage will be destroyed")
|
description = "Force destroy local storage on this host. All Instances created on this local storage will be destroyed")
|
||||||
private Boolean forceDestroyLocalStorage;
|
private Boolean forceDestroyLocalStorage;
|
||||||
|
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ import com.cloud.host.Host;
|
||||||
import com.cloud.utils.Pair;
|
import com.cloud.utils.Pair;
|
||||||
import com.cloud.utils.Ternary;
|
import com.cloud.utils.Ternary;
|
||||||
|
|
||||||
@APICommand(name = "findHostsForMigration", description = "Find hosts suitable for migrating a virtual machine.", responseObject = HostForMigrationResponse.class,
|
@APICommand(name = "findHostsForMigration", description = "Find hosts suitable for migrating an Instance.", responseObject = HostForMigrationResponse.class,
|
||||||
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
|
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
|
||||||
public class FindHostsForMigrationCmd extends BaseListCmd {
|
public class FindHostsForMigrationCmd extends BaseListCmd {
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ public class FindHostsForMigrationCmd extends BaseListCmd {
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = UserVmResponse.class,
|
entityType = UserVmResponse.class,
|
||||||
required = true,
|
required = true,
|
||||||
description = "find hosts to which this VM can be migrated and flag the hosts with enough " + "CPU/RAM to host the VM")
|
description = "Find hosts to which this Instance can be migrated and flag the hosts with enough " + "CPU/RAM to host the Instance")
|
||||||
private Long virtualMachineId;
|
private Long virtualMachineId;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -52,59 +52,59 @@ public class ListHostsCmd extends BaseListCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "lists hosts existing in particular cluster")
|
@Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "Lists hosts existing in particular cluster")
|
||||||
private Long clusterId;
|
private Long clusterId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, description = "the id of the host")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, description = "The ID of the host")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the host")
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the host")
|
||||||
private String hostName;
|
private String hostName;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "the Pod ID for the host")
|
@Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "The Pod ID for the host")
|
||||||
private Long podId;
|
private Long podId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "the state of the host")
|
@Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "The state of the host")
|
||||||
private String state;
|
private String state;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "the host type")
|
@Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "The host type")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID for the host")
|
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID for the host")
|
||||||
private Long zoneId;
|
private Long zoneId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID,
|
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = UserVmResponse.class,
|
entityType = UserVmResponse.class,
|
||||||
required = false,
|
required = false,
|
||||||
description = "lists hosts in the same cluster as this VM and flag hosts with enough CPU/RAm to host this VM")
|
description = "Lists hosts in the same cluster as this Instance and flag hosts with enough CPU/RAm to host this Instance")
|
||||||
private Long virtualMachineId;
|
private Long virtualMachineId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.OUTOFBANDMANAGEMENT_ENABLED,
|
@Parameter(name = ApiConstants.OUTOFBANDMANAGEMENT_ENABLED,
|
||||||
type = CommandType.BOOLEAN,
|
type = CommandType.BOOLEAN,
|
||||||
description = "list hosts for which out-of-band management is enabled")
|
description = "List hosts for which out-of-band management is enabled")
|
||||||
private Boolean outOfBandManagementEnabled;
|
private Boolean outOfBandManagementEnabled;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.OUTOFBANDMANAGEMENT_POWERSTATE,
|
@Parameter(name = ApiConstants.OUTOFBANDMANAGEMENT_POWERSTATE,
|
||||||
type = CommandType.STRING,
|
type = CommandType.STRING,
|
||||||
description = "list hosts by its out-of-band management interface's power state. Its value can be one of [On, Off, Unknown]")
|
description = "List hosts by its out-of-band management interface's power state. Its value can be one of [On, Off, Unknown]")
|
||||||
private String outOfBandManagementPowerState;
|
private String outOfBandManagementPowerState;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.RESOURCE_STATE,
|
@Parameter(name = ApiConstants.RESOURCE_STATE,
|
||||||
type = CommandType.STRING,
|
type = CommandType.STRING,
|
||||||
description = "list hosts by resource state. Resource state represents current state determined by admin of host, value can be one of [Enabled, Disabled, Unmanaged, PrepareForMaintenance, ErrorInMaintenance, Maintenance, Error]")
|
description = "List hosts by resource state. Resource state represents current state determined by admin of host, value can be one of [Enabled, Disabled, Unmanaged, PrepareForMaintenance, ErrorInMaintenance, Maintenance, Error]")
|
||||||
private String resourceState;
|
private String resourceState;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.DETAILS,
|
@Parameter(name = ApiConstants.DETAILS,
|
||||||
type = CommandType.LIST,
|
type = CommandType.LIST,
|
||||||
collectionType = CommandType.STRING,
|
collectionType = CommandType.STRING,
|
||||||
description = "comma separated list of host details requested, value can be a list of [ min, all, capacity, events, stats]")
|
description = "Comma separated list of host details requested, value can be a list of [ min, all, capacity, events, stats]")
|
||||||
private List<String> viewDetails;
|
private List<String> viewDetails;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HA_HOST, type = CommandType.BOOLEAN, description = "if true, list only hosts dedicated to HA")
|
@Parameter(name = ApiConstants.HA_HOST, type = CommandType.BOOLEAN, description = "If true, list only hosts dedicated to HA")
|
||||||
private Boolean haHost;
|
private Boolean haHost;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "hypervisor type of host: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator")
|
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "Hypervisor type of host: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator")
|
||||||
private String hypervisor;
|
private String hypervisor;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.MANAGEMENT_SERVER_ID, type = CommandType.UUID, entityType = ManagementServerResponse.class, description = "the id of the management server", since="4.21.0")
|
@Parameter(name = ApiConstants.MANAGEMENT_SERVER_ID, type = CommandType.UUID, entityType = ManagementServerResponse.class, description = "the id of the management server", since="4.21.0")
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class PrepareForHostMaintenanceCmd extends BaseAsyncCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the host ID")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The host ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public class ReconnectHostCmd extends BaseAsyncCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the host ID")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The host ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class ReleaseHostReservationCmd extends BaseAsyncCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the host ID")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The host ID")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class UpdateHostCmd extends BaseCmd {
|
||||||
//////////////// API parameters /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the ID of the host to update")
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The ID of the host to update")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Change the name of host", since = "4.15", authorized = {RoleType.Admin})
|
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Change the name of host", since = "4.15", authorized = {RoleType.Admin})
|
||||||
|
|
@ -49,7 +49,7 @@ public class UpdateHostCmd extends BaseCmd {
|
||||||
@Parameter(name = ApiConstants.OS_CATEGORY_ID,
|
@Parameter(name = ApiConstants.OS_CATEGORY_ID,
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = GuestOSCategoryResponse.class,
|
entityType = GuestOSCategoryResponse.class,
|
||||||
description = "the id of Os category to update the host with")
|
description = "The ID of OS category to update the host with")
|
||||||
private Long osCategoryId;
|
private Long osCategoryId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ALLOCATION_STATE,
|
@Parameter(name = ApiConstants.ALLOCATION_STATE,
|
||||||
|
|
@ -57,13 +57,13 @@ public class UpdateHostCmd extends BaseCmd {
|
||||||
description = "Change resource state of host, valid values are [Enable, Disable]. Operation may failed if host in states not allowing Enable/Disable")
|
description = "Change resource state of host, valid values are [Enable, Disable]. Operation may failed if host in states not allowing Enable/Disable")
|
||||||
private String allocationState;
|
private String allocationState;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HOST_TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "list of tags to be added to the host")
|
@Parameter(name = ApiConstants.HOST_TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "List of tags to be added to the host")
|
||||||
private List<String> hostTags;
|
private List<String> hostTags;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.IS_TAG_A_RULE, type = CommandType.BOOLEAN, description = ApiConstants.PARAMETER_DESCRIPTION_IS_TAG_A_RULE)
|
@Parameter(name = ApiConstants.IS_TAG_A_RULE, type = CommandType.BOOLEAN, description = ApiConstants.PARAMETER_DESCRIPTION_IS_TAG_A_RULE)
|
||||||
private Boolean isTagARule;
|
private Boolean isTagARule;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, description = "the new uri for the secondary storage: nfs://host/path")
|
@Parameter(name = ApiConstants.URL, type = CommandType.STRING, description = "The new URI for the secondary storage: nfs://host/path")
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ANNOTATION, type = CommandType.STRING, description = "Add an annotation to this host", since = "4.11", authorized = {RoleType.Admin})
|
@Parameter(name = ApiConstants.ANNOTATION, type = CommandType.STRING, description = "Add an annotation to this host", since = "4.11", authorized = {RoleType.Admin})
|
||||||
|
|
|
||||||
|
|
@ -36,19 +36,19 @@ public class UpdateHostPasswordCmd extends BaseCmd {
|
||||||
// ////////////// API parameters /////////////////////
|
// ////////////// API parameters /////////////////////
|
||||||
// ///////////////////////////////////////////////////
|
// ///////////////////////////////////////////////////
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "the host ID")
|
@Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "The host ID")
|
||||||
private Long hostId;
|
private Long hostId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "the cluster ID")
|
@Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "The cluster ID")
|
||||||
private Long clusterId;
|
private Long clusterId;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.SHOULD_UPDATE_PASSWORD, type = CommandType.BOOLEAN, description = "if the password should also be updated on the hosts")
|
@Parameter(name = ApiConstants.SHOULD_UPDATE_PASSWORD, type = CommandType.BOOLEAN, description = "If the password should also be updated on the hosts")
|
||||||
private Boolean updatePasswdOnHost;
|
private Boolean updatePasswdOnHost;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "the username for the host/cluster")
|
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "The username for the host/cluster")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = true, description = "the new password for the host/cluster")
|
@Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = true, description = "The new password for the host/cluster")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public class ConfigureInternalLoadBalancerElementCmd extends BaseAsyncCmd {
|
||||||
type = CommandType.UUID,
|
type = CommandType.UUID,
|
||||||
entityType = InternalLoadBalancerElementResponse.class,
|
entityType = InternalLoadBalancerElementResponse.class,
|
||||||
required = true,
|
required = true,
|
||||||
description = "the ID of the internal lb provider")
|
description = "The ID of the internal lb provider")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = true, description = "Enables/Disables the Internal Load Balancer element")
|
@Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = true, description = "Enables/Disables the Internal Load Balancer element")
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue