If we specify --fields with default columns name, then there will
be an additional column which is absolutely redundant, we need to
check for such case.
Also do the same for "nova list"
Co-Authored-By: ZhiQiang Fan <aji.zqfan@gmail.com>
Change-Id: Ife0a62d2d77aee261ce39c30d3a89ba97a253dae
Closes-Bug: #1574424
There are some functions in novaclient/utils.py which have name with
prefix `_`, in Python, this means it is a private function which
should be only used in its own module. However, these functions are
used in other modules such as novaclient/v2/shell.py.
This patch removes the prefix _ for these functions.
Change-Id: I7bc8a76fd390a7dd30eecbb5c7e641b6ccfb40c0
per http://paste.openstack.org/show/495955/
it shows nova get-password and clear-password is calling
'os-server-password' and in turn operate on metadata server
instead of the operating systme itself, the existing wording
lead to confusion in nova client description.
Change-Id: If69622c181ad3259855d45cb21909e5b7de53615
Currently nova reboot only performs a hard-reboot to
baremetal nodes as ironic doesn't support the soft-reboot
yet. And as absence of this information, end user has to try
to excute this command firstly and then probably realize
the difference between the baremetal nodes and ordinary
VM instance about this command:
* For VM instance
nova reboot : perform a soft reboot by default.
nova reboot --hard: perform a hard reboot.
* For baremetal node
nova reboot : perform a hard reboot by default.
nova reboot --hard: perform a hard reboot as well.
For more user-friendly, we'd better add some notes into
the help message explicitly.
Change-Id: I7b3f6da4b5f8a514c6d923f3546470d9de459003
Partial-Bug: #1485416
- extend v2.shell._find_server with raise_if_notfound param
- reuse v2.shell._find_server for instance_action extension
- fix instance-action-list on v2.21 (it was unable to work
with deleted instances)
Change-Id: I7b538124c6ab0ee00164822b324aaf2d37c8c2af
This deprecates all of the image CLIs/python API bindings that use
the Nova os-images API which is a proxy to the Glance v1 API.
This will emit a warning each time a deprecated CLI/API is used and also
updates the help docs for the deprecated CLIs and docstrings for APIs.
The plan is to do a release once this is merged so people start seeing
it and then we'll actually remove the deprecated CLIs/APIs in the first
python-novaclient release after the Nova server 15.0.0 'O' release.
Depends-On: Iff5fb3180855de7adb3399f6be16bedc8543b4ec
Change-Id: I3f60cc7f4c6e27861c4a84b925d573f35f1a1848
The os-baremetal-nodes compute API does not proxy
baremetal node create/delete or interface add/remove
requests to Ironic, so there is no point in even
having CLIs or python bindings for these operations
in the client.
There isn't a point in deprecating these since they
are already unusable, so let's just remove them.
Change-Id: Id5dd7fbddff87e506460904e352713ae777a8073
Closes-Bug: #1566535
23f13437dd64496fcbc138bbaa9b0ac615a3cf23 deprecated the
purely volume or volume-snapshot related CLIs and python
API bindings during Kilo. python-cinderclient should be
used for the python API bindings now, and python-openstackclient
should be used for the CLI for those operations.
The alternate_service_type context manager is also removed
since it was only used for proxying through to the volume API
endpoint.
Since the proxy for creating volumes is removed, we have to
add python-cinderclient for testing the volume attachment
CLIs/APIs that are left intact.
Change-Id: I09a6501603667350f49b1b1fa130353a6d5272a2
Direct initialization of versioned clients is restricted, but we tries to
decrease the number of possible bugs and issues, so default value for
api_version was added to v2.Client .
Let's set it to 2.1, since 2.0 is too old API version.
Change-Id: If127f858f7f670a090a57267f46a69ea4c056cce
Finding by specify server group name failed in ServerGroupsManager.find(),
ServerGroup.NAME_ATTR is "server_group_name" currently, but NAME_ATTR
should be "name", because only "name" attribute exists in ServerGroup
object, not "server_group_name".
Change-Id: Id6b7676d14e6283d856a069da5ff287dc3228386
Closes-Bug: #1563301
Change I01b22593724616bc0a7793c509ecabf095d6927d made the
live_migrate() method in the ServerManager conditional on the
API version requested. This broke the host-evacuate-live
command which is calling ServerManager.live_migrate() directly
with one too many arguments for the v2.25 version of the method.
This updates the host-evacuate-live shell to behave like the
live-migration method and be aware of the API version when
calling the live_migrate() method.
Related to blueprint making-live-migration-api-friendly
Change-Id: I4dbeb6ebe03f03799b706be2d787d21484b5c664
Closes-Bug: #1561938
To show details of aggregate, we have
aggregate-details command. But all other
commands to show details of any resource
is *-show like flavor-show, keypair-show etc.
So changed the command to aggregate-show.
Change-Id: If4875833a27382a6f3193ec55d6d4cb1852249fd
Closes-Bug: #1552646
The shutdown value of the --block-device parameter was stated to
to be either 'remove' or 'preserve' but the code only coverted
everything to False that was not equal to 'remove'.
This patch adds strict validation that rejects values other than
'remove' or 'preserve'.
Closes-bug: #1558157
Change-Id: I89a6c4fe90ec4d8155f4a7b93006d1972654a223
Server resource is not the right one to represent data for interfaces.
This patch adds new resource class NetworkInterface for this task.
Change-Id: I02cfe520643522006333f6e1e80e029959af6e1c
Closes-Bug: #1554907
As per nova add-secgroup help,
the user need to enter secgroup
name's to add it to a server.
But as the command works fine
with secgroup id too, so updated
the help.
Change-Id: If13dd619808b7ff87c214f17ef71296166d870ab
Closes-Bug: #1554930
Let's be clear in the help text that host-servers-migrate is
a cold migration since we have similar sounding commands
host-evacuate and host-evacuate-live (which is not actually
evacuate, it's live migration).
Change-Id: I17ee230fc1c29369c40492523c9d97d25f7ee023
Getting the access list of a public flavor bails out with a dramatic
error message, suggesting that something is broken. This changes the
message to an unagitated "Access list not available for public
flavors."
Change-Id: I432496c24b23de8fa58de93f2cbed8bed1d540b1
base.Resource's get function will call its manager's get() function
with one parameter. However UsageManager's get function takes three
parameters.
Change-Id: I958a55c4d52cec4d1177371b788b3cf788098a6c
Closes-bug: 1552616
We can use novaclient/utils directly and get rid
of openstack/common folder.
This is the last part.
Change-Id: I8103adafde7d8b3a101181366639314740f9a25a
Partial-Bug: #1551603
We can use novaclient/utils directly and get rid
of openstack/common folder.
This is the third part.
Change-Id: I405044af3912d86da66df05413edfc724bc102d0
Partial-Bug: #1551603
We can use novaclient/utils directly and get rid
of openstack/common folder.
This is the second part.
Change-Id: I12b03aa0a13c95ae949adf7e876c675ce309bae5
Partial-Bug: #1551603
We can use novaclient/utils directly and get rid
of openstack/common folder.
This is the first part.
Change-Id: Iaec234fbcf4d0f8c7e8f2175eae11d3083a62090
Partial-Bug: #1551603
microversion v2.25 will change parameter of os-migrateLive, this patch
adds supports to that changes.
os-migrateLive will abandon disk_over_commit and the default value of
block_migration will be set to `auto`
Depends-on: Ibb0d50f0f7444028ef9d0c294aea41edf0024b31
Implements: blueprint making-live-migration-api-friendly
Change-Id: I01b22593724616bc0a7793c509ecabf095d6927d
In Nova API microversion 2.24 there is a new operation which allows to
abort a running live migration.
This change is to enable this feature at the client side implementing a
new method to call the new nova API:
nova live-migration-abort <server_id> <migration_id>
Implements blueprint: abort-live-migration
Depends-On: I1ff861e54997a069894b542bd764ac3ef1b3dbb2
Change-Id: Ic2ead126e0cf48aa54a083e97cb9d1303a5a9bbd
1. Add two new commands
Add nova client server-migration-list and server-migration-show
2. Bump and old command
Add migration_type field for migration-list command
Partially implements blueprint live-migration-progress-report
Depends-On: Ia92ecbe3c99082e3a34adf4fd29041b1a95ef21e
Change-Id: I071198fa9ba0699383bdebf4fab54714a435e6c3
With the patch sets of request_ids, the *Manager classes return
'DictWithMeta' or 'ListWithMeta' rather than 'dict' or 'list'.
This change adjust conditional statements to use isinstance when
comparing variables. Isinstance supports inheritance type checking
better than type.
The effected subcommands are:
evacuate
interface-list
interface-attach
interface-detach
Change-Id: I0c1291110c1386d2ff027cb149a5aff20019e6f7
Closes-Bug: 1550870