2292 Commits

Author SHA1 Message Date
jichenjc
6b0fe2a424 Allow command line for virtual-interface-list
There is virtual-interface-list API support in nova but no
command line interface in novaclient, this patch adds it.

Closes-Bug: 1522424

Change-Id: Ib3078125beb7beaa08a3408486db54e0d10763e6
2015-12-17 12:41:43 +00:00
Jenkins
06af0bf79b Merge "Fix repr of a host from a hosts.list()" 2015-12-04 19:55:33 +00:00
Jenkins
713b6f12e8 Merge "[microversions] Increase max version to 2.9" 2015-12-04 13:10:07 +00:00
Jenkins
0718f1a252 Merge "[microversions] Add support for 2.8" 2015-12-04 12:59:12 +00:00
Jenkins
f02ca48a4e Merge "Fix H404/405 violations in client.py,base.py,api_version.py" 2015-12-03 17:51:58 +00:00
Jenkins
d1fed78d09 Merge "Remove novaclient.v1_1 module" 2015-12-03 17:02:08 +00:00
Andrey Kurilin
0a535e3287 [microversions] Increase max version to 2.9
2.9 - Add a new locked attribute to the detailed view of servers. locked
will be true if anyone is currently holding a lock on the server, false
otherwise.

This microversion doesn't require any change in novaclient's code.
Just added functional tests and changed version

Change-Id: I7f33757e6f03f172e5a13ade0aa5e8d3a10dbf01
2015-12-03 10:10:21 +00:00
Andrey Kurilin
9fe53065ef [microversions] Add support for 2.8
2.8 - Add new protocol for VM console (mks)

Also, this patch removes code duplication and fixes docstrings for consoles
methods.

Co-Authored-By: jichenjc <jichenjc@cn.ibm.com>

Change-Id: Ic24183a5118872581b30f82734fa9d6ce0e53544
2015-12-03 12:09:56 +02:00
Ghanshyam
aa73df2649 Fix H404/405 violations in client.py,base.py,api_version.py
There is a lot of H404/405 violations in novaclient, and it is better
to fix those to have a better doc string for class/methods.

This patch fixes these violations for below files-
-api_versions.py
-base.py
-client.py

As there are lot of violations and cannot be fixed in single patches,
So separating those in multiple patches for easy review.

Change-Id: I30a714fc3b0b317f7ffa4a99fbb224b4d5f5477b
Partial-Bug: #1521899
2015-12-03 11:45:22 +09:00
Jenkins
51df01e972 Merge "Remove python 2.6 support from python-novaclient" 2015-12-02 20:43:32 +00:00
Jenkins
520ffae282 Merge "Optimize "open" method with context manager" 2015-12-02 20:42:54 +00:00
Jenkins
3aa9b5aa76 Merge "[microversions] Increase max version to 2.7" 2015-12-02 18:56:09 +00:00
Jenkins
247f1883f9 Merge "Print current nova default nova API microversion" 2015-12-02 15:45:54 +00:00
Jenkins
ee2db5f173 Merge "Not transform to str on potential unicode fields" 2015-12-02 15:45:18 +00:00
OpenStack Proposal Bot
9314c89dde Updated from global requirements
Change-Id: I617a357f6b09d39a702f7478e641d240413c7943
2015-12-01 06:10:06 +00:00
Jenkins
f1b8a717d4 Merge "force releasenotes warnings to be treated as errors" 2015-12-01 00:52:37 +00:00
Chuck Carmack
81f8fa655c Remove python 2.6 support from python-novaclient
Since oslo is removing support for python 2.6, nova
needs to also remove support from clients and libraries.
This commit is to remove support from python-novaclient.

-- Python 2.6 compatibilty code was removed.
-- Python 2.6 was removed as a tox environment, install venv,
and from the classifiers in setup.cfg.
-- Release notes have been updated.

UpgradeImpact

Co-Authored-By: Andrey Kurilin <andr.kurilin@gmail.com>

Change-Id: I3f587ff38d478d075af5fd014e2b4b8416e185d4
Closes-bug: 1518390
2015-11-30 16:04:24 +00:00
Andrey Kurilin
7a9d4e58bf [microversions] Increase max version to 2.7
2.7 - Check the is_public attribute of a flavor before adding tenant
access to it. Reject the request with HTTPConflict error.

Since novaclient already have Conflict expection, there is no required
changes on client side.

Change-Id: I48dca20b3795185363367bac0e2ee65ce938593f
2015-11-30 15:30:04 +02:00
xiexs
6036114aa4 Optimize "open" method with context manager
Use opening context manager to open a file.

Change-Id: I50e4f2df54737e1ea5b4c7fbe8639f1cd981a627
2015-11-29 00:59:25 +08:00
Sylvain Bauza
bb7956bfaa force releasenotes warnings to be treated as errors
Per http://lists.openstack.org/pipermail/openstack-dev/2015-November/080521.html,
we need to make sure that there are no warnings for reno.

Change-Id: I899d223f5347633a17ac5c7fb3991a3cd1f4c781
2015-11-28 00:57:58 +01:00
OpenStack Proposal Bot
245624541a Updated from global requirements
Change-Id: I5d9a308a020f8e99837c4f0a29b87e2542b2cffe
2015-11-27 22:42:13 +00:00
Jenkins
d12d6f90cd Merge "Check response headers for microversions" 2015-11-25 12:53:49 +00:00
melanie witt
c3dda7636c Fix repr of a host from a hosts.list()
The os-hosts API uses different attribute names depending on
whether the host was returned as part of a list or not.
A host returned from 'show host' has the attribute "host"
whereas a host returned from 'list hosts' has the attribute
"host_name".

This adds a host_name property to the Host class that will set the
"host" attribute if necessary. Although this doesn't exactly mirror
the responses coming back from nova api, it will make it easier for
users to use the objects interchangeably for hosts.list() operations
and hosts.update() operations, for example.

Co-Authored-By: Chung Chih, Hung <lyan.h@inwinstack.com>

Closes-Bug: #1434167

Change-Id: I5c339bdd1ab867d972759ade9a10b86bfda1e70a
2015-11-25 07:58:38 +00:00
OpenStack Proposal Bot
fadfbea7de Updated from global requirements
Change-Id: I2b15450f0ce8b074fef50ed1dc61915fd9ed081f
2015-11-24 14:45:58 +00:00
Sylvain Bauza
3e8cee01d5 Add reno for release notes management
Since reno is the new tool for Relnotes, we need to add it
to novaclient  and provide some Sphinx docs for Liberty and Mitaka.

Change-Id: Ie42642a0e0037311cfa14cd8bf6b7041b62a4675
2015-11-23 21:03:34 +01:00
Andrey Kurilin
4393d90524 Check response headers for microversions
novaclient provides version negotiation on CLI layer. In case of usage
novaclient as a lib, user can specify api_version with microversion part
and can try communicate with Nova endpoint which doesn't support
microversions. Nova endpoint will not check X-OpenStack-Nova-API-Version
header and will execute request(it can be correct or not). It this case
we should warn user about his mistake and about "incorrect" response.

Change-Id: I7a5ab964b7b2b2a49cc80c22bf67ad5548afb30b
2015-11-23 20:13:13 +02:00
jichenjc
8b8edc72e0 Not transform to str on potential unicode fields
some fields such as instance.display_name can be unicode,
nova client should not translate it to 'str'. otherwise
it will report UnicodeEncodeError.

Change-Id: I4f6011105b3b11dbbcb23f3a7c1bbcf7f20bcc8c
Closes-Bug: 1518141
2015-11-22 04:34:07 +08:00
OpenStack Proposal Bot
6c3df9d141 Updated from global requirements
Change-Id: Iea54d70a609dfd263ff9a3ad0c92cbf8c7fc4b88
2015-11-21 16:22:56 +00:00
jichenjc
608aa525f1 Print current nova default nova API microversion
nova client only print server side min and max version, but not print
client side min and max version.

Change-Id: Ic48d7eff3ae84bf7897e97a2eff1302a7c64bc2a
Closes-Bug: 1517870
2015-11-21 21:23:22 +08:00
Jenkins
cafba0c61e Merge "improve readme contents" 2015-11-20 14:58:08 +00:00
Jenkins
62b1379cf8 Merge "Fix typo in error message" 2015-11-19 13:25:52 +00:00
Jenkins
dada6cc91d Merge "Added command for device to cinder volume mapping" 2015-11-19 13:25:49 +00:00
Jenkins
33285761aa Merge "Remove --tenant suggestion for flavor-access-list" 2015-11-19 13:25:43 +00:00
Jenkins
55ae89fb70 Merge "Add sort_dir/key to flavor list" 2015-11-19 12:44:57 +00:00
Jenkins
bc54eaa0b1 Merge "Add pagination params for flavor list" 2015-11-19 12:44:23 +00:00
ricolin
18ea9dca18 improve readme contents
Add more information in README.rst

Change-Id: I290c0871e3ba665f4c066a3d34cc2214455d68fa
2015-11-19 16:21:14 +08:00
OpenStack Proposal Bot
ad54d38cb9 Updated from global requirements
Change-Id: I6258b3a4aa6b395f6756b94a71d323447a84e9c0
2015-11-18 20:51:47 +00:00
Davanum Srinivas
ee714bfc50 Last sync from oslo-incubator
oslo-incubator will cease to host common code soon. This is
hopefully the very last sync from oslo-incubator.

Changes:

7f37bf8 Correct a typo
f4b09ce Sort keys in table output in print_dict
0753799 Allow specifying a table header for the value column in...

Change-Id: I7eb71518e3c9c0c51b08188fa83298dd9eac93dc
2015-11-17 22:49:46 +00:00
Vincent Untz
7d800a9e65 Fix typo in error message
Change-Id: I9ff3babd0460c41e05f18b34c3b46032edbf1459
2015-11-17 07:19:25 +01:00
Jenkins
e88df234da Merge "Check flavor option before image checks" 2015-11-12 17:01:59 +00:00
Jenkins
fd13e89c46 Merge "Functional tests for os-extended-server-attributes" 2015-11-12 17:00:09 +00:00
Jenkins
903538ee59 Merge "Refactor parsing metadata to a common function" 2015-11-11 11:00:45 +00:00
Sujitha
6a18757509 Added command for device to cinder volume mapping
Added new sub command volume-attachments which displays the list
of volumes attached to a server.

Change-Id: I1f56a6fa18c35f3df2bdd11b9cf83bd5c5d9e182
Closes-Bug: #1116593
2015-11-10 22:43:11 +00:00
Jenkins
e77d770bd9 Merge "Add v2 support for optional project_id in version discovery urls" 2015-11-09 18:08:36 +00:00
Anna Babich
e9268e9864 Functional tests for os-extended-server-attributes
The added tests check basic set of extended server attributes
and additional attributes exposed by microversion 2.3

To avoid leak resources, cleanup part has been refactored

Change-Id: I0c8f096134838b90e17720f2a28e649998a02e3b
2015-11-09 16:47:45 +02:00
jichenjc
2b21449311 Remove --tenant suggestion for flavor-access-list
when help flavor-access-list, nova client tells user to
try --tenant while try with it , nova client tells user
it's not implemented. We should avoid this kind of suggestion.

Change-Id: Ia35f9d35d6c4855122385de2a5cc013fcba1f126
Closes-Bug: 1515978
2015-11-07 00:58:47 +08:00
Jenkins
fc2f4abf6c Merge "make project_id optional in urls for version discovery" 2015-11-05 03:40:15 +00:00
Augustina Ragwitz
5f5ec354be Add v2 support for optional project_id in version discovery urls
This is part of the work to allow Nova and Novaclient to handle endpoints both
with and without project id's. v2 version information returns a different data
structure than later versions. This patch updates the mock tests to return a
different data structure corresponding to v2 or v2.x depending on the
endpoint_type. A caller using the mock test class can set the attribute
endpoint_type to a version number, and the method get_endpoint, will return the
appropriate data structure. This is more of a workaround given the current state
of mocking Nova api calls in our unit tests.

Part of bp:service-catalog-tng

Change-Id: I61984ee592f7a5d7f1a91c9e2ff3038c0245f797
2015-11-04 18:09:14 -08:00
Matt Riedemann
f7e2129f88 Remove novaclient.v1_1 module
This reverts commit 036d42d7087a3c83a5feec0ad0a4c6af35df72c9

Once novaclient 2.34 is released we can merge this and
release as 3.0.0. The dependency is on the 2.34 release
request.

Change-Id: I1e3a8a8079b954fe60371c2d38ec23a10727c408
Depends-On: I4fc044e518a5cc5ea7b309a2824984a7035945bd
2015-10-29 14:04:45 +00:00
Jenkins
bba1d6ece4 Merge "Revert "Remove novaclient.v1_1 module"" 2015-10-29 05:04:59 +00:00