14 Commits

Author SHA1 Message Date
Ghe Rivero
9991b26db1 Use oslo.i18n lib
Stop using gettextutils from oslo.incubator and replace with
the graduated library oslo.i18n

Change-Id: I479be348f6e0894ecff5cd93d37ee66648f3ea01
2015-03-19 18:27:24 +01:00
John L. Villalovos
144e82b163 Fix the final PEP8 errors
Fix PEP8 E126,E127,E128 errors, which were the only ones remaining.

Fix PEP8 errors:
E126: continuation line over-indented for hanging indent
E127: continuation line over-indented for visual indent
E128: continuation line under-indented for visual indent

Remove the ignore= entries for flake8 in tox.ini

Change-Id: I919551121d85d2aab528f4fa5ecdb3cfd940557a
2015-03-10 14:38:30 -07:00
Lin Tan
53095aaa8f Enable ironicclient with --ironic-api-version 1.x
python-ironic-client doesn't recognize API micro-version parameter.
Reuse --ironic-api-version to recognize this.

1. The client accepts '1.x' or 'latest' as valid API version and send
corresponding headers to Ironic.
2. If the user does not specify a version, client will not sent any
extra headers to Ironic. It will use the minimum version.

Closes-Bug: #1417430
Change-Id: I1db6e2f4e57d6d47d86f068018f143d0044b7211
2015-03-06 11:40:33 +08:00
Ghe Rivero
47236e2cf1 Bump hacking version
Current hacking version is incompatible with the one in the
global requirements. Match the hacking module version and made the
necessary changes to pass the tests.

Change-Id: Ie6b13a4ea112084d4c50dc27f97329dfad5777a1
2014-10-02 11:12:53 +00:00
Rakesh H S
fa2b68ed4e ironic client to use os_region_name if provided
Currently ironicclient does not pass OS_REGION_NAME to Keystone client.
That will cause problems in multiregion deployments.

Modified ironicclient to consider using OS_REGION_NAME if provided.

Closes-Bug: #1314159

Change-Id: I885e57973ccec64471fe2ba5fecfab2224829787
2014-09-14 20:46:49 +05:30
Sergey Lupersolsky
1d05c41ead Fix misspelled class name AmbigiousAuthSystem
Class name AmbigiousAuthSystem in exc.py is misspelled.
To fix the issue, this patch renames AmbigiousAuthSystem to
AmbiguousAuthSystem in exc.py and creates an alias for compatibility.
Also edits the use of the class in client.py accordingly and adds an
additional assertRaises() to
test_client.py.test_get_client_no_url_and_no_token to test both the
correct exception and the alias.

Change-Id: I18309b045d5eb9e81c72b1ed9de350925927db66
Closes-Bug: 1356512
2014-08-19 23:34:54 +00:00
Michael Davies
55dd2e45c4 Expose auth_ref in ironicclient client object
To implement token expiry in Nova's Ironic driver, we need
to expose additional information obtained from the keystone
client.

Change-Id: I14aa8aca8b83f6c9a233bb19406d03002a76f139
Partial-bug: #1308171
2014-07-10 10:31:08 +09:30
Martin Geisler
af741ec223 Add UTF-8 coding lines to all Python files
While not strictly necessary for files containing only ASCII
characters, adding a line with "coding: utf-8" can guard against
future SyntaxError's in case someone inserts a Unicode literal.

This commit adds such lines to all .py files. The syntax used by this
commit works with Python (of course). It also works with Emacs, which
will recognize the special "-*-" marker and use the "coding" variable
to correctly decode the file, even in an environment where UTF-8 is
not the default file encoding.

Existing coding lines were normalized to match the new lines added.

Partial-bug: #1325193
Change-Id: I58bf93fea711fd25890356a397e594bd820c99e3
2014-05-31 13:22:44 +02:00
Ruby Loo
490e5f2468 Fix docstring for client.get_client()
Fix a misspelled word and correct the description for parameter
'api_version'; the only valid value is '1' (because we only have v1).

Change-Id: I51e23f783de5000df96dca26cd87244c3733d359
2014-04-08 17:05:55 +00:00
Adam Gandelman
3407824179 Avoid traceback with insufficient auth credentials
Raise an exception if configured credentials are not sufficient
for obtaining an endpoint and token.

Change-Id: Ie11a25eb67da2d2c2c8ef40ab984eb2ecb77fdf9
Closes-Bug: 1290601
2014-03-26 15:58:10 -07:00
Ghe Rivero
1b1dd31067 Reorder imports
As per hacking and PEP8, grouping third party libraries in
their own group.

http://www.python.org/dev/peps/pep-0008/#imports

Change-Id: I7a574d311b5171def0c6930162a46ce4c215097d
2013-11-11 18:12:58 +01:00
Kevin McDonald
94e0fb78e4 Fixes Auth Token being sent as lambda function
Change-Id: Id6d7db4b2d3c7350147b26d42fc77f66a530a29b
Closes-Bug: #1244810
2013-10-29 09:41:57 -07:00
Chris Krelle
6752ae8307 Change service_type to baremetal
update default service_type to baremetal.

Change-Id: I58856885268225b79218d7312472d05b0a47b5b7
2013-09-27 09:10:21 -07:00
Lucas Alvares Gomes
ba073c0707 Basic project structure
Mostly taken from other OpenStack client projects and adapted for Ironic.

Change-Id: I1ef9613b9e24bbb6caac9657dc1da3add899478e
2013-09-19 00:21:14 +01:00