Commit Graph

1015 Commits

Author SHA1 Message Date
Jenkins 985df912e1 Merge "Remove unused skip_authentication decorator" 2016-06-21 16:13:59 +00:00
OpenStack Proposal Bot 46c3792fee Updated from global requirements
Change-Id: Ida2080b0c209b87781313b2be92c957d22b3188c
2016-06-10 15:49:11 +00:00
kairat_kushaev 2ab2678140 Remove deprecated construct method from session init
construct method is marked as deprecated and might be deleted
in one of future releases. So glanceclient need to be aware of
that and initialize sesssion from command line arguments directly.

Change-Id: Ie81b62b7e70bb177f178caadc41554ae88e51b05
2016-06-09 19:31:02 +00:00
Niall Bunting 10ad2886e1 Add upper constraints to glanceclient
This will force pip install to use the upper-constraints.txt specified
version of pip modules. When you don't do this, you are out on the
bleeding edge and become unstable everytime some python library in the
world changes in a way that you don't expect.

The script is needed because it cleans up the conflicting entry that
corresponds to the client before applying it to source based installation.

Change-Id: I8f168fde04bf9e421d9a39e91a041512bf4f2b79
Closes-Bug: 1563038
2016-06-03 14:21:15 +00:00
kairat_kushaev f58a73495f Remove unused skip_authentication decorator
skip_authentication is not used as decorator for glanceclient methods.
So this method can be safely removed from glance codebase because
it is artifact from old implementation.

Change-Id: I235b4c6b835c75266d8fae1bb603685aa17ad497
2016-06-02 13:25:30 +00:00
OpenStack Proposal Bot 28f905fb45 Updated from global requirements
Change-Id: Ibcb8da6b56adf4a8d6d814f81b8034899b54deef
2016-06-01 14:06:59 +00:00
Jenkins 561c33ccf0 Merge "[Trivial] Remove unnecessary executable privilege" 2016-06-01 13:54:15 +00:00
Jenkins 7dbbbfb542 Merge "Fixed grammar in image-download command description" 2016-06-01 13:37:57 +00:00
Ihar Hrachyshka 3a0007a1c3 Fixed grammar in image-download command description
Change-Id: Ie18e1bee3376fdc01685c6f1d3a949c6934296b3
2016-06-01 10:07:47 +00:00
OpenStack Proposal Bot 3ced7d5905 Updated from global requirements
Change-Id: I353dee7615434bfbc0ae76ed8c7ce168458065fc
2016-05-31 03:05:57 +00:00
OpenStack Proposal Bot a1cd7ef609 Updated from global requirements
Change-Id: Ie88b8762b6db82dc26c6d652786d68ace6e002dd
2016-05-30 00:38:52 +00:00
OpenStack Proposal Bot 3296620f5e Updated from global requirements
Change-Id: Ic3499b5fdacf7602cbfec3720580790d1bda384c
2016-05-26 17:04:47 +00:00
Jenkins 6f2fae7a19 Merge "Fix "Codec can't encode characters"" 2016-05-23 14:31:04 +00:00
ZhiQiang Fan 3066256ba7 [Trivial] Remove unnecessary executable privilege
glanceclient/shell.py defines a main entry, however this file cannot
be executed directly because we do not call the main function in
this file. It is actually a module which will be used by
/usr/bin/glance, hence doesn't need to be executable.

Change-Id: I8b45ac7b8b88265cfc27e5ba7201e4766d9dc276
2016-05-21 13:17:41 +00:00
Jenkins 2e6f60502e Merge "Get endpoint if os_image_url is not set" 2016-05-19 16:57:27 +00:00
Darja Shakhray 9329ef0bc4 Fix "Codec can't encode characters"
Headers were encoded in HTTPClient, but when glance client started
to use SessionClient this functionality was lost.

This commit replaces static method "encode_headers" from HTTPClient
and makes it a common function, that SessionClient can use when
converting image meta to headers.


Change-Id: If9f8020220d2a0431b4241b38b9c83c09c0d75cb
Closes-bug: #1574587
2016-05-19 16:48:03 +00:00
Jenkins fc06c9c120 Merge "Update the home-page with developer documentation" 2016-05-19 03:19:30 +00:00
Jenkins 6afc66e4e5 Merge "Updated from global requirements" 2016-05-18 22:05:54 +00:00
Jenkins 7150ceee1a Merge "Add last_request_id member to HTTPClient and SessionClient" 2016-05-18 21:44:53 +00:00
OpenStack Proposal Bot f0dca77f0e Updated from global requirements
Change-Id: I86de9b2a73cae95dad02a01dbef96f78d9c39b88
2016-05-17 14:09:35 +00:00
venkatamahesh f9dade5eda Update the home-page with developer documentation
Change-Id: I570ee3d8963292ebb1c0fef7e7794378c7f08e7e
2016-05-17 12:32:23 +00:00
Niall Bunting a862196cfb Get endpoint if os_image_url is not set
If env['OS_IMAGE_URL'] is not set then None is returned. This is then
used ignoring the endpoint_type, service_type and region_name. This
patch will use those values if the endpoint is None.

Change-Id: I76cc527b05d2be75d3dbc33123a0d71be97fe25c
Closes-bug: #1579768
2016-05-12 12:47:35 +00:00
OpenStack Proposal Bot f39647ab47 Updated from global requirements
Change-Id: I5f2cc15aae2b34f6d600fbd1c67c88c552aa1562
2016-05-06 22:22:12 +00:00
PranaliD 41e10e3690 Corrected wrong parameter in docstring
In docstring of list() method of glanceclient/v1/images.py,
parameter 'return_request_id' used within **kwargs is
'return_req_id', not 'return_request_id'.

Changed 'return_request_id' to 'return_req_id'.

Change-Id: I7f4a2a5af1b13184c67fa81be971dc5139569f8b
Closes-Bug: 1573049
2016-05-02 03:43:44 -04:00
Jenkins 9ffebbb25e Merge "Enable hacking checks" 2016-04-20 17:13:16 +00:00
OpenStack Proposal Bot da22122450 Updated from global requirements
Change-Id: I84ad85d08fcee0556f43f7c9d2e98d4a42d8e395
2016-04-19 12:28:31 +00:00
Jenkins 12e92558e5 Merge "Re-enable stacktracing when --debug is used" 2016-04-18 17:04:57 +00:00
Tin Lam cd5925bc60 Enable hacking checks
Enabled following hacking checks from tox.ini:
- H233 Python 3.x incompatible use of print operator
- H303 no wildcard import
- H404 multi line docstring should start with a summary

Change-Id: I2553bcd3e80c00acc08d135a1d2dadfb6cda49fe
Partial-Bugs: #1475054
2016-04-18 16:23:59 +00:00
Jenkins cad0245885 Merge "Fix typos in docstrings and comments" 2016-04-13 16:35:37 +00:00
Dao Cong Tien 9faa9d47aa Fix typos in docstrings and comments
Update a comment to be more meaningful

Change-Id: Ie1aa46917c1a253db92a0dc819803a1d3e795b07
2016-04-11 09:08:02 +07:00
OpenStack Proposal Bot c70578a4a8 Updated from global requirements
Change-Id: Ia41d3929e00cb08c9a3414043b22fe9604514fb4
2016-04-08 00:32:47 +00:00
Stuart McLaren d0ec3a7ebb Re-enable stacktracing when --debug is used
Commit 1f89beb609 introduced the behaviour
that a stacktrace is printed if an exception is encountered.

This helped make the client more supportable:

 $ glance --debug image-list
  .
  .
  .
  File "glanceclient/common/http.py", line 337, in get_http_client
    xxx
 NameError: global name 'xxx' is not defined
 global name 'xxx' is not defined

The behaviour was lost at some point. This patch re-enables it.

Change-Id: I25fc8624797909d606590747f54b9cf649ade079
Closes-bug: 1563830
2016-04-07 15:42:51 +00:00
Jenkins 09e9272c59 Merge "Update auth_token before sending request" 2016-04-05 22:23:12 +00:00
Jenkins 8eaefe90a9 Merge "Fix v2 so that you can see the default help info" 2016-04-04 22:25:43 +00:00
Cao ShuFeng 9e532db8b0 Add last_request_id member to HTTPClient and SessionClient
apiclient.base.Resource.get method requires manager.client to have
last_request_id member. Otherwise get operation fails with
AttributeError exception.

Change-Id: I0ece85e3f61f2a7f176520ddf3ebee7792e51993
Closes-bug: 1552533
2016-03-30 13:56:27 +00:00
zwei 444ffbeaa9 Fix v2 so that you can see the default help info
you can see the default help informatiion is v2
subcommand information if input glance command

Co-Authored-By: Stuart McLaren <stuart.mclaren@hp.com>

Closes-bug: #1563649
Change-Id: I7d227f3e68aa555b2e25848618f76df4872af35d
2016-03-30 12:37:28 +00:00
kairat_kushaev 2561e4061c Update auth_token before sending request
Previously auth_token was initialized once in __init__ method.
After that we stored token in session headers. So to refresh token
users need to instantiate a new session inside http client or
re-create client itself.
In order to provide possibility to refresh token we need
to add token header before sending the request. So users can
just update auth_token attribute in the HTTPClient to refresh
user token.

Change-Id: Ifebe9011870bbddc46fc6d6a26563641d5559e97
Closes-Bug: #1563495
2016-03-30 13:33:19 +03:00
Cao ShuFeng 87c8c933bd Fix missing of debug info after we use session
After the introduce of this patch set[1], cli user can't get debug
info even --debug is passed. With the patch set[1], the request
action will be performed in keystoneclient.session.Session.
However the default log level of keystoneclient module is WARNING,
so user can't get debug info from keystoneclient.session.Session.

This change set the root log level to DEBUG when --debug is
passed.

[1]: https://review.openstack.org/#/c/262220/

Change-Id: I0db0fd7ab07a0d61082b86829a671d8dbc0f2963
Closes-bug: 1551076
2016-03-28 04:34:57 +00:00
Jenkins 04e1ea73a5 Merge "Ship the default metadata schema in the client" 2016-03-24 18:35:28 +00:00
Jenkins e5bb7f164e Merge "Docs are generated incorrectly" 2016-03-24 17:14:16 +00:00
wangxiyuan d3de9ed16a Ship the default metadata schema in the client
Now the help message of namespace and resource_type are wrong,
we could see a <unavailable> error when try to get the help
information, such as "glance help md-namespace-create".

See the patch[1] to get more information. the patch[1] added
image schema, but the metadata schema are needed as well.

This patch adds the current metadata schema into client, so that
help text can't be rendered when there schema is not available in
the system.

[1]: https://review.openstack.org/#/c/209536/3

Change-Id: I2ab94d8768114a7e5c475310ba094af653627658
Closes-Bug: #1536430
2016-03-24 09:04:20 +00:00
Tom Cocozzello c6904d0332 Docs are generated incorrectly
When docs are generated with pbr command 'warnerrors = True'
there are many doc problems that are shown. This patch fixes
these problems.

Change-Id: Idb804ab924782b6d7d379494987bdba2acbce568
Closes-Bug: #1557235
2016-03-22 13:28:14 +00:00
Jenkins 14b9ba2981 Merge "trival: fix a typo in comment" 2016-03-21 15:32:26 +00:00
Jenkins d59e341a4c Merge "Fix location update" 2016-03-11 22:52:56 +00:00
Fei Long Wang 8b6dbb2065 Fix location update
After commit Ieb03aaba887492819f9c58aa67f7acfcea81720e, the command
location-update is totally broken now. This patch removes the updating
for an image from non-empty to empty since it's not supported now.
And also removing the default value of metadata for location-update
cli command because now the only purpose of location-update is updating
the location's metadata, so it doesn't make sense to give it a default
value which may update existing metadata by mistake.

Closes-Bug: #1537626

Change-Id: I9ce98e6c63996bbfdbc56761055e37a871f9d3e2
2016-03-11 12:51:13 +00:00
Jenkins c853c78346 Merge "Catch InUseByStore case in do_image_delete" 2016-03-10 12:40:30 +00:00
Danny Al-Gaaf 860908c517 Catch InUseByStore case in do_image_delete
In case do_image_delete() is called on an image that is
in use and can't be deleted by the driver a HTTPConflict
error is raised in glance. Catch this error and print a
propper error message.

Closes-Bug: #1551037

Change-Id: Id17098f27511df8e05e56b8df21e748921223bd9
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2016-03-09 23:27:02 +01:00
Doug Hellmann 6feb715023 Update reno for stable/mitaka
Change-Id: I36f5120e6c120fe5bc983a64fb44949487bc18ca
2016-03-09 13:22:31 -05:00
Jenkins 22a03fd475 Merge "Test: use assert_has_calls() instead" 2016-02-29 19:21:41 +00:00
Jenkins 6aaa6f2f8c Merge "Handle 403 forbidden on download" 2016-02-29 13:04:08 +00:00