From 66039113d880f14bac543e8f55aae9c34c9ca919 Mon Sep 17 00:00:00 2001 From: Sina Kashipazha Date: Wed, 16 Aug 2023 17:14:52 +0200 Subject: [PATCH 1/4] Fixed some spelling errors. --- .../java/org/apache/cloudstack/api/response/UserVmResponse.java | 2 +- .../api/command/admin/ratelimit/ResetApiLimitCmd.java | 2 +- .../network/tungsten/api/command/ListTungstenFabricTagCmd.java | 2 +- .../storage/datastore/util/ListElastistorVolumeResponse.java | 2 +- .../cloudstack/api/response/LdapConfigurationResponse.java | 2 +- .../cloudstack/api/response/LinkAccountToLdapResponse.java | 2 +- .../cloudstack/api/response/LinkDomainToLdapResponse.java | 2 +- .../com/cloud/api/auth/DefaultLoginAPIAuthenticatorCmd.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java index f2903b2626c8..114403da7bcb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java @@ -103,7 +103,7 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co private String group; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the ID of the availablility zone for the virtual machine") + @Param(description = "the ID of the availability zone for the virtual machine") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) diff --git a/plugins/api/rate-limit/src/main/java/org/apache/cloudstack/api/command/admin/ratelimit/ResetApiLimitCmd.java b/plugins/api/rate-limit/src/main/java/org/apache/cloudstack/api/command/admin/ratelimit/ResetApiLimitCmd.java index 7aca752252fc..5be0dfcb678c 100644 --- a/plugins/api/rate-limit/src/main/java/org/apache/cloudstack/api/command/admin/ratelimit/ResetApiLimitCmd.java +++ b/plugins/api/rate-limit/src/main/java/org/apache/cloudstack/api/command/admin/ratelimit/ResetApiLimitCmd.java @@ -53,7 +53,7 @@ public class ResetApiLimitCmd extends BaseCmd { ///////////////////////////////////////////////////// @ACL - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.UUID, entityType = AccountResponse.class, description = "the ID of the acount whose limit to be reset") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.UUID, entityType = AccountResponse.class, description = "the ID of the account whose limit to be reset") private Long accountId; ///////////////////////////////////////////////////// diff --git a/plugins/network-elements/tungsten/src/main/java/org/apache/cloudstack/network/tungsten/api/command/ListTungstenFabricTagCmd.java b/plugins/network-elements/tungsten/src/main/java/org/apache/cloudstack/network/tungsten/api/command/ListTungstenFabricTagCmd.java index dd64587ac147..657bc431bc4d 100644 --- a/plugins/network-elements/tungsten/src/main/java/org/apache/cloudstack/network/tungsten/api/command/ListTungstenFabricTagCmd.java +++ b/plugins/network-elements/tungsten/src/main/java/org/apache/cloudstack/network/tungsten/api/command/ListTungstenFabricTagCmd.java @@ -61,7 +61,7 @@ public class ListTungstenFabricTagCmd extends BaseListCmd { @Parameter(name = ApiConstants.VM_UUID, type = CommandType.STRING, description = "the uuid of Tungsten-Fabric vm") private String vmUuid; - @Parameter(name = ApiConstants.NIC_UUID, type = CommandType.STRING, description = "tthe uuid of Tungsten-Fabric nic") + @Parameter(name = ApiConstants.NIC_UUID, type = CommandType.STRING, description = "the uuid of Tungsten-Fabric nic") private String nicUuid; @Parameter(name = ApiConstants.POLICY_UUID, type = CommandType.STRING, description = "the uuid of Tungsten-Fabric policy") diff --git a/plugins/storage/volume/cloudbyte/src/main/java/org/apache/cloudstack/storage/datastore/util/ListElastistorVolumeResponse.java b/plugins/storage/volume/cloudbyte/src/main/java/org/apache/cloudstack/storage/datastore/util/ListElastistorVolumeResponse.java index b251d7a3a3a4..e141cc1dffc1 100644 --- a/plugins/storage/volume/cloudbyte/src/main/java/org/apache/cloudstack/storage/datastore/util/ListElastistorVolumeResponse.java +++ b/plugins/storage/volume/cloudbyte/src/main/java/org/apache/cloudstack/storage/datastore/util/ListElastistorVolumeResponse.java @@ -48,7 +48,7 @@ public class ListElastistorVolumeResponse extends BaseResponse { private String compression; @SerializedName("sync") - @Param(description = "syncronization") + @Param(description = "synchronization") private String sync; public String getGraceAllowed() { diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java index 5c6fc8a02586..744c73d8e774 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java @@ -32,7 +32,7 @@ public class LdapConfigurationResponse extends BaseResponse { private String hostname; @SerializedName(ApiConstants.PORT) - @Param(description = "port teh ldap server is running on") + @Param(description = "port the ldap server is running on") private int port; @SerializedName(ApiConstants.DOMAIN_ID) diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LinkAccountToLdapResponse.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LinkAccountToLdapResponse.java index 8dacfb7ca3e3..6273273bdbff 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LinkAccountToLdapResponse.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LinkAccountToLdapResponse.java @@ -34,7 +34,7 @@ public class LinkAccountToLdapResponse extends BaseResponse { private String ldapDomain; @SerializedName(ApiConstants.TYPE) - @Param(description = "type of the name in LDAP which is linke to the domain") + @Param(description = "type of the name in LDAP which is linked to the domain") private String type; @SerializedName(ApiConstants.ACCOUNT_TYPE) diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java index bc552ee2cf6b..be057fd84180 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java @@ -39,7 +39,7 @@ public class LinkDomainToLdapResponse extends BaseResponse { private String ldapDomain; @SerializedName(ApiConstants.TYPE) - @Param(description = "type of the name in LDAP which is linke to the domain") + @Param(description = "type of the name in LDAP which is linked to the domain") private String type; @SerializedName(ApiConstants.ACCOUNT_TYPE) diff --git a/server/src/main/java/com/cloud/api/auth/DefaultLoginAPIAuthenticatorCmd.java b/server/src/main/java/com/cloud/api/auth/DefaultLoginAPIAuthenticatorCmd.java index 53f45c5956cd..63385e22e32e 100644 --- a/server/src/main/java/com/cloud/api/auth/DefaultLoginAPIAuthenticatorCmd.java +++ b/server/src/main/java/com/cloud/api/auth/DefaultLoginAPIAuthenticatorCmd.java @@ -62,7 +62,7 @@ public class DefaultLoginAPIAuthenticatorCmd extends BaseCmd implements APIAuthe @Parameter(name = ApiConstants.DOMAIN, type = CommandType.STRING, description = "Path of the domain that the user belongs to. Example: domain=/com/cloud/internal. If no domain is passed in, the ROOT (/) domain is assumed.") private String domain; - @Parameter(name = ApiConstants.DOMAIN__ID, type = CommandType.LONG, description = "The id of the domain that the user belongs to. If both domain and domainId are passed in, \"domainId\" parameter takes precendence") + @Parameter(name = ApiConstants.DOMAIN__ID, type = CommandType.LONG, description = "The id of the domain that the user belongs to. If both domain and domainId are passed in, \"domainId\" parameter takes precedence.") private Long domainId; @Inject From be93a38688d3a999ab888c057c7c82bd5cf27798 Mon Sep 17 00:00:00 2001 From: Sina Kashipazha Date: Wed, 16 Aug 2023 17:17:06 +0200 Subject: [PATCH 2/4] Update the description of domainid to make it clear what would happen if the account is missing. --- .../cloudstack/api/command/user/network/CreateNetworkCmd.java | 3 ++- .../api/command/user/snapshot/CreateSnapshotCmd.java | 2 +- .../org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java | 2 +- .../cloudstack/api/command/user/volume/CreateVolumeCmd.java | 3 ++- .../cloudstack/api/command/user/volume/UploadVolumeCmd.java | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java index 5b814e770041..b3e7c8bf78a2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java @@ -118,7 +118,8 @@ public class CreateNetworkCmd extends BaseCmd implements UserCmd { private Long projectId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning a network. " + - "If no account is provided then network will be assigned to the caller account and domain") + "If the account or acltype is not specified, the network will be automatically assigned to the caller account and domain." + + "To create a network under the domain without linking it to any account, make sure to include acltype=Domain parameter in your api call.") private Long domainId; @Parameter(name = ApiConstants.SUBDOMAIN_ACCESS, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java index aee72b3dbae5..917170083d10 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java @@ -62,7 +62,7 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "The domain ID of the snapshot. If used with the account parameter, specifies a domain for the account associated with the disk volume.") + description = "The domain ID of the snapshot. If used with the account parameter, specifies a domain for the account associated with the disk volume. If account is NOT provided then virtual machine will be assigned to the caller account and domain.") private Long domainId; @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "The ID of the disk volume") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java index 7aa69bd11ee0..12212dac417d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java @@ -109,7 +109,7 @@ public class DeployVMCmd extends BaseAsyncCreateCustomIdCmd implements SecurityG @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the virtual machine. Must be used with domainId.") private String accountName; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "an optional domainId for the virtual machine. If the account parameter is used, domainId must also be used.") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "an optional domainId for the virtual machine. If the account parameter is used, domainId must also be used. If account is NOT provided then virtual machine will be assigned to the caller account and domain.") private Long domainId; //Network information diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java index 3426a95686d7..16cd1eaf8dfc 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java @@ -70,7 +70,8 @@ public class CreateVolumeCmd extends BaseAsyncCreateCustomIdCmd implements UserC type = CommandType.UUID, entityType = DomainResponse.class, description = "the domain ID associated with the disk offering. If used with the account parameter" - + " returns the disk volume associated with the account for the specified domain.") + + " returns the disk volume associated with the account for the specified domain." + + "If account is NOT provided then virtual machine will be assigned to the caller account and domain.") private Long domainId; @Parameter(name = ApiConstants.DISK_OFFERING_ID, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java index b40761d123a8..35c161080aa3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java @@ -78,7 +78,7 @@ public class UploadVolumeCmd extends BaseAsyncCmd implements UserCmd { @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.") + description = "an optional domainId. If the account parameter is used, domainId must also be used. If account is NOT provided then virtual machine will be assigned to the caller account and domain.") private Long domainId; @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional accountName. Must be used with domainId.") From e78f47402b543484404fa3488d63c0eeac93fc09 Mon Sep 17 00:00:00 2001 From: Sina Kashipazha Date: Thu, 17 Aug 2023 12:31:56 +0200 Subject: [PATCH 3/4] Update descriptions based on the Wei's comments. --- .../api/command/user/network/CreateNetworkCmd.java | 5 +++-- .../api/command/user/snapshot/CreateSnapshotCmd.java | 2 +- .../cloudstack/api/command/user/volume/CreateVolumeCmd.java | 2 +- .../cloudstack/api/command/user/volume/UploadVolumeCmd.java | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java index b3e7c8bf78a2..bfffbe7497c1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java @@ -118,8 +118,9 @@ public class CreateNetworkCmd extends BaseCmd implements UserCmd { private Long projectId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning a network. " + - "If the account or acltype is not specified, the network will be automatically assigned to the caller account and domain." + - "To create a network under the domain without linking it to any account, make sure to include acltype=Domain parameter in your api call.") + "If the account or acltype is not specified, the network will be automatically assigned to the caller account and domain. " + + "To create a network under the domain without linking it to any account, make sure to include acltype=Domain parameter in the api call. " + + "If account is not specified, but acltype is Domain, the network will be created for the specified domain.") private Long domainId; @Parameter(name = ApiConstants.SUBDOMAIN_ACCESS, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java index 917170083d10..56e112963a95 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java @@ -62,7 +62,7 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "The domain ID of the snapshot. If used with the account parameter, specifies a domain for the account associated with the disk volume. If account is NOT provided then virtual machine will be assigned to the caller account and domain.") + description = "The domain ID of the snapshot. If used with the account parameter, specifies a domain for the account associated with the disk volume. If account is NOT provided then snapshot will be assigned to the caller account and domain.") private Long domainId; @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "The ID of the disk volume") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java index 16cd1eaf8dfc..566e8a46bd94 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java @@ -71,7 +71,7 @@ public class CreateVolumeCmd extends BaseAsyncCreateCustomIdCmd implements UserC entityType = DomainResponse.class, description = "the domain ID associated with the disk offering. If used with the account parameter" + " returns the disk volume associated with the account for the specified domain." + - "If account is NOT provided then virtual machine will be assigned to the caller account and domain.") + "If account is NOT provided then the volume will be assigned to the caller account and domain.") private Long domainId; @Parameter(name = ApiConstants.DISK_OFFERING_ID, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java index 35c161080aa3..c622081079d8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java @@ -78,7 +78,7 @@ public class UploadVolumeCmd extends BaseAsyncCmd implements UserCmd { @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. If account is NOT provided then virtual machine will be assigned to the caller account and domain.") + description = "an optional domainId. If the account parameter is used, domainId must also be used. If account is NOT provided then volume will be assigned to the caller account and domain.") private Long domainId; @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional accountName. Must be used with domainId.") From 07da2b174169d5393e84aa52d5922e470739956f Mon Sep 17 00:00:00 2001 From: Sina Kashipazha Date: Fri, 18 Aug 2023 15:20:24 +0200 Subject: [PATCH 4/4] Update descriptions based on the Wei's comments. --- .../cloudstack/api/command/user/network/CreateNetworkCmd.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java index bfffbe7497c1..3bc90e5e8ae0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java @@ -118,7 +118,7 @@ public class CreateNetworkCmd extends BaseCmd implements UserCmd { private Long projectId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning a network. " + - "If the account or acltype is not specified, the network will be automatically assigned to the caller account and domain. " + + "If the account is not specified, but the acltype is Account or not specified, the network will be automatically assigned to the caller account and domain. " + "To create a network under the domain without linking it to any account, make sure to include acltype=Domain parameter in the api call. " + "If account is not specified, but acltype is Domain, the network will be created for the specified domain.") private Long domainId;