summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/agent.py
Commit message (Collapse)AuthorAgeFilesLines
* Replace six.iteritems() with .items()lihaijing2020-01-091-2/+1
| | | | | | | | | | | | | | | | 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
* translate all command help strings3.4.0Steve Martinelli2016-11-171-4/+4
| | | | | | | | | | | | | | 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
* Modify compute agent set commandsunyajing2016-07-111-8/+28
| | | | | | | | | | Migrate ``compute agent set`` arguments: version, url, md5hash to be optional. BackwardsIncompatibleImpact Change-Id: I092b7ed24274bafa548f0537c4586504be3a2825 Co-Authored-By: Huanxuan Ao <huanxuan.ao@easystack.cn>
* Modify some unusual help messages in computev2Huanxuan Ao2016-06-271-3/+3
| | | | | | | | | | | | Some command help messages are unusual, for example: common help message for a list command: "list objects" unusual help message: "list obejcets command" I think we should keep help message consistent, so I modify the unusual help messages in computev2. Change-Id: Ic5f11eba1a4397949e85d91cc067519752e89bff
* Standardize logger usageTang Chen2016-06-201-4/+8
| | | | | | | | | | | | | | | | | | | Use file logger for all command specific logs. This patch also fixes some usage that doesn't follow rules in: http://docs.openstack.org/developer/oslo.i18n/guidelines.html After this patch, all self.log and self.app.log will be standardized to LOG(). NOTE: In shell.py, we got the log in class OpenStackShell, which is also known as self.app.log in other classes. This logger is used to record non-command-specific logs. So we leave it as-is. Change-Id: I114f73ee6c7e84593d71e724bc1ad00d343c1896 Implements: blueprint log-usage
* 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: utilsDean Troyer2016-06-131-1/+1
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* osc-lib: exceptionsDean Troyer2016-06-131-1/+1
| | | | | | | | Use osc-lib directly for exceptions. Leave openstackclient.common.exceptions for deprecation period. Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
* Support multiple argument for compute agent delete commandsunyajing2016-06-031-3/+19
| | | | | Change-Id: I3b19e4914d475b86d7e8aa8d76e62a2ac811272f Partially-Implements: blueprint multi-argument-compute
* Fix i18n support for help and error messages in computeTang Chen2016-05-241-13/+26
| | | | | Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f Partial-bug: #1574965
* Make SetAgent inherit from cliff.CommandTang Chen2016-02-271-3/+2
| | | | | | | | | set/unset command classes should inherit from cliff.Command class. Also, this patch adds functional tests for compute agent. Change-Id: I25eafffd1167f82aa0d430628c22dee7516b1e19 Partial-Bug: 1546065
* log take_action parameters in a single placeAkihiro Motoki2016-02-021-20/+4
| | | | | | | | | | | | 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
* replace string format arguments with function parametersChristian Berendt2014-05-201-4/+4
| | | | | | | | There are files containing string format arguments inside logging messages. Using logging function parameters should be preferred. Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
* In anticipation of network agents, rename computeTerry Howe2014-02-271-4/+4
| | | | | | | Rename the compute agents in anticipation of network agents Change-Id: I201121915638d89dfbe46a7e0026aa4c2777e590 Closes-Bug: #1285800
* Fix some help stringsAndreas Jaeger2014-02-211-1/+1
| | | | | | | | | | This fixes some errors and inconsistencies I found reviewing the help strings: * Capitalize help strings * Add missing space between words (in multi-line strings) * Improve wording Change-Id: I2fb31ab4191c330146e31c1a9651115a6657769a
* Begin Python 3 compatabilityDean Troyer2013-07-291-3/+4
| | | | | | | | | | | * use six.iteritems() * replace basestring with six.string_types * convert print statements to functions (they're all debugging and should be removed eventually anyway) * clean up OpenStack copyright: LLC -> Foundation Change-Id: Icb14212bcb408e63816bfec3922a697bc1a6c946
* Remove api = apiName calls from each methodSteve Martinelli2013-07-121-4/+0
| | | | | | | | | | | As discussed in https://review.openstack.org/#/c/36352/ for each command, we were setting api = identity or volume... etc, this was for an old way of calling commands that are is no longer used. Also removed openstackclient/common/command.py Change-Id: I2705f35d343f2ae729dc22d6aed0b852b2f8ca19
* Removed unused imports.Josh Kearney2013-03-151-1/+0
| | | | Change-Id: Ib1bae16f996559c008fb1fe0b74f26b152854ea8
* Remove underscore.Josh Kearney2013-02-251-1/+1
| | | | Change-Id: Iaf2791b96e81d6a0d4846adb3128e4dff61faf30
* Added compute agent support.Josh Kearney2013-02-201-0/+168
Change-Id: I818a2ea51a773f50da385cbdd71771a4ac923bd7