summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/aggregate.py
Commit message (Collapse)AuthorAgeFilesLines
* Include hosts in aggregate list --longDavid Caro2021-06-031-0/+2
| | | | | | | | This makes it easier to get the total list of aggregates and the hosts belonging to each of them (specially for scripting purposes). Change-Id: I94833c15075ae655bc11e7c0fc47c0abad5846fc Signed-off-by: David Caro <me@dcaro.es>
* trivial: Use plural for appended parametersStephen Finucane2021-01-061-22/+22
| | | | | | | | | Multiple compute commands take a '--property' parameter or variant thereof. These should be stored in a 'properties' (plural) dest for sanity's sake. Correct this. Change-Id: If393836925fa736404527d9abd212b8ac9931027 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Switch compute aggregate functions to SDKArtem Goncharov2020-12-021-127/+136
| | | | | | | Continue journey towards having OSC consuming SDK for nova part. Depends-On: https://review.opendev.org/#/c/762131/ Change-Id: Id16e6c47aa93f02f15f49e1f59f73fecaa3e3b80
* Replace six.iteritems() with .items()lihaijing2020-01-091-5/+4
| | | | | | | | | | | | | | | | 1. As mentioned in [1], we should avoid using six.iteritems to achieve iterators. We can use dict.items instead, as it will return iterators in PY3 as well. And dict.items/keys will more readable. 2. In py2, the performance about list should be negligible, see the link [2]. [1] https://wiki.openstack.org/wiki/Python3 [2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Co-Authored-By: Akihiro Motoki <amotoki@gmail.com> Change-Id: I4b9edb326444264c0f6c4ad281acaac356a07e85 Implements: blueprint replace-iteritems-with-items
* Format aggregate command fields and de-race functional testsDean Troyer2019-08-261-3/+43
| | | | | | | | | Rename metadata to property in all aggregate commands Beef up functional tests to reduce street racing Change-Id: I4598da73b85a954f3e6a3981db21891b45d9548c Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* Serialize more aggregate functional testsDean Troyer2019-05-171-0/+2
| | | | | | | | | These tests are showing signs of problems running in parallel so serialse the create/delete/list/set/unset tests. They all used two aggregates each anyway... Change-Id: Iba4b52c179e6914eaeefea1da0f7eaefcdcf1f87 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* Handle log message interpolation by the logger in compute/Gábor Antal2017-02-131-2/+2
| | | | | | | | | | According to OpenStack Guideline[1], logged string message should be interpolated by the logger. [1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages Change-Id: Ib7b5fb5f794026fc8a84260c4803afea321a9cf5 Closes-Bug: #1596829
* translate all command help strings3.4.0Steve Martinelli2016-11-171-8/+8
| | | | | | | | | | | | | | Leverage the new cliff command class attribute (_description) to get the help of a command, this allows us to mark strings for translation. We could not do this before since the help was grabbed from the docstring. This also depends on a new release of cliff and a bump to the minimum level in osc's requirements. Closes-Bug: 1636209 Depends-On: Id915f6aa7d95a0ff3dc6e2ceaac5decb3f3bf0da Change-Id: I8673080bb5625e8e3c499feaefd42dfc7121e96f
* Support "--no" option in aggregate setRui Chen2016-09-241-5/+28
| | | | | | | | | | | Supporting "--no-property" option will apply user a convenience way to clean all properties of aggregate in a short command, and this kind of behavior is the recommended way to devref. The patch add "--no-property" option in "aggregate set" command, and update related test cases and devref document. Change-Id: I7614a23c0db05144562330dc600dbab7d003d5d8 Implements: blueprint support-no-property-in-aggregate
* Support bulk deletion for "flavor/aggregate delete"Huanxuan Ao2016-06-211-8/+26
| | | | | | | | | Support bulk deletion and error handling for "aggregate delete" and "flavor delete" commands. Change-Id: I3f6105cbeeab1c9f8cd571c63ce0e7ac3d4252b3 Partially-Implements: blueprint multi-argument-compute Partial-Bug: #1592906
* osc-lib: commandDean Troyer2016-06-131-1/+1
| | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* osc-lib: parseractionsDean Troyer2016-06-131-1/+1
| | | | | | | Leave parseractions.py and test_parseractions.py as a sanity check during the deprecation period. Change-Id: I1a7469b6d872284e0276502a1a287bc0b87f8f83
* osc-lib: utilsDean Troyer2016-06-131-1/+1
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* Fix i18n support for help and error messages in computeTang Chen2016-05-241-19/+21
| | | | | Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f Partial-bug: #1574965
* Add "aggregate unset" to oscRui Chen2016-03-241-0/+31
| | | | | | | | Support "aggregate unset" command in order to remove the property of aggregate object in OSC. Change-Id: I49645135586362f0fd251f5e4a4c03eff273d9e9 Closes-Bug: #1559866
* Make SetAggregate inherit from cliff.CommandTang Chen2016-02-271-14/+14
| | | | | | | | | | | | | set/unset comamnd classes should inherit from cliff.Command class. Also, this patch adds functional tests for aggregate. And also, use utils.format_dict() to format the output of the properties dict. Change-Id: Idb50bef8990da95666960e2414dfd7c9be234bba Partial-bug: #1519503 Closes-Bug: 1546065
* log take_action parameters in a single placeAkihiro Motoki2016-02-021-36/+7
| | | | | | | | | | | | Previously each command logs take_action parameters explicitly by using @utils.log_method decorator or log.debug(). Some commands have no logging. This commit calls a logger in the base class and drops all logging definition from individual commands. Closes-Bug: #1532294 Change-Id: I43cd0290a4353c68c075bade9571c940733da1be
* Trivial: Remove useless return from files in compute.Tang Chen2015-12-171-1/+0
| | | | Change-Id: I9dc6749256fcd53d292d7f658912c032e9ce9df5
* Use a common decorator to log 'take_action' activationJoshua Harlow2015-09-011-3/+3
| | | | | | | | | Instead of duplicating the same log statement throughout the code, the same logic can be provided by a shared decorator that abstracts away the logging capability and unifies it behind a common function instead. Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79
* Fine tune some of the helps commandsSteve Martinelli2015-01-131-2/+2
| | | | | | | | | try and add some consistency with the show and delete commands. replace 'show x' with 'display x' change 'delete a y' with just 'delete y' Change-Id: I47dfa8ee23ac5c41b355796415eb515155832f65
* Command object docs: aggregate, console *, keypairDean Troyer2014-11-191-11/+11
| | | | | | | | | aggregate console log console url keypair Change-Id: Iec9b8404ed5febd061a5dfd674b76aaa8aba67bc
* replace string format arguments with function parametersChristian Berendt2014-05-201-7/+7
| | | | | | | | There are files containing string format arguments inside logging messages. Using logging function parameters should be preferred. Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
* Add aggregate commandsDean Troyer2013-07-191-0/+322
* Add aggregate: add host, create, delete, list, remove host, set, show * Add list --long option * Filter 'availability_zone' from the metadata fields * Rename 'metadata' column to 'properties' in all output Bug: 1172032 Blueprint: nova-client Change-Id: Icd408c2b34af07f5102f53d3778d8546952a12c5