vishesh92 opened a new pull request, #7949: URL: https://github.com/apache/cloudstack/pull/7949
Docs PR - https://github.com/apache/cloudstack-documentation/pull/352 ### Description This PR allows listing files in a primary storage (for KVM, VMWare & XenServer hypervisors) and secondary storage (via SSVM). We also link the templates, snapshots and volumes with the files in the UI. This will also help to list files which are not in cloudstack db but left over due to some failed action. <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. --> #### Implementation Overview We send a command to endpoint for a datastore (SSVM for secondary storage and Hypervisor manager or hosts) to list files at a path. Using the answer, we link tempate id, snapshot id and volume id by querying the database and send the response. #### Commands Added * **Command** - `listImageStoreObjects` * params * `id` - id of the image store * `path` - path to list on image store * **Command** - `listStoragePoolObjects` * **params** * `id` - id of the storage pool * `path` - path to list on storage pool * **Command** - `migrateResourceToAnotherSecondaryStorage` * params * `srcpool` - id of the image store from where the data is to be migrated * `destpool` - id of the destination secondary storage pool to which the resources are to be migrated * `templates` - id(s) of the templates to be migrated * `snapshots` - id(s) of the snapshots to be migrated #### Response for `listImageStoreObjects` and `listStoragePoolObjects` List response containing the following keys: * `name` - Name of the data store object * `isdirectory` - Is it a directory * `size` - Size is in Bytes * `templateid` - Template ID associated with the data store object * `format` - Format of template associated with the data store object * `snapshotid` - Snapshot ID associated with the data store object * `volumeid` - Volume ID associated with the data store object * `lastupdated` - Last modified date of the file/directory <!-- For new features, provide link to FS, dev ML discussion etc. --> <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. --> <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged --> <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" --> <!-- Fixes: # --> <!--- ********************************************************************************* --> <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. --> <!--- PLEASE PUT AN 'X' in only **ONE** box --> <!--- ********************************************************************************* --> ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [x] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [x] Major - [ ] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [ ] Minor - [ ] Trivial ### Screenshots (if appropriate): ### How Has This Been Tested? <!-- Please describe in detail how you tested your changes. --> <!-- Include details of your testing environment, and the tests you ran to --> <!-- see how your change affects other areas of the code, etc. --> <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document --> -- 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]
