Copilot commented on code in PR #11943:
URL: https://github.com/apache/cloudstack/pull/11943#discussion_r2583921932
##########
api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CopySnapshotCmd.java:
##########
@@ -97,7 +97,11 @@ public class CopySnapshotCmd extends BaseAsyncCmd implements
UserCmd {
"The snapshot will always be made available in the zone in
which the volume is present. Currently supported for StorPool only")
protected List<Long> storagePoolIds;
- @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION,
type=CommandType.BOOLEAN, required = false, since = "4.21.0", description =
"This parameter enables the option the snapshot to be copied to supported
primary storage")
+ @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION,
+ type=CommandType.BOOLEAN,
+ since = "4.21.0",
+ description = "Enables the snapshot to be copied to the supported
primary storages when the config 'use.storage.replication' set to true for the
storage or globally. " +
Review Comment:
Grammar error: The description is missing the verb "is". It should read:
"when the config 'use.storage.replication' **is** set to true for the storage
or globally."
```suggestion
description = "Enables the snapshot to be copied to the
supported primary storages when the config 'use.storage.replication' is set to
true for the storage or globally. " +
```
##########
api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java:
##########
@@ -112,7 +112,10 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd {
since = "4.21.0")
protected List<Long> storagePoolIds;
- @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION,
type=CommandType.BOOLEAN, required = false, description = "This parameter
enables the option the snapshot to be copied to supported primary storage")
+ @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION,
+ type=CommandType.BOOLEAN,
+ description = "Enables the snapshot to be copied to the supported
primary storages when the config 'use.storage.replication' set to true for the
storage or globally. " +
Review Comment:
Grammar error: The description is missing the verb "is". It should read:
"when the config 'use.storage.replication' **is** set to true for the storage
or globally."
```suggestion
description = "Enables the snapshot to be copied to the
supported primary storages when the config 'use.storage.replication' is set to
true for the storage or globally. " +
```
##########
api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java:
##########
@@ -94,7 +94,11 @@ public class CreateSnapshotPolicyCmd extends BaseCmd {
since = "4.21.0")
protected List<Long> storagePoolIds;
- @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION,
type=CommandType.BOOLEAN, required = false, since = "4.21.0", description =
"This parameter enables the option the snapshot to be copied to supported
primary storage")
+ @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION,
+ type=CommandType.BOOLEAN,
+ since = "4.21.0",
+ description = "Enables the snapshot to be copied to the supported
primary storages when the config 'use.storage.replication' set to true for the
storage or globally. " +
Review Comment:
Grammar error: The description is missing the verb "is". It should read:
"when the config 'use.storage.replication' **is** set to true for the storage
or globally."
```suggestion
description = "Enables the snapshot to be copied to the
supported primary storages when the config 'use.storage.replication' is set to
true for the storage or globally. " +
```
##########
api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java:
##########
@@ -112,7 +112,10 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd {
since = "4.21.0")
protected List<Long> storagePoolIds;
- @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION,
type=CommandType.BOOLEAN, required = false, description = "This parameter
enables the option the snapshot to be copied to supported primary storage")
+ @Parameter (name = ApiConstants.USE_STORAGE_REPLICATION,
+ type=CommandType.BOOLEAN,
+ description = "Enables the snapshot to be copied to the supported
primary storages when the config 'use.storage.replication' set to true for the
storage or globally. " +
+ "This is supported only for StorPool storage for now.")
Review Comment:
The `since` attribute is missing for this parameter. For consistency with
`CreateSnapshotPolicyCmd` and `CopySnapshotCmd`, this should include `since =
"4.21.0"` to indicate when this parameter was introduced.
```suggestion
"This is supported only for StorPool storage for now.",
since = "4.21.0")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]