2822 Commits

Author SHA1 Message Date
huangtianhua
2512a28dc1 Make _console() public
Heat wants to use 'novaclient.v2.servers.
ServerManager._console' method to simplify the
implementation of retrieving server console.
It's better to change the method to public for
public use.
The patch changes:
1. add public method named get_console_url() for class
   'novaclient.v2.servers.Server'
2. rename _console() to get_console_url() for class
   'novaclient.v2.servers.ServerManager'

Change-Id: I3d1485468d1d0a79d4002981ebe05b6cdf2332e7
Closes-Bug: #1651677
2017-01-18 09:36:43 +08:00
OpenStack Proposal Bot
ae7b2c1edb Updated from global requirements
Change-Id: I291eb851e3d77afd4586b2dfab33cd5302a4b66d
2017-01-16 17:28:02 +00:00
Jeremy Liu
e81b81a027 Enable coverage report in console output
Currently, the coverage test job doesn't provide any test result
to developer, we could enable coverage report in console output
to let the developer know the coverage status when running coverage
test job.
Change-Id: I12764de112e948129e21732faae03562649522fc
2017-01-13 14:14:21 +08:00
Jenkins
e1e33a4823 Merge "Add support for showing aggregate UUIDs (v2.41)" 2017-01-10 17:56:48 +00:00
Kevin_Zheng
aeec4d11b2 Fix "Message object do not support addition".
In the 7.0.0 Novaclient release we added some warning
log about user should using "endpoint_type" rather than
"interface" when init novaclient:
https://github.com/openstack/python-novaclient/blob/master/novaclient/client.py#L312-L327

https://github.com/openstack/python-novaclient/blob/master/novaclient/client.py#L249-L272

This is now causing a lot jenkins failures acroos projects
that is using novaclient with enable_lazy set to False.
As in this kind of scenario the warning message is a message
object instead of unicode sting and it cannot be added:
http://git.openstack.org/cgit/openstack/oslo.i18n/tree/oslo_i18n/_message.py#n227

and "Message object do not support addition" will raise.

Related Jenkins Error:
Ceilometer:
http://logs.openstack.org/29/333129/3/check/gate-ceilometer-python27-ubuntu-xenial/bd125e7/

Closes-bug: #1652414
Change-Id: I11a490f759fdac9707c1321c9659da2605196a94
2017-01-08 00:21:53 +00:00
Matt Riedemann
75ffbaa3e6 Add support for showing aggregate UUIDs (v2.41)
This adds support for the v2.41 microversion which returns
the aggregate uuid in os-aggregates responses. With this
change, CLI requests with microversion >= 2.41 will show
the aggregate UUID in the table output.

Depends-On: I4112ccd508eb85403933fec8b52efd468e866772

Part of blueprint return-uuid-from-os-aggregates-api

Change-Id: I71aeec07c7c442fe82e2bb3f75f49de6ced22e77
2017-01-05 22:11:09 -05:00
Jenkins
5e5835de67 Merge "Blacklist rather than whitelist autodoc modules" 2017-01-05 18:05:52 +00:00
Jenkins
22eade1b11 Merge "Use more specific asserts in tests" 2017-01-02 12:22:07 +00:00
Diana Clarke
e8e39ed343 Blacklist rather than whitelist autodoc modules
Autogenerate the nova client python API module list rather than having
to remember to add new modules; use exclude to blacklist modules that
shouldn't be included in autodoc.

Change-Id: I051a7094f3b536f1e9a939af87e3fc89554fb375
2016-12-30 11:49:03 -05:00
Jenkins
084b0abb75 Merge "Fixed the __ne__ implementation in base.Resource" 2016-12-21 01:24:06 +00:00
Jenkins
0b253a8dce Merge "Replaces uuid.uuid4 with uuidutils.generate_uuid()" 2016-12-21 00:45:40 +00:00
Matt Riedemann
69d05c6774 Clarify some release notes prior to the 7.0.0 release
Change-Id: I55dc81659973ab5afc60b030b44f30e62b73dbd9
2016-12-20 10:07:20 -05:00
Luong Anh Tuan
d77aa05049 Replaces uuid.uuid4 with uuidutils.generate_uuid()
Openstack common has a wrapper for generating uuids. We should
use that function when generating uuids for consistency.

Change-Id: Ic6045a3b8dabedf3ecaa14d94707614fc4d454e4
Closes-Bug: #1082248
2016-12-20 05:14:03 +00:00
Jenkins
9388fd1d89 Merge "Microversion 2.40 - Simple tenant usage pagination" 2016-12-20 00:25:26 +00:00
Diana Clarke
53b23d5217 Microversion 2.40 - Simple tenant usage pagination
Add optional parameters 'limit' and 'marker' to the
os-simple-tenant-usage endpoints for pagaination.

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

Implements blueprint paginate-simple-tenant-usage
Depends-on: Ic8e9f869f1b855f968967bedbf77542f287f26c0
Change-Id: If99db6933de012b71cf2c982075f08b3e664361e
2016-12-19 14:04:13 -05:00
Akshil Verma
78e621faf7 Fixed the __ne__ implementation in base.Resource
Any object of Resource class or its child class do not compare with
None as expected. For example if a server has been found and is
clearly not None, the test "server!=None" will be False.

This was occuring because the __eq__ implementation was returning the
'NotImplemented' keyword and the __ne__ implementation was returning
the not of __eq__, which in this case will return False as the
expected python behavior for a the not of NotImplemented is False.

Changed the __ne__ implementation to return the correct boolean value
and added the test case that fails with the older implementation and
passes in the current fix.

Change-Id: I6bf5a6e9c9eed4bbcf6678467df19dfea560b4de
Closes-Bug: #1648207
2016-12-19 12:10:03 -06:00
Takashi NATSUME
2e04cb29d7 Add some missing modules in API reference
In doc/source/conf.py, there are some missing files
(modules) to generate API references.
So add them.

Change-Id: I39689a31084e0cdbfdcad66c723a87de009a08f7
Closes-Bug: #1651043
2016-12-19 15:58:28 +09:00
Jenkins
b7094e3222 Merge "Deprecate volume_service_name argument" 2016-12-18 16:12:30 +00:00
Jenkins
8c0c50ff3d Merge "Remove all code related to HTTPClient" 2016-12-17 19:14:55 +00:00
Jenkins
6cdddd481a Merge "Create keystone session instance if not present" 2016-12-17 18:42:45 +00:00
Andrey Kurilin
0bdd24518e Deprecate volume_service_name argument
We forgot about it while removing all methods related to Volume API.

Change-Id: I465b91a17e2633ae876c0011bc8af6ec475c8d48
2016-12-17 17:51:57 +00:00
Jenkins
71f3125ffd Merge "Make SessionClient interface similar to HTTPClient" 2016-12-17 17:22:22 +00:00
Jenkins
e552c03d44 Merge "Deprecate connection_pool variable" 2016-12-17 17:22:16 +00:00
Jenkins
19e3c4a886 Merge "Transmit all auth related vars from cli to inner methods" 2016-12-17 16:52:07 +00:00
Jenkins
d9ad1aec82 Merge "Add version pin for image list function" 2016-12-17 16:52:01 +00:00
Jenkins
522c9a3883 Merge "[proxy-api] microversion 2.39 deprecates image-metadata proxy API" 2016-12-16 20:29:50 +00:00
Pavel Kholkin
75052a7afc [proxy-api] microversion 2.39 deprecates image-metadata proxy API
Almost all proxy APIs were deprecated in microversion 2.36.
But the sub-resource image-metadata of image was forgotten to deprecate.
This patch deprecates the image-metdata API from 2.39.

Image commands were already deprecated since 2.36 in
I450917f7fcbfe0a3ea7921c82af9863e80cb40a1

Implements blueprint deprecate-image-meta-proxy-api

Change-Id: Idd4cd1d1fec13f9e5f89dc419b57e094c9ad4b3b
2016-12-16 21:06:28 +03:00
Andrey Kurilin
2e5576dafc Remove all code related to HTTPClient
In previous patch we switched to use SessionClient in all cases. It means that all
HTTPClient code is redundant now.

Change-Id: I5a0da970fd82c79db3d88f1b49279133bbdba639
2016-12-16 12:56:18 +00:00
Andrey Kurilin
8409e006c5 Create keystone session instance if not present
Since all authentication plugins should be stored in Keystone, there is no
need to share responsibility for authentication stuff with Keystone team.
Let's use convinient and the right way to use keystone - keystone sessions.
We have own adapter for it - novaclient.client.Session which can be used in
100% cases of novaclient usage. Let's create session object if it is not
transmitted via arguments and get rid of novaclient.client.HTTPClient
implementation.

NOTE: novaclient.client.HTTPClient and all related code will be removed
      separately.

Co-Authored-By: Clenimar Filemon <clenimar@lsd.ufcg.edu.br>
Change-Id: Ibb99fdafbf02b3e92f1a5d04d168151b3400b901
2016-12-16 12:56:10 +00:00
Andrey Kurilin
e4dc84e0f6 Make SessionClient interface similar to HTTPClient
HttpClient will be deprecated soon and SessionClient will be used by default.
To not break integration novaclient with other project at the step of moving
from HTTPClient, SessionClient should have similar interface.

Change-Id: I855ccc5160dc7628f4550e93bf133adf8263aace
2016-12-16 12:55:57 +00:00
Andrey Kurilin
b4bd07e5a7 Deprecate connection_pool variable
This is the last variable which is redundant in case of SessionClient.
After this patch we will be able to use SessionClient in 100% usecases.

Change-Id: I102ba25eee7434cb66ea6efbf9ec4ab310d0957a
2016-12-16 12:55:44 +00:00
Andrey Kurilin
2163e6661a Transmit all auth related vars from cli to inner methods
We need cert, project_domain_id, project_domain_name, user_domain_id,
user_domain_name arguments to constract SessionClient in proper way.

These variables will be used in further patches

Change-Id: I44416de7f4dc18916aecb6884158b416e696227e
2016-12-16 12:55:34 +00:00
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