Make the Image v2 image set command meet at the intersection of the v1
image set command and the v2 image create command:
* Add visibility to the deadopts list and remove the option
* Put the options in the same order as v1 image set
* Make the help text match
* Add --properties
* Move the additional options that do not appear in either v1 image set or
v2 image create after --property as they are really pre-defined properties
* Add tests for v2 image set to match v1 and then some
* Put the SetImage class in v2/image.py in alphabetical order
Change-Id: I102b914e8ad09a014f6fdd846c5766b6c2eaadb8
Currently `image set` uses the new api, where other parts of osc the old
api is used. This deprecates the v2 api in favour of the v1 to maintain
the same commands across osc. However the functionality now remains
there as people could now be using this functionality.
This also adds the --unprotected argument, as in the previous version if
--protected was not supplied it would just make the argument
--unprotected without the users explicit consent.
The patch also fixes the documentation for image set as it was outdated.
Change-Id: I990d20332c80165102badef7ac94ddbeb7824950
Closes-Bug: 1498092
This currently breaks listing images with --long. Tags are an
array and shouldn't be formatted as a dictionary.
Change-Id: I6d1d85351b58ae4824498774673ebdc8eaa7e420
Closes-Bug: #1498150
Currently, these properties are each top level keys, they should
all be under a single 'properties' field. Secondly, the tags are
kept as an array, but can be shown as a comma separated string.
Change-Id: Ic769c657a86e768fee38acc40434c377de70a7bc
We have it for v1, but v2 is the future. There are two differences,
things in v2 do not go into a properties dict, and the actual image
data needs to get uploaded as a second step.
Closes-Bug: 1405562
Co-Authored-By: Niall Bunting <niall.bunting@hp.com>
Co-Authored-By: Sean Perry <sean.perry@hp.com>
Change-Id: If7b81c4a6746c8a1eb0302c96e045fb0f457d67b
the docs and code had inconsistencies with how it
references other arguments, lets just remove the
backticks from around them.
Change-Id: I43d17b07364e45387c6b9d86c2aca26eeea8ed93
devstack now defaults to image api v2, but osc does not support
v2 image create. set the functional tests to use v1 for now
to unwedge the gate.
Closes-Bug: #1496337
Change-Id: Ia02ed761446b8de52c932a424b9c423691ebcceb
`novaclient.client.Client` is a recommended entry point for novaclient.
It supports backward-compatibility and allows Nova-folks to change
interfaces of inner versioned clients classes.
Change-Id: Iaf20714f63c307f88a451759f041ca509fbcf6f8
Add a new option to search by user when listing servers,
include support for domain scoped users, also update
docs
Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>
Closes-Bug: #1483974
Change-Id: Ifdade6dc9ca8400fbd85f6b55793ab15ed17b97d
Added project and project-domain option to server list
command for listing servers based on project name or id
Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>
Change-Id: Iaadfffe734ad8a72fa4b1eeb2222748c66f7fae0
Closes-Bug: #1488486
Listing users within a group is not presently domain scoped. We
do not use the domain info at all when the group option is present.
A new --group-domain option is not needed since we cannot list
users by --project and --group, they are mutually exclusive (as
per the identity API).
Closes-Bug: 1492916
Change-Id: I50f995ee4a03c2bdb21f2b5722546ab8fe786eb6
novaclient 2.27.0 introduced the API microversion discovery and client.Client
now wants an api_version argument to properly work out the correct API
version in use. OSC needs to provide this when required.
Letting the compute client plugin do the version validity checking makes more
sense than encoding it into shell.py, so I've added a new OSC plugin interface
function check_api_version() that is called from shell.py if it exists. If it
either does not exist or it returns False the previous version checking using
API_VERSIONS is still performed.
compute.client.check_api_version() conditionally imports the new
novaclient.api_versions module and uses it if successful. Otherwise
check_api_version() returns False and the previous code path is resumed.
One side-effect of this is that it is now valid to use --os-compute-api-version
with any valid microversion supported by the installed python-novaclient.
Closes-Bug: #1492467
Change-Id: I4535b38a5639a03a9597bf83f6394f9bb45c2b9e
The Compute API requires 'from_port' and 'to_port' to be -1 for
ICMP security group rules. It happily accepts them empty or None
but the resulting rules do not work. So we force the values for
ICMP rules.
Closes-bug: #1477629
Change-Id: Iba57211014caca16be7c9a28d15d4db2a6c51b8d
Instead of duplicating the same log statement throughout
the code, the same logic can be provided by a shared decorator
that abstracts away the logging capability and unifies it behind
a common function instead.
Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79