[
https://issues.apache.org/jira/browse/CLOUDSTACK-9535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15549327#comment-15549327
]
ASF GitHub Bot commented on CLOUDSTACK-9535:
--------------------------------------------
GitHub user nvazquez opened a pull request:
https://github.com/apache/cloudstack/pull/1702
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
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/nvazquez/cloudstack listvmsnapshotsissues
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/1702.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1702
----
commit ce0338e106d43f06b1af5555b9a2c4a5fce68fde
Author: nvazquez <[email protected]>
Date: 2016-10-03T18:56:32Z
CLOUDSTACK-9535: [API] listVMSnapshots improvement
----
> [API] listVMSnapshots improvement
> ---------------------------------
>
> Key: CLOUDSTACK-9535
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9535
> Project: CloudStack
> Issue Type: Improvement
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: API
> Reporter: Nicolas Vazquez
> Assignee: Nicolas Vazquez
>
> * Include missing fields in response: {{account}}, {{domain}}, {{domainid}},
> {{zoneid}}
> * Display total count of snapshots, not depending on page size
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)