You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2016/10/13 08:36:55 UTC

[2/2] git commit: updated refs/heads/4.9 to 2ebf949

Merge pull request #1702 from nvazquez/listvmsnapshotsissues

CLOUDSTACK-9535: [API] listVMSnapshots improvement### Improvements
- Include missing fields in response: `account`, `domain`, `domainid`, `zoneid`
- Display total count of snapshots, not depending on page size

### Example
After creating 2 vm snapshots for a given vm, and making this API call: `command=listVMSnapshot&listAll=true&virtualmachineid=c8531ef8-8502-4b42-b1c5-c52ace0e7801&_=1475516598524&pagesize=1&page=1` we get this response:

```
<listvmsnapshotresponse cloud-stack-version="4.9.1.0-SNAPSHOT">
<count>2</count>
<vmSnapshot>
<id>88f7416a-8799-4245-99c6-c707cfbe6f47</id>
<name>i-2-10482-VM_VS_20161003174340</name>
<state>Ready</state>
<description>2</description>
<displayname>testsnap2</displayname>
<zoneid>0d074f25-ed31-482f-8bc5-44c9314fc417</zoneid>
<virtualmachineid>c8531ef8-8502-4b42-b1c5-c52ace0e7801</virtualmachineid>
<parent>24e44fe5-5f2e-4d35-a8f8-109b644a04e0</parent>
<parentName>testsnap</parentName>
<current>true</current>
<type>Disk</type>
<created>2016-10-03T10:43:40-0700</created>
<account>admin</account>
<domainid>5a7ffa07-3fca-11e5-9c45-005056ad45b7</domainid>
<domain>ROOT</domain>
</vmSnapshot>
</listvmsnapshotresponse>
```

**NOTES:** As in `listVirtualMachines`, despite `pagesize=1`, `count` field shows total snapshots count for given vm. Also, `account`, `domain`, `domainid`, `zoneid` fields are listed

* pr/1702:
  CLOUDSTACK-9535: [API] listVMSnapshots improvement

Signed-off-by: Rajani Karuturi <ra...@accelerite.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2ebf9492
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2ebf9492
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2ebf9492

Branch: refs/heads/4.9
Commit: 2ebf9492858f70588dccf26042ff053d94d2fc6d
Parents: 9a8841d f4a42ab
Author: Rajani Karuturi <ra...@accelerite.com>
Authored: Thu Oct 13 14:04:57 2016 +0530
Committer: Rajani Karuturi <ra...@accelerite.com>
Committed: Thu Oct 13 14:04:58 2016 +0530

----------------------------------------------------------------------
 .../com/cloud/vm/snapshot/VMSnapshotService.java    |  3 ++-
 .../command/user/vmsnapshot/ListVMSnapshotCmd.java  |  7 ++++---
 server/src/com/cloud/api/ApiResponseHelper.java     | 16 ++++++++++++++++
 .../cloud/vm/snapshot/VMSnapshotManagerImpl.java    |  5 +++--
 4 files changed, 25 insertions(+), 6 deletions(-)
----------------------------------------------------------------------