In the original code, isalnum() in is_uuid_like() doesn't allow "-",
while for UUID, format like aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa should be
allowed. This patch is to reuse uuidutils's API in oslo.
Change-Id: I339974c75a32d27f8e4443a1b97bb6e410933aa4
Signed-off-by: Shane Wang <shane.wang@intel.com>
Some cleanups include:
- Add flavor sub-commands into README.rst
- Check flavor ID when creating a flavor
- Remove check_uuid_like() because it isn't used
- Remove parameter cs in some _print_XXX functions because cs is
not used
Change-Id: If47ce557d33db05f53e382f0670f436e05a340b7
Signed-off-by: Shane Wang <shane.wang@intel.com>
Because sort_index = 0 by default, "if sort_index is not None" doesn't
make any sense.
Here sort_index should be None by default, which means "donot want to
sort".
Change-Id: I823ab75eb7a92bdc426dd96a3d1e56f187118729
Signed-off-by: Shane Wang <shane.wang@intel.com>
The current auth plugin system lacks some functionality to be used with
other methods that might require additional configuration options or
that do not require a user to pass some options that are now compulsory
(for example, X.509 authentication needs to get a certificate file, and
does not need either a username or a password). This commit extends
the current system to handle these extra features, while remaining
compatible with older plugins.
DocImpact: We should documment how to implement additional
authentication plugins, such as BasicAuth, X509, etc.
Implements: blueprint authentication-plugins
Change-Id: I7b0ef4981efba8160dea94bf852dba7e2e4068f5
When using Keystone PKI, a token ID can be over 3200 chars long.
Add optional --wrap option to make 'keystone token-get' human readable
By default wrap=64 (to fit in 80 char terminal). And can be turned off by
setting wrap=0
Fix bug 1131001
Change-Id: I50be7ebb4323ab1bf07af557403f5136b49080a4
Currently novaclient doesn't handle properly incoming and outgoing
encode / decode process. As a solution for this, this patch implements a
decoding process for all data incoming from the user side and decodes
everything going out of the client, i.e: http requests, prints, etc.
This patch introduces a new module (strutils.py) taken from
oslo-incubator in order to use 2 of the functions present in it:
About safe_(decode|encode):
Both functions try to encode / decode the incoming text using the
stdin encoding, fallback to python's default encoding if that
returns None or to UTF-8 as the last option.
In both functions only basestring objects are accepted and they both
raise TypeError if an object of another type is passed.
About the general novaclient changes:
In order to better support non-ASCII characters, it is a good
practice to use unicode interanlly and encode everything that has to
go out. This patch aims to do that and introduces this behaviour in
the client.
Testing:
A good test (besides using tox) is to use nova client with and
without setting any locale (export LANG=).
Fixes bug: 1061156
Change-Id: I20b75e42b0c3dac89f1048faa1127253a64f86c7
Adds a --fields argument that sets the fields to display.
ID is always displayed.
Fixes bug #1076473
Change-Id: If3462e6a490ea16da4834a7f40f96b111c9e8227
Fix bug 1088835
"nova quota-update" command is executed without checking the format of
the tenant_id argument. The tenant_id should be in the format of UUID.
The tenant_id of quotas should be in accord with the form of keystone's
tenant_id. So this patch checks the format of the tenant_id when "nova
quota-update" command is executed.
Change-Id: I47c4f2ff9adbab5da4697270dcf024ac88e24529
When printing a dict e.g. "nova show" one of the properties
is "fault". When the user is admin, "details" of the fault
is shown, which includes a backtrace. This causes the
printing of the table to be unreadable as the backtrace
overflows the table row. This patch adds a separate row
for each substring after splitting on newlines.
Change-Id: I4c1bc8725a2bb6970be2c884c5e044d9eade8302
Ensure list printing function in utils can handle non-sorting
calls. Allow result list can be formatted and outputted without any
sorting field, keep natural order to the list printing. Adding necessary
checking to avoid prettytable (0.6.1 for me) exception: "Invalid field
name: None!".
Fix bug: #1099732
Change-Id: Ied869d987e608fff8b8b5f5a65d21e02f0cebeaa
Signed-off-by: zhiyanliu <lzy.dev@gmail.com>
Fixes the novaclient.utils.find_resource function to properly handle
non integer values and not break with an AttributeError.
Adds a test case to test a few more non valid inputs.
Fixes bug #1065367
Change-Id: Iaa2025f4eb580234f754596c3572e2f87872170e
Ensure that values which are supposed to be boolean look like correct
user input, instead of assuming that any non true-looking input is
False.
Also, update the flavor manager to raise a CommandError if is_public is
not a boolean value.
Fixes bug 1059414
Change-Id: I3275e4bba103b14081becf91f723f1be060391e5
blueprint project-specific-flavors
This change implements client bindings for the project specific flavor API in following change
https://review.openstack.org/#/c/11270/
Change-Id: Id8d559985f9369f53926e63ee5f5ce23a051e25b
The 'name' field for some resources is called something different,
for example 'display_name' for volumes. There was a hack in our
find method to search for display_name as well.
This change adds a new class variable to a Resource to tell it
which attribute to use for searching by name. Volumes and snapshots
were switched to use 'display_name' and hypervisors were switched
to use 'hypervisor_hostname'.
Tests fixed and added.
Fixes bug 1034536
Change-Id: I1b4fb969d42c59d1ab8e3e275a563bbe158e9264
--timings = show timings for each call made to nova (including auth)
--bypass_url = api node endpoint to use instead of one from service catalog
For example:
nova --timings --bypass_url=http://10.24.31.37:8774/v1.1/nova-staging boot --image f304d266-0a49-4877-b34c-63aea8360297 --flavor 3 delete_me_2
Change-Id: Ib2a258b7e969ad56ce4ee2bd64c61310278cb856
In 0.6, printt() (wrapper to get_string) has been removed.
Updated to use get_string(), backward available since 0.2 release.
Change-Id: Ica292757ec3de5004f27afbc5c8ee11d839421df
Allows a user to interact with certain models (image, flavors, and
servers currently) using a human-friendly identifier which is a
slugified form of the model name.
Example:
nova boot --image debian-6-squeeze --flavor 256mb-instance myinst
Change-Id: I43dbedac3493d010c1ec9ba8b8bb1007ff7ac499
* Depends on https://review.openstack.org/#change,4479
* Adds support to change service type including tests
* Adds decorator for methods that need to use another service type
* Changes volume and snapshots to use the volume endpoint
* These extensions will move into the volume client once it exists
* Fixes bug 940017
Change-Id: I683e4ca6c67e278d8aa8a9acec3dc0f1872f43f2
This is declared as NOVACLIENT_UUID_CACHE_DIR.
Resolves bug 932468 , defaulting to previous behaviour.
Added myself to AUTHORS
Change-Id: I154500517d7c882a4a090588a95f4b3bfee70595
Nova volumes do not have a name property but a displayName one, therefore we
modify find_resource() so it looks for this. Then, we modify the test suite
for utils.py so it uses the novaclient.base.ManagerWithFind class for its
FakeManager rather than implementing its own find() method. This way we are
sure that the utils.py functions work correctly with ManagerWithFind and its
way to search in objects list.
FakeResource class is now used, whereas it was not before.
Change-Id: I4c4838250e6987e05022e1607e8d099eb8fb7fff
Signed-off-by: Julien Danjou <julien@danjou.info>
Added @unauthenticated decorator to mark subcommands that do not
need authentication. And checks to skip authentication for these
commands.
Added novaclient.keystone to setup.py
Change-Id: Id2fd60af305c30a950bdbae8f897192bfae4d797