2788 Commits

Author SHA1 Message Date
Andrey Kurilin
77048cc27e Deprecate proxy_token and proxy_tenant_id args
http://lists.openstack.org/pipermail/openstack-dev/2016-October/106098.html

Change-Id: I1ab6d8d36fd2b39c78c5111cbe8191f20e0cda3e
2016-12-15 23:02:58 +00:00
Jenkins
f4bdcba380 Merge "Clarify meaning of project_id var" 2016-12-15 22:20:19 +00:00
Jenkins
970b16c2dc Merge "Rename interface to endpoint_type" 2016-12-15 20:59:59 +00:00
Jenkins
1dc32abd35 Merge "Rename api_key to password" 2016-12-15 20:59:56 +00:00
Jenkins
eac4ec57c8 Merge "Rename bypass_url to endpoint_override" 2016-12-15 20:51:30 +00:00
Jenkins
d6f9f5e03f Merge "Remove redundant args of _construct_http_client" 2016-12-15 20:25:39 +00:00
Jenkins
8fff1f11da Merge "Introduce helper for checking args deprecation" 2016-12-15 20:25:33 +00:00
Jenkins
bc72f582de Merge "Sort arguments for client's methods" 2016-12-15 19:58:10 +00:00
Jenkins
347c9fdd77 Merge "Add limit and offset to server-groups list" 2016-12-15 18:41:54 +00:00
Andrey Kurilin
9bbe5a87b7 Clarify meaning of project_id var
Meaning of project_id (argument of novaclient.client) was not clear.
In different cases, it can be tenant/project id or name (in terms of
Keystone).

* tenant_id - this variable is deprecated now and project_id should be
              used instead;
* project_id - meaning of this variable is clarified now and it expects
               Project ID (in terms of keystone) now.

Change-Id: Ie3fc6b50260203c0debe8664bb87a7d72fb645d7
2016-12-15 19:49:04 +02:00
Andrey Kurilin
9df9aff6fc Rename interface to endpoint_type
'interface' argument was not described anywhere in novaclient's docs,
but since we transmit all additional (unexpected) arguments to
SessionClient implementation, keystoneclient was able to use it.

Change-Id: Id7200a6df416694173b9a02206c53cef984f0fec
2016-12-15 19:49:03 +02:00
Andrey Kurilin
f98b8470de Rename api_key to password
"password" term is more clear. Resolves FIXME from the code:

    FIXME(comstud): Rename the api_key argument above when we
                    know it's not being used as keyword argument

Change-Id: I39f810a181b119591cf017eded71356a437a8c0a
2016-12-15 19:49:03 +02:00
Andrey Kurilin
1ce917ef25 Rename bypass_url to endpoint_override
* there are two terms in openstack which describes the same thing:
     bypass_url and endpoint_override
* endpoint_override is more wide term. It is used in Keystone)
* since not all openstack folks knows that bypass_url and endpoint_override
  are the same, bypass_url (variable which was used in novaclient) was not
  transmitted to SessionClient

NOTE: name of variable in inner class HTTPClient was not changed, since
      this class will be abandoned soon.

Change-Id: I2d45820c01851b271de8ea66e0d59ec494040c04
2016-12-15 19:49:03 +02:00
Andrey Kurilin
73196fd3c1 Remove redundant args of _construct_http_client
Arguments 'extenstions' and 'no_cache' were not transmitted to
'_construct_http_client' method. They are redundant

Change-Id: Ibe0f874e510eef7cc28fcee87b0083c7febd5161
2016-12-15 19:49:03 +02:00
Andrey Kurilin
bf09ad844e Introduce helper for checking args deprecation
This patch introduces `_check_arguments` methods for processing deprecation
workflow of novaclient.client.Client entry-point.

Also, this patch adds a proper warning messages for 'auth_plugin',
'auth_system' arguments, which were removed previously

Change-Id: I7ee210c08f4126b267572c5428511451aeb17260
2016-12-15 19:49:03 +02:00
Andrey Kurilin
330516543b Sort arguments for client's methods
We have a lot of arguments in several Clients methods. Reviewing their
changes is a hard task, so let's sort them to simplify reviews.

Change-Id: Ie78773fd92017fbc4631d0fc6ae9da2e15935537
2016-12-15 19:49:03 +02:00
Jenkins
f9d9a3d4dc Merge "Restict usage *args for novaclient.client.Client" 2016-12-15 17:41:56 +00:00
Jenkins
23dcab71f2 Merge "Remove internal attribute access from shell" 2016-12-15 15:15:35 +00:00
OpenStack Proposal Bot
5b169ce12d Updated from global requirements
Change-Id: I5e09541f692d9b4123e74afb92c32ab6f76c5263
2016-12-15 03:55:26 +00:00
int32bit
332b24678b Remove internal attribute access from shell
The attribute _info is an internal private field in Resource class,
to read this attribute in external class is a bad practice.

Change-Id: I8c705d6d08418d18973eb4a2d7858297a12a4d9d
2016-12-15 01:06:39 +08:00
int32bit
50d83a4de2 Add limit and offset to server-groups list
Via `limit` and `offset` arguments, Nova API now support pagination
to display server groups. But our novaclient hasn't implemented yet
in current version. This patch introduce `--limit` and `--offset`
options to `nova server-group-list` subcommand, which can make up for
the above issue.

Change-Id: I371d4c2e74a8e6bfc8a7529de35668490cb0e44d
Closes-Bug: #1648835
2016-12-14 23:46:24 +08:00
Jenkins
aa2feca675 Merge "CONF.osapi_max_limit -> CONF.api.max_limit" 2016-12-14 14:25:59 +00:00
Jenkins
883f918dee Merge "Check source_type and destination_type when booting with bdm provided" 2016-12-13 16:11:10 +00:00
Andrey Kurilin
4ff6c617ec Restict usage *args for novaclient.client.Client
Possitional arguments doen't allow to provide proper compatibility
and deprecation workflows. *args was deprecated long time ago and a
proper message was added.

Change-Id: Ib4a8f4db52a0f4cb8e8cf5e8c8e778eef8831e91
2016-12-12 18:06:14 +00: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
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