Commit 6f8667990cdb3cd662d51be2403cca5859559f04 removed the deprecated
"--policy" switch, which caused the check for the missing parameter
to quietly stop working correctly.
Make "policy" a mandatory positional parameter and let argparse
figure it out; it has a much better/more helpful error message
anyways.
Closes-Bug: 1632866
Change-Id: I3234c08b1bc8ba263537bb6232280c471457f069
The instructions for deprecating commands predated reno
so this change updates them a bit to be current with our
processes now. Also adds a reminder to update the help
text/description of a command to mark it deprecated.
Change-Id: I530399ba9cf6c50bd0dbb06f231aee61466eebd6
There are several commands and options which have been
deprecated, it's now time to clean those up.
flavor-access-list and aggregate-update had options
deprecated in newton, but that's still too new to
remove those yet.
Here is the table of affected commands and the deprecation
commit and initial release with the deprecation.
Command Commit Release
------- ------ -------
rename 1d1e43957 3.3.0
root-password 3bf6f8fe9 2.27.0
add-floating-ip 4f92f7ba0 2.16.0
remove-floating-ip 4f92f7ba0 2.16.0
absolute-limits bf6fbdb8d 2.25.0
rate-limits bf6fbdb8d 2.25.0
aggregate-details bf68a0cf1 3.4.0
endpoints 1f11840dd 3.1.0
credentials 1f11840dd 3.1.0
Note that network resource quota deprecations are not
part of this change as those are impacted by the 2.36
microversion and will be cleaned up later separately.
Change-Id: Id649d16ec2cdeb04bbaf2239a5e813abcca9c65d
Novice users may be tempted to pass in values such as
datetime.datetime.now() as a parameter when querying for
usage. Adding a disclaimer to the type hints that inputs
are interpreted as UTC may help avoid this mistake.
Change-Id: Iad34c15f98538fd12215397cb2d9391189f99f79
Releasenote translation publishing is being prepared. 'locale_dirs'
needs to be defined in conf.py to generate translated version of the
release notes.
Note that this repository might not get translated release notes - or
no translations at all - but we add the entry here nevertheless to
prepare for it.
Change-Id: Ic73a5d161244396297c9d4f72ae4c586e7f81cf8
In line with other clients testing we've found that having the
requests-mock fixture at self.requests can be misleading for new people
as it looks like you're calling requests itself.
Also make use of some of the new features of requests-mock like query
parsing, json handling, method names.
Change-Id: Id61b88c53478d49f91c3f880ed5b90d638051ba0
The novaclient tests are broken with the master (unreleased) branch of
requests. This is because most of the mocking that novaclient does with
requests in insufficient.
Requests-mock is for exactly this purpose and is already widely used in
novaclient so replace using mock with requests-mock where appropriate.
Closes-Bug: #1630157
Change-Id: Ie91daeb5f0c241eb83b77c04ac1b12e431d6671c
In order to support automatically updating the release notes when we
create stable branches, we want the pages to be in a standard order.
This patch updates the order to be reverse chronological, so the most
recent notes appear at the top.
Change-Id: I9a79d95953acdb94b676020a91627b8da4964608
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
New argument "--wrap" is added for "nova show" command to wrap
the output. The default wrap length is set to 0 i.e. no wrap.
Usage: nova show --wrap 80 <server-id>
closes-bug: 1616415
Change-Id: I7f4869d743f7bf9ff653183a5767134c796c440a
Patch 2a70e9688151588347664badbac5d0a59ef0f95c in the server
changed the error message that comes back in the case of a locked
server which breaks this test. The test is unnecessarily rigid in
it's assertion, we should just be checking that we get a 409
back, not what the actual error message is, which is prone to change.
Change-Id: I1fd64953e671c6c7fe1068a9c30f5a077712a9fb
Closes-Bug: #1618561
Used '%' instead of format() because "%" formatting operation
returns a unicode string for both unicode and non-unicode
format strings.
Encoded the exception error message in novaclient.shell.main and
novaclient.utils.do_action_on_many method to avoid
"UnicodeEncodeError" and print valid message.
NOTE:
Not used u'{0}.format(<str>) because in python 3 everything
is unicode so no need to add explicit 'u' to format string.
Closes-Bug: #1403379
Change-Id: I13f1ef2e1b41299b417cad3759a5cda241890df7
When instantiating novaclient with kwargs or named attributes, the 'password'
field is duplicated due to an overwrite on the __init__ method of Client v2.
This patch pops out the password field when it's passed and no api_key is
provided.
Co-Authored-By: Pavel Kholkin <pkholkin@mirantis.com>
Closes-bug: #1511417
Change-Id: Id8310eccef5f0f9a2983e25dd35541d1eb0efe86
Refactoring code: Making 'kwargs' dict to use single instruction: pop()
rather than two instructions: get() and del, giving the codes a format
that carries through.
TrivialFix
Change-Id: Icaf4a57314a8fe48f51993d7b32a1671fec40f31
The functional tests are looking for a cirros-*uec image and
if that isn't found they fail:
In the function novaclient/tests/functional/base.py:pick_image,
images variable is a generator object which doesn't have
'__getitem__' attribute and so the functional test is failing.
Change-Id: I32b05ff6f2c7501eff04fa9f180eecf3099389ab
Closes-Bug: 1615594
In pick_image method to just pick the first image it finds
if it can't find the specific cirros-*uec image.
Also look for the -disk.img since devstack is changing
the default image in:
Id65ebae73b28da7185cb349b714b659af51ef77f
Change-Id: I0e4c38a9e0ae25a922f6b0e09f3f2531f49c88c9
Closes-Bug: 1614118
This adds support for the v2.37 microversion. The networks
part of the server create request is required in this
microversion so if nothing is specified for --nic arguments
on the command line we default to 'auto' for backward
compatibility in the CLI.
Part of blueprint get-me-a-network
Change-Id: I6636ddcd3be7bf393d2d69cc6c1ba5c7d65ff674