Add missing command list documentation for the 'security group'
and 'security group rule' commands. In addition, update the
command description and argument help to fix minor issues and
use consistent terminology.
Change-Id: I9f4a3fbac5637289f19511874e16391d3fe27132
Current "openstack server resume" command could only resume one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.
Change-Id: I726eb86bfa3df3a9911f45770e6641264dbc1e0b
Implements: blueprint cmd-with-multi-servers
Current "openstack server suspend" command could only suspend one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.
Change-Id: Ic0417ee28f46c9198a35744c0180342e61966b26
Implements: blueprint cmd-with-multi-servers
Remove the 'project usage list' command that was deprecated in version
1.0.2 in review Ie08d4f88d71a660fca1862405351109cd0aa86b6.
Note that the removed command class is a good example of how to wrap a
command and show a deprecation message.
Change-Id: I6c750730963615895f5d9953487d2d5a905885a8
"nova list" will also output "Task State" and "Power State" by default.
This patch improves "server list" command to have the same columns, but
not by default. These two columns will be output if --long is added.
The power state is an int, so also adds a formatter helper function
to translate it to human readable string, just as "Networks" does.
Change-Id: I0530a910bec03835839a5ba7687c66d5643338f3
Current "openstack server unlock" command could only unlock one server.
Improve it to be able to handle more than one servers. Also improve the
doc to reflect the new feature.
Change-Id: Ibf57b2021a504da950a491d63139a438087aed0b
Implements: blueprint cmd-with-multi-servers
Current "openstack server lock" command could only lock one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.
Change-Id: Ifcf103b1c32e6c547ac09f688b887b1c03f92b09
Implements: blueprint cmd-with-multi-servers
Current "openstack server unpause" command could only unpause one server.
Improve it to be able to handle more than one servers. Also improve the
doc to reflect the new feature.
Change-Id: I069ebdd6dcd121f6e55c2bf40d42197f93830e0c
Implements: blueprint cmd-with-multi-servers
The behaviors are inconsistent while different
negative line numbers specified.
Change-Id: I2573f3e789f5603c896758971830ffc0b94c5e2b
Closes-Bug: #1512263
Current "openstack server pause" command could only pause one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.
Change-Id: I809f77f0720457c9cdc1028a70b391c75885984c
Implements: blueprint cmd-with-multi-servers
When there is no resouce usage associated with the project,
an odd output will be displayed.
This patch tried to fix this issue.
Change-Id: I6f254c6ba37fbb760ada08e640c4938668d560dc
Closes-Bug: #1512220
It is a general rule that we don't use plural form for the name of
command arguments. But class DeleteServer() is still using "servers".
So use "server instead".
Change-Id: I2d76de14ec34b88547b9f728b41e9bd93b2a22c5
Missing 'marker' and 'limit' params for `openstack flavor list` shell
command. It would be nice to have this when there are many flavors.
Closes-bug: #1505874
Change-Id: I088ac5d24f0d7595f5cbce14f063e296a449eb26
This change adds 'compute service delete <service>' to the openstack
client. This is the equivalent of 'nova service-delete <id>'
Change-Id: I69ef1cac72cbe125c2114f8e958e22350a70f367
Closes-Bug: #1503510
This change adds the ID to the compute service list command so that the
ID can be leveraged by scripts trying to remove or update a specific
service.
Change-Id: I446b4c0071988133195eb2382313b3918b7ffa72
Closes-Bug: #1503430
novaclien v2.26.0 includes `discover_extensions` method, which returns
list of all nova extensions based of version. Such method allows us to
reduce imports of novaclient's modules and construct novaclient instance
simpler.
Change-Id: Idbe3ed275fb4a7e3918b11669dcfad47b8de4fb9
`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
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
If there is an error finding an image or a flavor during
image show, ignore it and just print the id of the flavor
or image. This code is also used during server create and
server rebuild, but only to display the results.
Change-Id: I5362158ab8ffc3e5a0800904d6ea15420c3a8627
Closes-bug: #1489901
When using openstack flavor unset, the --property is needed,
so the --property should be a required parameter.
Close-Bug: #1474237
Change-Id: Id6913e1b263eddeb5dd44c3edb957206b68f816c
Setting default versions in parsed args makes it so OCC
cannot tell if the argument was parsed, an environment
variable was set or it is just defaulted. In order to
set api versions from OCC, it will have to be defaulted
after processing OCC.
Closes-Bug: #1453229
Change-Id: I4d065919397b783f3bdd4022c986c0234a7a16e6
There seem to be three formats for the server address field
and the old code only supported the old format. This code adds
a parser for all three formats.
Change-Id: I7f12d2c69ff70556907ea6f31a0e0bba91b68b49
Closes-Bug: #1469843
User should be able to specify the endpoint type through
a CLI optional argument/ENV variable setting. We will name this new
optional argument: --os-endpoint-type (Env: OS_ENDPOINT_TYPE) and
based on the value given, the service API will use that specific
endpoint type. Possible values: public, admin, internal.
DocImpact
Closes-Bug: #1454392
Change-Id: Ife3d4e46b44c0ddcd712b1130e27e362545a9a29