255 Commits

Author SHA1 Message Date
Jenkins
eea2512ec8 Merge "Enhance descriptions for get and clear password" 2016-05-12 09:38:43 +00:00
xiexs
dceb77ff44 Clean the duplicated columns for "nova network-list"
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
2016-04-29 05:53:02 +08:00
ZhiQiang Fan
c22cbb6fac [Trivial] change some functions in novaclient/utils.py to public
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
2016-04-27 20:13:45 +08:00
jichenjc
4b4573ef9d Enhance descriptions for get and clear password
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
2016-04-26 12:41:20 +08:00
Jenkins
3bed5446d7 Merge "Use common find_server from v2.shell" 2016-04-26 00:48:31 +00:00
xiexs
2b9310eaed Add a note message for reboot
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
2016-04-23 20:29:48 -04:00
Andrey Kurilin
fd23ff9000 Use common find_server from v2.shell
- 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
2016-04-14 12:05:57 +03:00
Matt Riedemann
a602e59806 Deprecate image list/show/delete/update CLIs/APIs
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
2016-04-12 11:57:57 -04:00
Jenkins
85eb9f7236 Merge "Fix typos in docstrings and comments" 2016-04-07 13:18:42 +00:00
Jenkins
c1f975f4ff Merge "Remove busted baremetal CLIs and API bindings" 2016-04-06 12:49:57 +00:00
Jenkins
96e4449f44 Merge "Switch to 2.1 default api_version in v2.Client" 2016-04-06 12:22:32 +00:00
Dao Cong Tien
a967e40185 Fix typos in docstrings and comments
Change-Id: Ib94c2b999f8295ec526d4e44883b86ab8b5a0688
2016-04-06 09:36:28 +07:00
Matt Riedemann
0634a38cdc Remove busted baremetal CLIs and API bindings
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
2016-04-05 17:32:20 -04:00
Jenkins
9d9cb2a0aa Merge "Fix ServerGroup.NAME_ATTR" 2016-04-05 10:50:09 +00:00
Jenkins
0193797fcf Merge "Remove deprecated volume(snapshot) commands/bindings" 2016-04-04 17:30:08 +00:00
Jenkins
4435207af2 Merge "Using glance 'image-list'/'image-show' in boot help message" 2016-04-04 12:10:19 +00:00
Matt Riedemann
a425702689 Remove deprecated volume(snapshot) commands/bindings
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
2016-04-03 14:05:05 -04:00
Andrey Kurilin
b9807c0648 Switch to 2.1 default api_version in v2.Client
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
2016-04-01 19:25:44 +03:00
Rui Chen
51306fc4c9 Fix ServerGroup.NAME_ATTR
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
2016-04-01 10:02:11 +00:00
Jenkins
d9e8e364e0 Merge "Fix host-evacuate-live for 2.25 microversion" 2016-03-29 19:52:22 +00:00
huangtianhua
31c9e399f2 Using glance 'image-list'/'image-show' in boot help message
Using glance commands instead in boot help message.

Change-Id: I0f20d24a9ab32a80bbbc524e1b5ce754aded1814
2016-03-28 17:40:19 +08:00
Jenkins
5f6d731f93 Merge "aggregate-details changed to aggregate-show" 2016-03-25 19:03:50 +00:00
Matt Riedemann
90fbbb2956 Fix host-evacuate-live for 2.25 microversion
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
2016-03-25 14:00:59 -04:00
Jenkins
abe6707d26 Merge "Wrap interface_list by proper resource class" 2016-03-21 14:22:34 +00:00
Jenkins
2d353f2879 Merge "Overwrite Usage class's get() function" 2016-03-21 14:03:12 +00:00
Jenkins
a4d2d0ce83 Merge "Add changes-since support when list servers" 2016-03-21 14:03:06 +00:00
Jenkins
b154a4828b Merge "Validate shutdown value of --block-device" 2016-03-21 13:59:48 +00:00
abhishek.talwar
bf68a0cf10 aggregate-details changed to aggregate-show
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
2016-03-21 12:44:16 +05:30
Balazs Gibizer
f6bcac4772 Validate shutdown value of --block-device
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
2016-03-16 17:51:00 +01:00
Kevin_Zheng
7cefdd36a6 Add changes-since support when list servers
Nova API supports change-since filter when list servers:
https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/servers.py#L325-L331
but in python-novaclient we don't.
This patch  add the support for change-since when list servers.

Closes-bug: #1551591

depends-on: Ic2f239f634f917a5771b0401a5073546c710c036

Change-Id: I27f2d1e33a56d357e247111b338c93861716cfee
2016-03-16 17:56:21 +08:00
Andrey Kurilin
97d63e3ecc Wrap interface_list by proper resource class
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
2016-03-09 15:02:43 +03:00
abhishek.talwar
b80d8cb6e6 nova add-secgroup help updated with secgroup id
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
2016-03-09 14:53:43 +05:30
Jenkins
17be772404 Merge "Return a less dramatic message for public flavors." 2016-03-08 01:35:48 +00:00
Matt Riedemann
d8e2f0c1a4 Make it clear that host-servers-migrate is a cold migration
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
2016-03-07 16:01:22 -05:00
Jenkins
0fc5437e5d Merge "Fix a typo in novaclient/v2/hosts.py" 2016-03-07 18:30:20 +00:00
Sven Anderson
c2ec89d285 Return a less dramatic message for public flavors.
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
2016-03-07 11:35:27 +01:00
Takashi NATSUME
0ee5aea617 Fix a typo in novaclient/v2/hosts.py
TrivialFix
Change-Id: I6992edbb768f14d0d4f0a7d79521876832e12714
2016-03-07 14:25:54 +09:00
Cao ShuFeng
3a538f6d86 Overwrite Usage class's get() function
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
2016-03-06 04:21:02 +00:00
Kevin_Zheng
16c36ce79e Use novaclient/utils directly and remove openstack/common (4/4)
We can use novaclient/utils directly and get rid
of openstack/common folder.

This is the last part.

Change-Id: I8103adafde7d8b3a101181366639314740f9a25a
Partial-Bug: #1551603
2016-03-03 09:24:48 +08:00
Kevin_Zheng
49410c06a5 Use novaclient/utils directly and remove openstack/common
We can use novaclient/utils directly and get rid
of openstack/common folder.

This is the third part.

Change-Id: I405044af3912d86da66df05413edfc724bc102d0
Partial-Bug: #1551603
2016-03-03 01:24:05 +00:00
Kevin_Zheng
a787d33eb1 Use novaclient/utils directly and remove openstack/common (2/4)
We can use novaclient/utils directly and get rid
of openstack/common folder.

This is the second part.

Change-Id: I12b03aa0a13c95ae949adf7e876c675ce309bae5
Partial-Bug: #1551603
2016-03-03 01:23:46 +00:00
Kevin_Zheng
93913c84b6 Use novaclient/utils directly and remove openstack/common (1/4)
We can use novaclient/utils directly and get rid
of openstack/common folder.

This is the first part.

Change-Id: Iaec234fbcf4d0f8c7e8f2175eae11d3083a62090
Partial-Bug: #1551603
2016-03-03 01:23:34 +00:00
Jenkins
f9360ae6d4 Merge "Provide user with coherent interface to get request_ids" 2016-03-02 13:05:05 +00:00
Jenkins
d56c95de40 Merge "[microversion] Bump to 2.25" 2016-03-02 12:15:34 +00:00
Eli Qiao
ae598280ac [microversion] Bump to 2.25
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
2016-03-02 17:24:17 +08:00
Jenkins
f30f41f13d Merge "Use isinstance instead of type" 2016-03-02 07:57:02 +00:00
Andrea Rosa
77e50cc91b Support for abort an ongoing live migration
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
2016-03-01 13:43:33 +00:00
ShaoHe Feng
e0c7d2c673 Add two server-migration commands and bump migration-list command
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
2016-03-01 12:27:54 +00:00
Cao ShuFeng
5c1acb91f7 Use isinstance instead of type
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
2016-02-28 14:51:51 +08:00
Jenkins
66b4085c9e Merge "Adds missing internationalization for help message" 2016-02-27 01:07:51 +00:00