17 Commits

Author SHA1 Message Date
Brian Waldon
201b74b6cc Clean up exceptions.from_response
Change-Id: I359a911c0813697f091517de493be403e8c1d8a3
2013-04-29 11:33:32 -07:00
Sean McCully
0614ae75f6 ClientExceptions should include url and method
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
2013-01-23 11:33:42 -06:00
Dean Troyer
aa1df04bad Use requests module for HTTP/HTTPS
* 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
2012-12-20 13:04:46 -06:00
Andrew Laski
8cff1a20bc Add ConnectionRefused exception.
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
2012-09-07 16:04:54 -04:00
Chmouel Boudjnah
86c713b17a Allow different auth providers via plugin system.
- 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
2012-08-06 09:10:00 +02:00
Alex Meade
1602966185 Display the request id on error response.
This changes displays the request id when an error code is returned
from the API.

Change-Id: I70621fe7477a4612334af32e83f3ee8c5340371d
2012-04-11 15:00:49 -04:00
Rick Harris
0028eb4ac2 Request ID when name is ambiguous.
Fixes bug 931605

Change-Id: If0778915d964995dbb6647d56ed21075aec08baa
2012-04-09 21:13:57 +00:00
Ziad Sawalha
38bc7ea570 Handle Ambiguous Endpoints Correctly
- Added --service_name argument to allow selecting
  endpoints by service name
- Renamed endpoint_name argument to endpoint_type (this breaks
  compatibility)
- Return AmbiguousEndpoints error if more than one endpoint
  matches filter
- Also addresses bug 924052

Use case:
  $ nova --projectid xxx --version 1.1 --password xxx --username xxx --url https://identity.openstackcloud.com/ image-list
  Found more than one valid endpoint. Use a more restrictive filter
  AmbiguousEndpoints: [
    {'serviceName': 'New Cloud', 'region': 'Test', 'publicURL': 'https://test.openstackcloud.com/v1.1/tttt', 'tenantId': 'tttt'},
    {'serviceName': 'Old Cloud', 'publicURL': 'https://servers.openstackcloud.com/v1.0/tttt', 'tenantId': 'tttt'}]

  $ nova --projectid tttt --version 1.1 --password xxx --username xxx --url https://identity.openstackcloud.com/ --service_name 'New Cloud' image-list
  +--------------------------------------+-----------------------------+--------+--------+
  |                  ID                  |             Name            | Status | Server |
  +--------------------------------------+-----------------------------+--------+--------+
  | 346f4039-a81e-4444-9223-4a3d13592a07 | Debian Squeeze (6.0)        | ACTIVE |        |
  | ac8985ea-c09e-4544-82af-eb459a02a6b2 | Fedora 15                   | ACTIVE |        |
  | ddddc02e-92fa-4f44-b36f-55b39bf66a67 | CentOS 5.6                  | ACTIVE |        |
  +--------------------------------------+-----------------------------+--------+--------+

Change-Id: I9a10b9ad5e5b9cf6e762659013496a93a79774db
2012-01-31 18:37:36 -06:00
Brian Waldon
e0174b51bd Abstract Client building into novaclient.client
This prevents clients of the pythonic api from having to know the
internal module structure.

Change-Id: Idd5c522ac3ff6c2d7915f96ed327323ec83d54fc
2011-12-29 15:40:49 -05:00
Sandy Walsh
8491c76027 new service catalog implementation. 2011-09-26 12:28:43 -07:00
Sandy Walsh
2c3a865f6b proxy token support - no tests 2011-09-09 06:33:38 -07:00
Brian Waldon
f6273ba08d removing extra newline 2011-08-10 13:30:33 -04:00
Brian Waldon
1f7605cb7e catching authorization failure (x-server-management-url KeyError) 2011-08-10 13:25:17 -04:00
Brian Lamar
454daa2cba Tests working again...merged in some work we did earlier. 2011-08-03 17:41:33 -04:00
Brian Lamar
f8496672cc Split everything down the middle into v1_0 and v1_1, including tests. 2011-08-03 16:36:03 -04:00
Sandy Walsh
8e615f4446 Added Jacob Kaplan-Moss copyright notices on older/untouched files. 2011-02-25 02:00:13 -08:00
Sandy Walsh
bd18c7e429 renamed to novaclient and fixed flavor tests 2011-02-26 05:04:40 -04:00