Having retry_after in HTTP response header for 403 status code caused
client to fail with TypeError exception about unexpected keyword
argument. This is related to bug in nova-api. To prevent this kind of
client problems in the future patch adds check to from_response
function to pass retry-after header only to classes that inherit
from RetryAfterException and regression unit tests.
Change-Id: I6bfc8b33eb591d30b3c647397b11100094718e13
Closes-Bug: 1365251
This reverts commit 3bde9c3f427110dae3480644752f49b79ac66ec5.
This change is a part of a series that is not backwards compatible.
It broke applications using the client library.
Change-Id: Id01a0a0feb601539d3855f445ebaf6a3cc000610
Partial-Bug: #1340596
This reverts commit 4e1ee661083bd672a884fd13fdb1ffaadea5252a.
This change is a part of a series that is not backwards compatible,
and caused breakage in applications that use the client library.
Change-Id: If614826fb0832602110c1ac8be2c0e6324a5a248
Partial-Bug: #1340596
The session object is a cross-client means of standardizing the
transport layer.
Novaclient's HTTPClient object has diverged significantly from other
clients. It is easier to simply replace it if a session is provided. If
a session is provided then users of the library need to be aware that
functions such as authenticate() will no longer have any effect/are in
error because this is no longer managed by nova.
Change-Id: I8f146b878908239d9b6c1c7d6cdc01c7e124f4e5
Since exceptions from oslo is used, ClientException doesn't have any
attributes related to HTTP, so `HttpError` should be set as default
http-based exception.
Also, attribute `code` is used in several project, so it should be
returned and marked as deprecated.
Partial-Bug: #1322183
Change-Id: I3c71e2d25d6e36b5bac0f2b3add74d6747cf7c25
- Remove unused exceptions from novaclient.exceptions
- Reuse exceptions from common code
OpenStack clients which already use exception from common code:
- ironicclient - I784007f36dd6a63fc4c77e0d0f0f000e05eb792f
- keystoneclient - Iedf4e5d753d4278d81751ba0f55fdef3566b56de
- saharaclient
- tuskarclient - Iacbf219168fae62d864c6594dd41e0737e848cfa
Similar patches in other clients related to reusing exceptions
from common code:
- cinderclient - I07f04ba5357e0196fe43b510e1d2fff5afa02faa
- glanceclient - I9838391cff7e450f08d27668564b02e63259186c
Related to blueprint common-client-library-2
Change-Id: Ia35d65d57a0047f88a609070f8b4c76215cbd3e9
When running nova boot --poll, any error states that occur will be
seen but, an exit code of 0 will be returned indicating success.
This would be problematic for scripts looking to see if an
operation completed successfully.
To fix this, an exception is raised after the nova api indicates to the
poll code that the vm is in an error state. The exceptions signals the shell
main function to exit with code 1.
Change-Id: I48f6b1c82e2f8b221dda898dcb804b0196018505
Fixes-Bug: #1292669
If a server error is returned that has an unknown code, novaclient will
end up printing something similar to:
ClientException: <attribute 'message' of 'exceptions.BaseException' objects>
Setting a message for ClientException will ensure that something more
useful than that is printed.
Change-Id: I43a2a33017f9a5c1b79d7fd8af4153e91d296f7b
Closes-bug: 1295293
In python 3, dict.keys() is a class of 'dict_keys', it does not
support indexing.
Cast the dict to list to get the "first" value of dict, which is
compatible with python 2&3.
Closes-Bug: #1229005
Change-Id: I561b7ada9e5ad936659a657b3161a9b93a15a788
currently novaclient recognize 413 as rate limiting status while
it shoule be 429 according to HTTP protocol.
fixes bug 1191874
Change-Id: Ib1ae54f7d13d0ca579dd264e8d0d7630770e92d6
It is expected to recieve a 405 or a 409 from Nova, but novaclient presents
them as a generic ClientException. This patch adds MethodNotAllowed
and Conflict classes to represent these HTTP responses.
Change-Id: If89cee04ebd74daaa28ea30b5c57cdc63edc1551
Fixes Bug 1103557.
novaclient abstracts out http request from user/client
making it unknown to user what root cause behind nova client
exceptions being raised. By including url and method in exception
handling, this allows user to handle accordingly.
Change-Id: I1a509bb932b3fd029bd0870ab699a39e21da19bb
* Implement correct certificate verification
* Add --os-cacert
* Rework tests for requests
Pinned requests module to < 1.0 as 1.0.2 is now current in pipi
as of 17Dec2012.
Blueprint: tls-verify
Change-Id: I9a25a94c8dfcaf483c4c8328439809d65cf10b38
When novaclient gets a Connection Refused it now presents that as a
ConnectionRefused exception with appropriate information rather than as
an HTTP exception. Addresses bug 1047078.
vagrant@precise64:/opt/stack/python-novaclient$ nova image-list
ERROR: ConnectionRefused: '[Errno 111] Connection refused'
Change-Id: Iebf4d78a524004d5e79d2219b35f90fbd38ee690
- Remove the NOVA_RAX_AUTH hack and provide (temporary) compatibility
with the new system.
- Example plugin for RAX and HP provided here :
RAX - https://github.com/emonty/rackspace-auth-openstack
HP - https://github.com/emonty/hpcloud-auth-openstack
- Plugin are allowed to specify their own auth_url directly.
- Thanks to mtaylor for helping on this.
Change-Id: Ie96835be617c6a20d9c3fc3bd1536083aecfdc0b