With python3.x, classes can use 'metaclass=' instead of
'six.add_metaclass', 'six.iteritems' and 'six.iterkeys' can
be replaced by 'items' and 'keys', 'six.moves.urllib.parse'
can be replaced by 'urllib.parse', 'six.StringIO' and
'six.moves.cStringIO' can be replaced by 'io.StringIO',
'six.text_type' and 'six.string_type' are just 'str'.
Change-Id: I84848c0bf8ab3c36dd821141191e2725e4e3b58b
Change the incorrect port attribute name "uplink_status_propagation"
to "propagate_uplink_status".
Change-Id: Icd7c49af8d988a6e3a52a58c784bd701b2d36faf
Closes-Bug: #1891873
Add file to the reno documentation build to show release notes for
stable/victoria.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.
Change-Id: I6c1a9cdff90f7073082fc057f0f11b184de5dc32
Sem-Ver: feature
The docs requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.
Change-Id: I35a367505b2b423c345b05519e4134113cb66648
Fixes incorrect json output for 'openstack server show -f json'.
The security group json output groups all the json as one
for e.g. "security_groups": "name='group1'\nname='group2'"
The correct output should be
"security_groups" : [{"name" : "group1"}, {"name" : "group2"}]
properties and volumes_attached fields also has similar issue.
Story: 2007755
Change-Id: I1b1cac716329e0530400aff782c08000b21d8e1d
The docs and releasenotes requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.
Change-Id: I4403cee833448beb69afaec503519d5a951f7e34
There was a problem that the '-image-property' option, which can be used
to create an instance, did not work as intended.
I found that there were two problems with this option.
First, I cannot select an image as its metadata.
The second is that when there are multiple images available, the desired
image may not be selected depending on the situation.
This patch solves these two problems.
I wrote the test case with these two problems considered together.
Change-Id: Ib2745d7e067056ff4ca8bfaf6cff492d0dacb73a
story: #2007860
This change adds support for tagging ports on creation
Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com>
Change-Id: I3148a568664588eb2f529138f984859570c0fca1
Related-Bug: #1815933
For a server booted from a volume, nova API does not store an image_id
and instead returns an empty string. Currently, openstackclient
similarly shows an empty string for Image Name and Image ID for servers
booted from volumes.
To aid CLI users in understanding the meaning of no image_id, we can
display the string "N/A (booted from volume)" in the image field if the
server was booted from a volume.
Change-Id: I9c62cf6fe23b2e934dcbf5ebbf706b2705d2e424
Keystone let's users remove role assignments that reference non-existent
users and groups. This is nice when keystone backs to an identity store
like LDAP and users or groups are removed.
Previously, openstackclient would validate the user and group existed in
keystone before sending the request to delete the role assignment. This
commit updates the code to bypass that validation so that users can use
IDs to forcibly cleanup role assignments.
Change-Id: I102b41677736bbe37a82abaa3c5b3e1faf2475d5
Story: 2006635
Task: 36848
Added port NUMA affinity policy parameter to "port create",
"port set" and "port unset" commands.
Change-Id: I48cacab275856af2911829f9b7176bb87fd039b3
Related-Bug: #1886798
The file test_examples.py has never worked since its written and and cli in
the example directory are covered by other functional tests for container,
flavor and object lists and they have better asserts. So, deleting the file
Change-Id: Ib9af40da96e66354fe878e79a80048a58f8dd6fe
The patch https://review.opendev.org/#/c/673389/ introduced a regression
by changing the osc-lib interface.
Two conflicting attempts to fix the regression were launched:
1) Reverting the patch.
2) The patch https://review.opendev.org/683119 changes the exception
from the generic CommandError back to a specific Forbidden exception.
The patch https://review.opendev.org/683118 catches this exception
and passes on, i.e. re-implements the same behavior as before.
The first idea was implemented, the initial patch reverted. The second
idea was partially implemented. The change in python-openstackclient
(683118) was merged. The change in osc-lib was approved but failed to
merge because the initial change had been reverted.
Now we have again a situation where the exception produced in osc-lib
does not match the exception expected by the caller.
It is unclear if the osc-lib interface will ever get a rebased version
of https://review.opendev.org/683119 merged, so the safest way to
address the issue is to also catch the exception that used to be
thrown before the inital change and is again thrown after the inital
change has been reverted.
Change-Id: I2ea2def607ec5be112e42d53a1e660fef0cdd69c
Despite what the help text for this options says, the nova API only
accepts boolean values for this value and has done so since at least the
introduction of the 2.1 microversioned API. While it would be nice to
convert '--config-drive' to a boolean flag, we'd need to be able to
retain temporary support for people passing arguments. 'nargs=?' [1]
looks promising but it has an annoying tendency to swallow a positional
argument following it [2]. Since that is not an option, we have to live
with a new config option, '--use-config-drive' and a '--no-config-drive'
counterpart.
[1] https://docs.python.org/3/library/argparse.html#nargs
[2] https://bugs.python.org/issue9338
Change-Id: If9cce0ad4094cc9cef1c9136b80c3b0f35a82c7a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: #2005468
Task: #30547
I was writing some additional functionality and noticed these tests were
missing. This commit adds tests for adding and removing system role
assignments for users and groups.
Change-Id: I30fdc6ec55e1eb1cfa55f4cbf92c3f001d89865f
stevedore will cache the entrypoint scan when needed. Since we
just installed the things here, do an openstack --help to cause
the entrypoints to get scanned at build time and for the cache
file to be written into the container image.
Change-Id: I73502be6d68c4a38561c9524b4def3c6a6f61ac6
Importing pkg_resources scans every installed distribution to find
all of the entry points. Stevedore is adding a new caching layer using
importlib.metadata, which will not. Switching to the stevedore should
eventually speed up load times, especially for command line apps. This
change makes the switch now to ensure API compatibility.
We were already using stevedore for tests, so this moves the dependency
from test-requirements.txt to requirements.txt and raises the minimum
version to something more recent.
Change-Id: I3e3632783bc745979b6db73e610df8a77ffaceb0
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
They work just fine in Volume API v3 but they were limited in OSC
to v2.
Change-Id: I510383f8e0cbf05ec24caa1cad330f12f82a913d
Story: 2007896
Task: 40279