14 Commits

Author SHA1 Message Date
houming-wang
0c547422bb Remove references to _i18n and apiclient.exceptions
Since oslo-incubator is no longer maintained[1] after
90ae25e38915cc502d9e9c52d59e8fb668a72ae1. We should cleanup
the deprecated code.

This patch do the following cleanup actions:
1. Use magnumclient.i18n instead of
magnumclient.openstack.common._i18n.
2. Use magnumclient.exceptions instead of the deprecated
magnumclient.openstack.common.apiclient.exceptions[2].

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-November/
    079343.html
[2] https://github.com/openstack/python-magnumclient/blob/master/
    magnumclient/openstack/common/apiclient/exceptions.py#L25

Change-Id: I6fae1f84d211d661bb363e43167cdf8b6b06fd4d
Partial-Bug: #1529316
2015-12-26 00:07:11 -05:00
OTSUKA, Yuanying
8480e0b0f1 Split v1 shell sub-command into specific files
v1 shell has many sub command. It is difficult to add more test
and functions. Actually we have forgotten to add some tests for
these sub-commands.
This patch splits these.

Change-Id: I6b80b621311442df987e6ff031e8c77cf4bb7095
Closes-Bug: #1515109
2015-11-19 09:47:17 +09:00
James Page
5eb6725bde Add support for python >= 3.4
Python 3.4 changed some of the output from argparse and the
handling of default func and command behaviour; this patch
deals with both < and >= 3.4 behaviour.

Change-Id: I27983f7b06fc16aeedb98a4b36f7ff9a451706ec
Closes-Bug: 1496805
2015-09-18 09:45:01 +01:00
Doug Hellmann
a6b486d3e0 Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: Id26264ad0b002ab21e60431a2fd39fcecf76c490
2015-05-06 19:32:54 +00:00
Cedric Brandily
3cbf79dec0 Support keystone region
This changes enables keystone region support using:

* an option: --os-region-name=<region-name>
* an env variable: OS_REGION_NAME=<region-name>

DocImpact
Closes-Bug: #1436774

Change-Id: I1f82d437f05c2d96ed7ed12d22906efd00edbacb
2015-03-26 21:36:18 +01:00
Jenkins
b25dfc61f8 Merge "Default version should be v1 in magnum" 2015-01-16 05:21:12 +00:00
Kennan
b02a4dacc5 Default version should be v1 in magnum
1. Change code use 'api' as version
2. remove unused setting

Change-Id: I3638ddd4afbd9057133f54d2ff26d4e8e352a515
2015-01-16 11:04:30 +08:00
Hongbin Lu
17bdfa26ca Fix an error on not finding log handler
When server return a failure response, magnumclient will use the python
logging library to log the status. The library will attempt to log the
failure by finding a log handler to do the actual logging tasks. If there
is no log handler, no message will be logged and the error message below
will be printed.

No handlers could be found for logger "magnumclient.common.httpclient"

In before, magnumclient did not add any log handler on non-debug mode,
which is a bug. This commit is for fixing that. It should be mentioned
that there is another commit 5b59253667a12a1b592d967bbcaa1f1adda559d3
(which has been reverted by 442e08b2895ad7eae29ce8ee7ffa0e4ba445f36c)
for addressing the same problem. However, this commit is a better fix since
it calls function basicConfig to add a default handler to root logger,
which ensure that there is always a handler globally.

Related-Bug: 1410444
Related-Bug: 1410507
Related-Bug: 1410510
Change-Id: I1697ff2d4fb47cdabf8da19ba862abcaed3a44ee
2015-01-16 02:28:37 +00:00
Jay Lau
c768d7abee Change folder of api to v1 for magumclient
It is better taht we can change the folder of api to v1 for
magnumclient in case we have v2, v3 ... vx in future.

Change-Id: If59c77e5d1c184c65f1e73ddd43fd89fcdcba18e
2014-12-30 11:05:23 -05:00
Abhishek Chanda
72f009079c Misc cleanups
- Removed all commented code from shell.py
- Removed unused magnum.py

Change-Id: Id4347d2c3424a784ef3978c3ab3afe1705230105
2014-11-30 14:17:52 +05:30
Jenkins
6203b18de7 Merge "Add client resources and managers" 2014-11-26 01:02:35 +00:00
Motohiro OTSUKA
cc031af4ca Add client resources and managers
Add initial managers for client resources, which are
- BayManager
- PodManager
- ServiceManager
- ContainerManager

Change-Id: Ib314225fa237f44b56cf81e2a8df6e15f8592e5b
2014-11-26 09:52:30 +09:00
Motohiro OTSUKA
049578d76c Added default service type.
This added default service type of Magnum which may be registered
in Keystone service catalog.

Change-Id: Ib0045af8b0e1e93cb3000b34a63a0a0747fdcdc5
2014-11-25 14:39:43 +09:00
Abhishek Chanda
ff36501bf1 Skeleton for the cli client
Most of this code is based on the saharaclient

Change-Id: I2af95da43273fa8636f490d62b6e71abc8e02eb0
2014-11-21 15:22:41 -08:00