When an exception was caught and rethrown,
it should call 'raise' without any arguments
because it shows the place where an exception
occured initially instead of place where the exception re-raised.
Change-Id: I5fb6dea5da7fb6e1e2b339a713c7d37f8c99e407
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
I checked all the files in openstackclient/common
and fixed the missing i18n supprots.
Change-Id: Id7f76a24aae663f5832ef9bcf1bd5a6b7081af24
Partial-bug: #1574965
Exceptions that occur while getting network availability zones
should not be masked as if the extension does not exist.
Change-Id: I07213ec6c4d83e97261b58bf8d42417c1cdfae6a
Related-Bug: #1534202
Update the "os availability zone list" command to support listing
network availability zones along with the currently listed compute
and volume availability zones. This adds the --network option to
the command in order to only list network availability zones. By
default, all availability zones are listed. The --long option
was also updated to include a "Zone Resource" column which is
applicable to network availability zones. Example zone resources
include "network" and "router".
If the Network API does not support listing availability zones
then a warning message will be issued when the --network option
is specified.
This support requires an updated release of the SDK in order
to pull in [1].
[1] https://bugs.launchpad.net/python-openstacksdk/+bug/1532274
Change-Id: I78811d659b793d9d2111ea54665d5fe7e4887264
Closes-Bug: #1534202
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
Update the "os availability zone list" command to support listing
volume availability zones along with the currently listed compute
availability zones. This adds a --compute and --volume option to
the command in order to select the availability zones to list. By
default, all availability zones are listed.
If the Block Storage API does not support listing availability
zones then an warning message will be issued.
Change-Id: I8159509a41bd1fb1b4e77fdbb512cf64a5ac11a9
Closes-Bug: #1532945
Refactor the "os availability zone list" command to make it a common
command instead of a compute-only command. Since availability zones
are common to compute, volume and network (new), this refactoring
allows availability zone support to be added for volume and network.
In addition to the refactor, unit and functional tests were added.
Change-Id: I63e9d41d229b21cd38e5a083493042c096d65e05
Partial-Bug: #1532945