The compute service commands emit a "Binary" in the output but
the --service filter option isn't as clear that it's the binary
(for set it is but not list) nor do the docs give an example
of a binary (typically nova-compute but could be others like
nova-conductor, nova-scheduler, etc). This simply mentions that
the --service option is the binary for "compute service list"
and gives an example value for the option in both list and set
help.
Change-Id: If87fc37352c3a251cc89041723adbe04dedf4f8a
The force down action is added in Microversion 2.11, we should limit
the command only can be executed when the microversion is above 2.10.
Change-Id: I0a87e02e71ff025d30181fc17ebcd003a590f110
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
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 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
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
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
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
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
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
Use osc-lib directly for exceptions.
Leave openstackclient.common.exceptions for deprecation period.
Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
--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
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
Add "--long" option in ListService so that compute service
disabled reason can be showed.
Change-Id: I1ace8f1c4e4efe0a1a8f6710425d73eb5db9e5e1
Closes-Bug: #1556815
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
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
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
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
There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.
Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
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