2916 Commits

Author SHA1 Message Date
jichenjc
ca2fc77b43 Add version pin for image list function
image functions deprecated after v2.35 but we didn't pin the
version for them, so when use 2.37 by default won't work.

https://review.openstack.org/#/c/392523/ fixed others but
unfortunately list function is missing

test_readonly_nova.py was removed as it's only for 2.35 check
while through this patch, >2.35 can be used

Change-Id: Ia1157dcb68971c5f64f7ab068fc647f25cd265e4
Related-Bug: 1638506
Closes-Bug: 1650617
2016-12-12 02:21:29 +08:00
Diana Clarke
9a0484e2b8 CONF.osapi_max_limit -> CONF.api.max_limit
This max limit config option was moved to the api group in
Ida4ee57d6e1822e35e3198f6d3a89410e211d57d. Update the command line help
to reflect those changes.

Change-Id: I171940443918329b2c987b507f354d33b7e7db0c
2016-12-09 19:57:59 -05:00
gengchc2
56bb3dae5f Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable. 2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I6289f46344876d19d9a6793875f896cedc85a01c
2016-12-09 11:04:16 +08:00
Jenkins
e490688b11 Merge "Add min-disk and min-ram filters to list flavors" 2016-12-08 18:11:47 +00:00
Jenkins
9cf9db073f Merge "remove variable '_' from tests" 2016-12-08 17:53:50 +00:00
Diana Clarke
4b63110ff7 Usage missing from generated docs
Simple Tenant Usage is missing from the generated novaclient Python API
reference docs [1].

[1]
http://docs.openstack.org/developer/python-novaclient/api.html#reference

Change-Id: I7f020cb1e6f42bdb559f5ac3d79b6f96bb927eb2
2016-12-08 08:40:46 -05:00
Jenkins
c86a1eb3d7 Merge "Fix doc generation errors" 2016-12-08 12:02:32 +00:00
Pavel Kholkin
8a8540303f remove variable '_' from tests
TrivialFix

Change-Id: I9fa3b55d8d5a281b9b17becae1818e2def5b877c
2016-12-08 10:49:56 +03:00
int32bit
b7edc92d81 Add min-disk and min-ram filters to list flavors
The Nova API allows user filter flavors by minDisk and minRam,
but that is not implemented in the current novaclient yet.
This patch introduce '--min-disk' and '--min-ram' options to support
it. In addition, We also append '--sort-key' and '--sort-dir' to
the flavor-list subcommand to support sort the result list.

Change-Id: I3849cc2d73057170dc224fa86b724f5141ca9a23
Closes-Bug: #1647867
2016-12-08 03:30:06 +00:00
Jenkins
ac2beb20af Merge "Updated from global requirements" 2016-12-07 17:48:47 +00:00
Jenkins
e58188eaa4 Merge "Fix can't process the resource with name 'help'" 2016-12-07 17:48:23 +00:00
Takashi NATSUME
c1c69f6d3e Fix doc generation errors
The following files have been removed in
I09a6501603667350f49b1b1fa130353a6d5272a2.

* novaclient/v2/volume_types.py
* novaclient/v2/volume_snapshots.py

But doc/source/conf.py has not been fixed.
So fix it.
And return parameter format in novaclient/v2/hosts.py
is fixed.

Change-Id: Icd3c5aed776df291141b8c3df4d64aa234e4ed88
Closes-Bug: #1648007
2016-12-07 18:38:30 +09:00
Kevin_Zheng
a58959dd9e Check source_type and destination_type when booting with bdm provided
When booting instance with block_device_mapping provided,
in the current implementation, the "destination_type" is
allowed to be None, and this lead to un-sync between Nova
and Cinder: Nova will have a bdm in its record while the
volume is still in "available" status in cinder.

Also we should check source_type here

This patch adds a check for source_type and
destination_type, source_type shoud be within
'volume', 'image', 'snapshot' or 'blank';
When empty destination_type is provided, it
will be assigned to an default value according
to source_type, if it is provided with a wrong
value, command error will raise and information
will shown.

Change-Id: If6c7d8ed58a94d262ac6c300e75aca4cdf99ff1d
partial-bug: #1644725
2016-12-07 17:17:23 +08:00
OpenStack Proposal Bot
29c880ceb6 Updated from global requirements
Change-Id: I68b5b9cb461037a301eb1b8c698363f67e6a51aa
2016-12-07 03:16:54 +00:00
Jenkins
814329655a Merge "Revert "Microversion 2.39 - Simple tenant usage pagination"" 2016-12-07 02:57:28 +00:00
int32bit
2446755606 Fix can't process the resource with name 'help'
novaclient can't process the resource if the name is 'help',
like 'nova show help', 'nova flavor-show help', 'nova delete help',
etc. We should encourage user to use 'nova help xxxx' to show
subcommand usage, rather than 'nova xxxx help`.

Change-Id: I65204a908dc2378b6264297ddd87fcb8912a5770
Closes-Bug: #1641048
2016-12-07 10:11:11 +08:00
Gábor Antal
ce184797f0 Use more specific asserts in tests
I changed asserts with more specific assert methods.
e.g.: from assertTrue(sth == None) to assertIsNone(*) or
assertTrue(isinstance(inst, type)) to assertIsInstace(inst, type) or
assertTrue(not sth) to assertFalse(sth).

The code gets more readable, and a better description will be shown on fail.

Change-Id: I8be876e0d2a1ea5d6f8454ca973e2d874d10283d
2016-12-06 09:43:12 +01:00
Matt Riedemann
5c4d436d21 Revert "Microversion 2.39 - Simple tenant usage pagination"
This reverts commit f47393dbbfbf36616a8d28348d93e1368763b8c3.

The 2.39 microversion has not been merged in Nova, and this
change is missing a functional test to show the support added
here, which if present would have required a depends-on to the
Nova change for the 2.39 support. So this needs to come back
out until it's ready.

Change-Id: I6b6990b9a4e1e7cfea1d2aabe5f2464614440360
2016-12-02 21:05:22 +00:00
Jenkins
57c397d822 Merge "Microversion 2.39 - Simple tenant usage pagination" 2016-12-02 17:56:47 +00:00
OpenStack Proposal Bot
b76dd8528e Updated from global requirements
Change-Id: I13cc3175ff88750e8e0785fd1b01cfdeb1111410
2016-12-02 14:00:55 +00:00
Diana Clarke
f47393dbbf Microversion 2.39 - Simple tenant usage pagination
Optional parameters 'limit' and 'marker' were added to the GET
/os-simple-tenant-usage and GET os-simple-tenant-usage/{tenant_id}
endpoints.

/os-simple-tenant-usage?limit={limit}&marker={instance_uuid}
/os-simple-tenant-usage/{tenant_id}?limit={limit}&marker={instance_uuid}

Implements blueprint paginate-simple-tenant-usage
Change-Id: I9e96d31ede323f1c2aed4271a4fcab720cc9507b
2016-12-01 10:19:29 -05:00
Andrey Kurilin
f834711d2f Move all extensions from contrib dir
All extensions from novaclient.v2.contrib should be not be extensions in
case of api version >=2.0;<=3.0 (historically, they are turned on by default
for cli layer), so let's move it from contrib dir and turn on by default.

Change-Id: I4ef4e44cf970947dad33110ce658a133e4f2893e
2016-11-30 18:00:05 +00:00
Jenkins
43bbe88ac8 Merge "Show team and repo badges on README" 2016-11-30 12:35:56 +00:00
Jenkins
3e7caf719d Merge "Fix import statement order" 2016-11-30 12:35:24 +00:00
Matt Riedemann
c7162854f7 Use upper-constraints when running tox
This is basically a copy of the template used in oslo.messaging
under change 78f113780510b741bc974c69eb9b0718cd657c1d.

Change-Id: I8be883215f27abb58d15b85e8542cbdf32000bac
2016-11-29 11:33:42 -05:00
Diana Clarke
83106a4442 Correct copy/paste errors in help
The keypair, hypervisor, and flavor CLIs all incorrectly say that they
support a special -1 case for the 'limit' parameter. I suspect this was
just copied from the servers help text by mistake.

Change-Id: I57fb3444d54232f0718424c00c07a28b29473d19
Closes-Bug: #1645489
2016-11-28 22:14:29 +00:00
Flavio Percoco
00d5f56a33 Show team and repo badges on README
This patch adds the team's and repository's badges to the README file.
The motivation behind this is to communicate the project status and
features at first glance.

For more information about this effort, please read this email thread:

http://lists.openstack.org/pipermail/openstack-dev/2016-October/105562.html

To see an example of how this would look like check:

b'https://gist.github.com/a9926a344e9bc5cc3a3ba3a98b2483b4\n'

Change-Id: I4e71d4cbe0c505cf4b4bb0aeefdc161cb805b614
2016-11-25 13:52:47 +01:00
Takashi NATSUME
917690ea45 Fix import statement order
Fix import statement order to comply with
OpenStack Style Guidelines(*1).

*1: http://docs.openstack.org/developer/hacking/#import-order-template

TrivialFix
Change-Id: Ifca8ff3326bf90713a38da34850d5bbf19c5af7b
2016-11-24 15:00:01 +09:00
Jenkins
94aec599c6 Merge "Remove unused test code" 2016-11-23 19:15:26 +00:00
Takashi NATSUME
c255efbd97 Remove unused test code
TrivialFix
Change-Id: Ieb6f6e1400de2846ee3c333feb465a2b5e2bc9cf
2016-11-22 20:12:32 +09:00
Takashi NATSUME
89a1f7c077 Remove unused code
The 'load_entry_point' method has not been used
since Ia649db257c416ca054977812ecb3f1a8044fa584.

TrivialFix
Change-Id: If477b0bb753c1a8bed2ebb440ac43f55805a0744
2016-11-22 17:51:58 +09:00
licanwei
d93ea9eb75 Fix the description of hypervisors.list
trivial docstring fix

http://docs.openstack.org/developer/python-novaclient
/ref/v2/hypervisors.html

Change-Id: I1b7a3eed1e809fde80dd49fd617931ca4e2fc072
2016-11-18 14:41:02 +08:00
Jenkins
8d80ebbf68 Merge "Add version pin for image related function" 2016-11-17 13:14:28 +00:00
Jenkins
61dd0dab9c Merge "Change fake server id as str to fit real server id type" 2016-11-17 13:01:47 +00:00
Jenkins
dc62a7e269 Merge "modified the description of service.list" 2016-11-16 11:44:10 +00:00
int32bit
5c1efa5273 Change fake server id as str to fit real server id type
Server id should be always str type not int, but currently in our unit test,
we still use int type. It may harmless in current test cases, but **there's a
potential danger** in future. For example, we may compare server id in our
code, in our test will be 1234 == "1234" which certainly return false but it's
not our expected result and yields a false positive. it trouble me a lot to run
unit test to solve 'bp show-server-all-tenants'. I re-check many times and
completely certain work well but fail to unit test. Honestly I almost couldn't
find any advantage to use int type. So I think the id should be change to str
in fake servers to fit real server uuid type.

Change-Id: I6b27d9c1629656dcc9b18497187c79ca96f6cd67
Closes-Bug: #1642113
2016-11-16 10:49:52 +08:00
Jenkins
7a0b17e224 Merge "Bump client microversion to 2.38" 2016-11-15 16:08:18 +00:00
licanwei
dd2a9b26fa modified the description of service.list
The description of service.list is unprecise.
The service.list gets a list of services,
not to get cpu/memory/hdd info for host.

Change-Id: If5994be2f9e67766f7e2a9d786c32f0569b16b3c
2016-11-15 16:12:39 +08:00
jichenjc
b6f63f953e Add version pin for image related function
image functions deprecated after v2.35 but we didn't pin the
version for them, so when use 2.37 by default won't work.

Change-Id: I450917f7fcbfe0a3ea7921c82af9863e80cb40a1
Closes-Bug: 1638506
2016-11-15 10:11:04 +08:00
Jenkins
ccae3f0951 Merge "Replace oslo_utils.timeutils.isotime" 2016-11-11 11:23:10 +00:00
OpenStack Proposal Bot
6b32b65a6b Updated from global requirements
Change-Id: I31564c0c90a7d0445264fa0af80e657a17a57db3
2016-11-09 04:24:12 +00:00
Diana Clarke
c5cb80b278 Bump client microversion to 2.38
Commit 984d00919ffe5ac5d41edb194740f6f33ca3e78f in nova added
microversion 2.38: "Return HTTP 400 on list for invalid status". This
microversion doesn't otherwise require changes in python-novaclient.

Change-Id: Ia1afe22130258b0efc7f869230ce45a43f8dc60e
2016-11-08 14:28:28 -05:00
Luong Anh Tuan
f1b62deaed Replace oslo_utils.timeutils.isotime
Function 'oslo_utils.timeutils.isotime()' is deprecated in version '1.6'
and will be removed in a future version. We use
datetime.datetime.isoformat() instead. For more informations:
http://docs.openstack.org/developer/oslo.utils/api/timeutils.html#oslo_utils.timeutils.isotime

Change-Id: If41888cfc820c0d081bad67fec28df97c23ddc9d
Closes-Bug: #1514331
2016-11-07 09:08:58 +07:00
OpenStack Proposal Bot
09e82e8a24 Updated from global requirements
Change-Id: Ifc0a312ee6cf7532bd7f3df68b833755bbf01da3
2016-11-06 02:07:09 +00:00
OpenStack Proposal Bot
c62981fd0a Updated from global requirements
Change-Id: Ifbcf7f937c33be7a3315bf7719681b0c43faf15c
2016-11-02 15:40:34 +00:00
Tony Xu
8ae2e4c8a1 Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim
support for Python 3.5 in the classifier.
This patch also adds the convenience py35 venv.

Change-Id: Ic80a40692726b05f0f9d174f6ba7e7040f30db38
2016-10-26 10:26:48 +08:00
OpenStack Proposal Bot
2ba65d00ca Updated from global requirements
Change-Id: I24e51d74ca70dfa86c949be8d4341cc2882061ac
2016-10-22 01:27:20 +00:00
Jenkins
0a0254f38e Merge "Remove support for non-keystone auth systems" 2016-10-21 11:25:58 +00:00
Matt Riedemann
daa9bdc823 Remove support for non-keystone auth systems
The support for non-keystone auth systems and plugins
was deprecated with 1f11840dd84f3570330d1fcd53d1e8eea5ff7922
back in the 3.1.0 release in mitaka.

Now that we're working on shoring up the support for
keystone auth sessions in the client and eventually moving
to remove support for the non-session HTTPClient, we should
also remove the support to load non-keystone auth plugins.

The whole concept of non-keystone auth systems/plugins is
a legacy artifact and is a barrier to interoperability which
is a goal of nova and OpenStack in general.

Change-Id: Ia649db257c416ca054977812ecb3f1a8044fa584
2016-10-20 12:04:58 -04:00
OpenStack Proposal Bot
a972977a46 Updated from global requirements
Change-Id: Ie9dea84731248b2d80cbb275548758c67edadacc
2016-10-19 17:45:55 +00:00