summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/service.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove log translationsyfzhao2017-03-211-3/+2
| | | | | | | | | Log messages are no longer being translated. This removes all use of the _LE, _LI, and _LW translation markers to simplify logging and to avoid confusion with new contributions. Change-Id: I504de69b2e64250740ebcab432042a16f966fdbe Closes-Bug: #1674584
* Handle log message interpolation by the logger in compute/Gábor Antal2017-02-131-2/+1
| | | | | | | | | | 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-3/+3
| | | | | | | | | | | | | | 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
* Merge "Support bulk deletion for delete commands in computev2"Jenkins2016-06-281-2/+16
|\
| * Support bulk deletion for delete commands in computev2Huanxuan Ao2016-06-271-3/+17
| | | | | | | | | | | | | | | | | | | | | | Support bulk deletion and error handling for "keypair delete" and "service delete" commands in computev2. Up to now, all the delete commands in computev2 support bulk deletion. Change-Id: I6d5c960e9716188e56615514d0921618a15a88ec Partially-Implements: blueprint multi-argument-compute Partial-Bug: #1592906
* | 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
* Refactor unit test of "compute service list" commandHuanxuan Ao2016-06-221-2/+2
| | | | | | | | | | The unit test of "compute service list" only checked the "Disabled Reason" columns and its data. It is not enough. This patch change the test to check all datas in the list. Also, this patch modify the "Id" to "ID" in this command. Change-Id: I988fd6365f2652185dd96d9417f294eba9c31cd9
* Standardize logger usageTang Chen2016-06-201-2/+7
| | | | | | | | | | | | | | | | | | | 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
* Merge "Support compute service force down/up"Jenkins2016-06-151-16/+53
|\
| * Support compute service force down/upRui Chen2016-06-141-16/+53
| | | | | | | | | | | | | | | | | | Aims to evacuate servers from compute host as soon as possible, operators might set the compute service force down manually. Novaclient support the behavior, this patch support it in OSC. Change-Id: I22ff1c5d670c449771fdcb3f4f39cd82f428531a Closes-Bug: #1589348
* | Fix foundation copyrightsDean Troyer2016-06-141-1/+1
|/ | | | | | | | The OpenStack LLC copyrights date from before OpenStack was transferred to the foundation. These appear to be getting copy-pasted to new files so at least should reflect the correct entity. Change-Id: I02953d752cb24ead6aa4ad8bfe257a48317c9f13
* 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/+2
| | | | | | | | Use osc-lib directly for exceptions. Leave openstackclient.common.exceptions for deprecation period. Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
* Merge "Fix compute service set command"Jenkins2016-06-081-1/+1
|\
| * Fix compute service set commandsunyajing2016-06-081-1/+1
| | | | | | | | | | | | add ``Binary name`` to help msg of compute service set command. Change-Id: I5ed3824ec5bede250ce41f187835e8901b5e11fd
* | Refactor SetService --enable/disable optionTang Chen2016-06-041-15/+23
|/ | | | | | | | | | | | | | This patch changes the following: 1. --enable/disable option should follow the rules in the doc below: http://docs.openstack.org/developer/python-openstackclient/command-options.html#boolean-options 2. "--disable-resion" is specified but not "--disable", an exception is raised instead of igoring "--disable-reason" option. Change-Id: I92e9234111e661bfe7119a8e19389a87c874ab0c
* Fix i18n support for help and error messages in computeTang Chen2016-05-241-12/+20
| | | | | Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f Partial-bug: #1574965
* remove #noqa from i18n importsSteve Martinelli2016-05-131-1/+1
| | | | | | hacking checks no longer fail on `import _` Change-Id: Idd60f0a0e71e5081691eacb39e5091ab08fcce6d
* Log hint when --enable present with --disable-reasonRui Chen2016-04-051-2/+7
| | | | | | | | | | --enable and --disable-reason should be mutually exclusive in "compute service set" command, but now when they are present at the same time, --disable-reason would be ignored silently. Fix these and add some hints about --disable-reason argument is ignored in this situation. Change-Id: I43254b6bc40fcae4fd0dc3457f26fad84c267072 Closes-Bug: #1556801
* Wrong param type in compute-service.rstSheel Rana2016-03-301-2/+2
| | | | | | | | | | | | | | compute-service.rst file uses 'describe' for below optional parameters 1. --long 2. --service <service> 3. --host <host> This patchset changes type of these argument to option. Change-Id: Ifd57bdf058efaeaa6cb43a7d4a60ee61ddb8de14 Closes-bug:#1563700
* Support "--long" option in ListServiceRui Chen2016-03-141-9/+27
| | | | | | | | Add "--long" option in ListService so that compute service disabled reason can be showed. Change-Id: I1ace8f1c4e4efe0a1a8f6710425d73eb5db9e5e1 Closes-Bug: #1556815
* Add --reason for disable servicejichenjc2016-03-091-6/+16
| | | | | | | disbale service allow a reason to be input as disable reason. This patch add support for it. Change-Id: I59622c3970e055ebd46bf03c33c864b6d064db28
* log take_action parameters in a single placeAkihiro Motoki2016-02-021-15/+2
| | | | | | | | | | | | 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
* Docstring should say 'default' if option is defaultRushi Agrawal2015-12-311-1/+1
| | | | Change-Id: I59d83e7a0a590fa537f509f7f19940640f555679
* Merge "Remove list output from "compute service set""Jenkins2015-12-181-11/+2
|\
| * Remove list output from "compute service set"xiexs2015-12-011-11/+2
| | | | | | | | | | | | | | | | Replace the super class from lister.Lister to command.Command, as no need to display the status for the "set" command. Change-Id: Ibaf3c1e349633223fca19937bbd9060d4f9ecbda Closes-Bug: #1517804
* | Trivial: Remove useless return from files in compute.Tang Chen2015-12-171-1/+0
|/ | | | Change-Id: I9dc6749256fcd53d292d7f658912c032e9ce9df5
* Add compute service deleteAlex Schultz2015-10-161-0/+22
| | | | | | | | This change adds 'compute service delete <service>' to the openstack client. This is the equivalent of 'nova service-delete <id>' Change-Id: I69ef1cac72cbe125c2114f8e958e22350a70f367 Closes-Bug: #1503510
* Add ID column to compute service listAlex Schultz2015-10-061-0/+1
| | | | | | | | | This change adds the ID to the compute service list command so that the ID can be leveraged by scripts trying to remove or update a specific service. Change-Id: I446b4c0071988133195eb2382313b3918b7ffa72 Closes-Bug: #1503430
* replace string format arguments with function parametersChristian Berendt2014-05-201-2/+2
| | | | | | | | There are files containing string format arguments inside logging messages. Using logging function parameters should be preferred. Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
* Remove api = apiName calls from each methodSteve Martinelli2013-07-121-2/+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
* Added compute service support.Josh Kearney2013-03-051-0/+111
Change-Id: I548e35396534b5498f31a45c752984f6d33357c3