Module novaclient.v1_1 is used as implementation of V1.1, V2 and V3.
Since future development(microversioning) will be done across V2,
implementation should be done in appropriate module(to prevent misleading).
Despite the fact that implementation for all versions are equal, discover
method for contrib path worked only for v1.1. This patch fixes this bug and
modifies shell tests to check all versions.
Change-Id: Ib6798f4dfe177586302141f522dc593560ce6a5b
Module gettextutils from oslo-incubator was graduated to separate
library (oslo.i18n) and removed from repository, so we should use
new library.
Change-Id: I15d36ac5a2bb88b332ffa38d29488b75c55a20a9
Modules `strutils`, `timeutils` and `network_utils` from common code are
graduated in `oslo.utils`, so we can:
1. remove `novaclient.openstack.common.network_utils` and use
`oslo.utils.netutils` instead.
2. use `oslo.utils.encodeutils` and `oslo.utils.strutils` instead of
`novaclient.openstack.common.strutils`.
3. use `oslo.utils.timeutils` instead of
`novaclient.openstack.common.timeutils`.
Additional information:
- modules `importutils`, `strutils` and `timeutils` from
`novaclient.openstack.common` cannot be removed, because:
- importutils is used by apiclient and jsonutils;
- strutils is used by apiclient, cliutils and jsonutils;
- timeutils is used by jsonutils
- additional check for `safe_encode` in Py3 is required, since
If91a866d864a22d28a352152beff4c7406a27b7b was merged.
Change-Id: Ib8d79d9c85af4916e87a76a1a67a13488ddaa111
When we want to unset multi keys of flavor
extra data, only first key can be removed
because of the key word named 'return'.
To fix it, remove the return key word
Change-Id: I70d1f2e84a2bfcea1db60b26138f84421f9a7309
Closes-bug: #1324077
Module py3kcompat was removed from oslo-incubator. We need remove its
usage in client side firstly. This make us move smoothly when sync
oslo-incubator code.
Change-Id: I8b07c32c9852e747579a23685f3c8a07ac13ec01
Partial-Bug: #1280033
This change applies a regular expression in order to filter
flavor extraspects keys with invalid characters.
The characters allowed are: letters, numbers, underscores,
periods, colons, spaces and hyphens.
A new test flavor has been created which doesn't check the
keys in the post body. This flavor has been created in the
third place (instead of in the last) in order to keep
working existent test cases which depend on the last flavor
received in the get method.
Change-Id: Ifd86bed23a05a5946ae8b9ba6f6c9bf4b24b1d4c
Partial-Bug: #1256119
This change make all the text visible by the user i18n. The
messages changes are in prints, logs, exceptions, helps, etc
Pep8 errors about "Multiple positional placeholders" also fixed
Change-Id: I731afea790baddbc34d059b93a35e3d275fc1df8
Instead of using novaclient.utils' bool_from_str, use bool_from_string
from the oslo incubating strutils
Notes:
0. utils.bool_from_str was strict, only accepted a small set of
values, while strutils.bool_from_string is not strict by default,
anything not true is false
1. bool_from_string accepts on/off, which bool_from_str did not
Change-Id: I04744844b55697819289def081d3c9117ed0713f
The first part of adding flavor support for the Nova V3 API (support
for flavor-access API calls is still to come).
Restructures v1_1 testcases so as much as possible so they can be
reused for the V3 version of the tests. If it looks too ugly an
alternative would be to just cut and paste the fakes and test
from v1_1 to v3, which is simpler to understand but comes at the
cost of duplicated code. The upside though is it would be much
easier to remove v1_1/v2 support in the future.
Partially implements blueprint v3-api
Change-Id: Ic7cb3c43db02c07d37aea2675b310aaa50639c40
In tempest, some tests use delete() method of each resource class
(Server, SecurityGroup, etc.) for cleaning up when each test finishes.
Now we are adding some tests, which create a Flavor instance, to tempest
and we need the delete() method of Flavor class.
Fixes bug #1218156
Change-Id: I210d62aa45510858346315046cf57ea7b1de7b7b
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>
Only blacklisting those warnings that are numerous,
so that in principle Hacking and PyFlakes warnings
are tested. Fix the easy ones alongway.
Change-Id: I571f51ebf570ac114509f2dcd71cdce281e7c70a
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>
Nova gives admins public flavors and flavors from their own projects
only by default. For flavor management, admins need to see all flavors
regardless of access.
Changes:
- Adds an 'is_public' argument to flavors.list() that mirrors the
Nova API. is_public=None can be used to see all flavors.
- Adds an --all switch to flavor-list in the CLI for use by admins
when all flavors are wanted.
Fixes bug 1172179.
Change-Id: I915cd2d8266cb6e32c80691a6ff27d8a23488c98
Nova stores rxtx_factor as a float internally and as such
novaclient should validate that a float is specified
when creating a flavor.
Fixes LP Bug #1083651.
Change-Id: I75f9440d3fe2a0e72ea592f2259640623400ae73
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
Fixes client side Bug #1056935
Throws an exception if the user does not input integers for the
corresponding parameters.
Change-Id: I4c4b8148f6565bc5a3b348dbde8c2cf0da00234a
Add flavor extra specs so that user can list/set/unset
extra specs in nova client
blueprint extra-specs-in-nova-client
Change-Id: I6ad7293e29764648c79943c4d05f3a09931af411
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
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
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
Makes use of the new nova module for flavor creation/deletion (still
under review at https://review.openstack.org/#change,3197
tests and cli commands added.
v2:
Fix tests
Fix pep8 violations
v3:
Drop unused import
v4:
Usage defaults to end date 'tomorrow'
v5:
Undo unintentional change
v6:
Drop useless comment
Fix meta var name for flavor-delete command
Change-Id: I14baa02d5cbe5eaf17875c285c993508b1671a13