bernardodemarco commented on code in PR #12468:
URL: https://github.com/apache/cloudstack/pull/12468#discussion_r2721336659
##########
api/src/main/java/org/apache/cloudstack/api/response/SnapshotResponse.java:
##########
@@ -155,6 +155,14 @@ public class SnapshotResponse extends
BaseResponseWithTagInformation implements
@Param(description = "download progress of a snapshot", since = "4.19.0")
private Map<String, String> downloadDetails;
+ @SerializedName("parent")
+ @Param(description = "The parent ID of the Snapshot", since = "4.22.1")
+ private String parent;
+
+ @SerializedName("parentname")
+ @Param(description = "The parent name of the Snapshot", since = "4.22.1")
Review Comment:
```suggestion
@Param(description = "The parent name of the snapshot", since = "4.22.1")
```
##########
api/src/main/java/org/apache/cloudstack/api/response/CapabilitiesResponse.java:
##########
@@ -73,6 +73,10 @@ public class CapabilitiesResponse extends BaseResponse {
@Param(description = "True if Snapshot is supported for KVM host, false
otherwise")
private boolean kvmSnapshotEnabled;
+ @SerializedName("snapshotshowchainsize")
+ @Param(description = "True to show the parent and chain size (sum of
physical size of snapshot and all its parents) for incremental snapshots",
since = "4.22.1")
+ private boolean snapshotShowChainSize;
Review Comment:
By chain size, I believe that the end users can infer that it refers to the
number of snapshots in the chain
##########
ui/src/config/section/storage.js:
##########
@@ -324,7 +327,13 @@ export default {
fields.push('zonename')
return fields
},
- details: ['name', 'id', 'volumename', 'volumetype', 'snapshottype',
'intervaltype', 'physicalsize', 'virtualsize', 'chainsize', 'account',
'domain', 'created'],
+ details: () => {
+ var fields = ['name', 'id', 'volumename', 'volumetype',
'snapshottype', 'intervaltype', 'physicalsize', 'virtualsize', 'account',
'domain', 'created']
Review Comment:
```suggestion
const fields = ['name', 'id', 'volumename', 'volumetype',
'snapshottype', 'intervaltype', 'physicalsize', 'virtualsize', 'account',
'domain', 'created']
```
##########
api/src/main/java/org/apache/cloudstack/api/response/SnapshotResponse.java:
##########
@@ -155,6 +155,14 @@ public class SnapshotResponse extends
BaseResponseWithTagInformation implements
@Param(description = "download progress of a snapshot", since = "4.19.0")
private Map<String, String> downloadDetails;
+ @SerializedName("parent")
+ @Param(description = "The parent ID of the Snapshot", since = "4.22.1")
Review Comment:
```suggestion
@Param(description = "The parent ID of the snapshot", since = "4.22.1")
```
##########
ui/src/config/section/storage.js:
##########
@@ -324,7 +327,13 @@ export default {
fields.push('zonename')
return fields
},
- details: ['name', 'id', 'volumename', 'volumetype', 'snapshottype',
'intervaltype', 'physicalsize', 'virtualsize', 'chainsize', 'account',
'domain', 'created'],
+ details: () => {
+ var fields = ['name', 'id', 'volumename', 'volumetype',
'snapshottype', 'intervaltype', 'physicalsize', 'virtualsize', 'account',
'domain', 'created']
+ if (store.getters.features.snapshotshowchainsize) {
+ fields.splice(fields.indexOf('account'), 0, 'chainsize',
'parentname')
+ }
Review Comment:
It would be great to display for the `chainsize` the unit of measurement and
for the `parentname` a link to the corresponding snapshot
##########
server/src/main/java/com/cloud/server/ManagementServerImpl.java:
##########
@@ -4799,6 +4799,7 @@ public Map<String, Object> listCapabilities(final
ListCapabilitiesCmd cmd) {
final long diskOffMinSize =
VolumeOrchestrationService.CustomDiskOfferingMinSize.value();
final long diskOffMaxSize =
VolumeOrchestrationService.CustomDiskOfferingMaxSize.value();
final boolean KVMSnapshotEnabled =
SnapshotManager.KVMSnapshotEnabled.value();
+ final boolean SnapshotShowChainSize =
SnapshotManager.snapshotShowChainSize.value();
Review Comment:
I'm not really aware of why the `snapshot.show.chain.size` setting has been
created. But, in what scenarios would it be interesting to hide these new
fields from the API response?
--
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]