Python 3 changed the map built-in to return an iterable instead of a list.
When tested in a boolean context, this always returns True, even if it
would not return anything when iterated.
Instead of the usage being printed, this error was printed:
ERROR: 'Namespace' object has no attribute 'func'
Use list comprehension instead to ensure that an iterable isn't returned
Change-Id: Ie15f2fa8ee93ab26490e371133fa0f944430737b
Closes-bug: 1295356
In Keystone V3 user names are no longer necessarily unique
accross domains.
A user can still authenticate a user in the non default
domain via the V2 API providng they use IDs instead of names.
Tenant_ID is already supported, this change adds support
for user ID
Change-Id: I36ba75f3e67c8cdb959e31923d5e557414ab6f9b
Creates an images client when attached to the the servers
client. This is necessary because the Nova V3 API no longer
proxies image queries to glance but when preparing a request to
boot a server it is necessary to retreive information about
images so we need to talk to both Nova and Glance in the same
command.
This is a bit ugly, but not much more than the already existing
ugliness of using the client class designed to talk to
Nova to talk to Glance and Cinder. The long term clean solution
is probably to a unified client that is designed to talk to
multiple openstack services.
Differences between the V2 and V3 API are described here:
https://wiki.openstack.org/wiki/NovaAPIv2tov3
Partially implements blueprint v3-api
Change-Id: Ib43682f38cd7a3e0f910b75e96685591246e7f67
This patchset updates modules based on the config file:
openstack-common.conf
Notes: Some corrections has been added to work with
new files.
+ utils.py: The method safe_decode from strutils.py
was updated and it is now not necessary to check for
decode string with py33.
+ base.py: base64 needs a 8-bit string for py33
+ test_shell.py: stdin.encoding is needed for strutils
Change-Id: Iebe474f1226f8b5faa7fb5722e65f41b80d1973c
Related to blueprint common-client-library-2
Closes-Bug: #1265473
There are some common methods in cliutils we can use in novaclient:
arg, env, unauthenticated, isunauthenticated.
+ Replaces utils.env to add alias env from cliutils.
+ Replaces utils.arg to add alias arg from cliutils.
+ Removes unused methods: add_arg, unauthenticated, isunauthenticated
To use methods from clituils.
Related to blueprint common-client-library-2
Change-Id: Ic7c132c37d6a91cf3eae55530300efd153c31903
Set the default service type when talking to the Nova V3 API to
computev3 rather than compute. Although it is rather ugly to have
a different service type for a different version of a service,
this is necessary for the medium term because traditionally the
compute service endpoint has pointed to the V2 API rather than
the root and then version discovery done.
This change allows progression of the V3 API support in
novaclient and although devstack too currently points computev3
directly to the V3 API, the intent is to change this to point to
the root and implement version discovery during the Icehouse
development cycle.
Longer term when the V2 API support is eventually removed we can
reclaim the 'compute' service type and point it to the root.
Partially implements blueprint v3-api
Change-Id: If5d6a0d8af037cde7bf253d71aac2823b89f8066
Binary I/O expects and produces bytes objects. If sys.stdout is
assigned to io.BytesIO, print() output it stdout by default, then
there will be "TypeError".
For this case, mock.patch() decorator can not work well casually.
So this patch just update the six.StringIO() for stdout/stderr.
Close-Bug #1229163
Change-Id: Ieb29ad0774c9b7f2b691628d753b210640baca8d
Python3 reorganized the standard library and moved several functions
to different modules. Six provides a consistent interface
to them through the fake six.moves module.
However, the urlparse, urllib2, etc modules have been combined
into one module which Six does not support so we do it via
py3kcompat.
Modules such as StringIO and CStringIO have been removed
completely so we use the io module.
Change-Id: I53adac11b634de2c710fc39def36bcec96366710
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Tenant names are not necessarily unique for a User, so the client
should also allow authentication by tenant_id
If both ID and Name are specificed then use the ID
Fixes bug 1195454
Change-Id: Ib62aabc3702db88f02259cd721f9efb31404bcb7
Per (proposed) hacking H203 check, use the non-deprecated
except x as y: construct, which works with any
Python version >= 2.6
Change-Id: Ib7cab00cb8f219154663a4d51a855a1a2718e8cb
Fix the shell tests so they pass for all supported prettytable
versions, as per requirements.txt (>=0.6,<0.8).
Fixes bug: #1185580.
Change-Id: I8dca23faa3c178494656ebc8088b6d1994e9869f
tests/__init__.py implies a package in the global namespace. These
tests are not global python tests, but rather tests for novaclient.
Change-Id: Ifeb8082aa010d15dddc9ae02e35589bc78ad48cc