14 Commits

Author SHA1 Message Date
Dean Troyer
110a62f277 Add importing file to import warnings
Add the Python file doing the import to the warnings emitted by
the modules moved to osc-lib. Users will at least have a hint as
to which package is out-of-date.

Change-Id: I633b440c30b2b15cfde7a9013e30dfa39ab200bc
2016-08-30 09:21:02 -05:00
Dean Troyer
e7ed403712 Finish osc-lib transition for command.py
https://review.openstack.org/#/c/328318/ was the transition of
openstackclient/common/command.py to osc-lib but it was incomplete;
https://review.openstack.org/#/c/329885/ started to fix it but
was also incomplete.  Third time is charm?

Change-Id: Ib6c0266155c2155ae59067ce7b15bebca1e375e8
2016-06-15 22:50:43 +00:00
Tang Chen
ec630e033a Setup deprecate msg for command.py
This could be a miss when we use osc_lib first in OSC.
command.py has been moved to osc_lib, and should reuse
it and print a deprecate msg if the old file is used.

Change-Id: Ibc35659f6f78b8f5e3c6026db2644a876ef7c549
2016-06-15 15:24:35 +00:00
Dean Troyer
d20c863ebc osc-lib: exceptions
Use osc-lib directly for exceptions.

Leave openstackclient.common.exceptions for deprecation period.

Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
2016-06-13 10:50:01 -05:00
Richard Theis
6f2c1734e3 Fix --enable options on commands
The --enable option on commands is ignored when the arguments are parsed.
This is related to the --enable-beta-commands option. Renaming the option
to --os-beta-command fixes the problem.

There's no need to handle backwards compatibility for the option name
change because there hasn't been an OSC release yet with beta commands.

Change-Id: I0327ba8a2058858a83e9a42e231470ed733cc834
Closes-Bug: #1588384
2016-06-02 10:07:34 -05:00
Brandon Palm
f49f0fead2 Fixed a bunch of spacing
Nothing too complicated here.  I fixed a bunch of spacing issues
that I saw in OSC.

Change-Id: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
2016-02-23 10:38:58 -06:00
Akihiro Motoki
258c1102cc log take_action parameters in a single place
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
2016-02-02 09:58:32 +09:00
Akihiro Motoki
0e6b86ad94 Set up logger of each command by metaclass
compute.v2.flavor is changed in this commit as an initial example.

Partial-Bug: #1532294
Change-Id: I262af6ade0ae03fbe1cd2ad198faf4ebb4ecf7ce
2016-01-20 22:02:19 +09:00
Steve Martinelli
1a0d5ccc68 Remove api = apiName calls from each method
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
2013-07-12 11:07:33 -05:00
Monty Taylor
016a0b301e Fix flake8 errors in anticipation of flake8 patch.
Change-Id: Ifdc4322b699f2bd91a6900e55695acd3d736568e
2013-05-14 08:28:48 -07:00
Josh Kearney
b26cb5bf68 Upgraded to PEP8 1.3.3 to stay aligned with Nova, etc.
Made all the necessary changes to pass new PEP8 standards.

Also cleaned up docstrings to conform to the HACKING stanards.

Change-Id: Ib8df3030da7a7885655689ab5da0717748c9edbe
2013-01-31 13:31:41 -06:00
Josh Kearney
0a4912f9fb Standardize on a copyright header and ensure all files have them.
Change-Id: I64812bca01ca655c9cf9239a0daea84907082a29
2013-01-24 12:02:23 -06:00
Dean Troyer
3b2129f0b8 Add copyright notices and update dates
Change-Id: I54a7d99328143205ab97ea930aeeeb69fe92c76c
2012-05-10 14:58:16 -05:00
Dean Troyer
04730e6f40 Add 'list service' command and common modules 2012-04-27 11:53:06 -05:00