71 Commits

Author SHA1 Message Date
Michael Basnight
4ff001d232 Fixes lp#948685 proxy_token and proxy_tenant_id behavior
* renamed token to proxy_token because of its usage
* added a proxy_tenant_id for new keystone tokens/id/?belongsTo

Change-Id: Ic7e65612620e5a54f04eddb79bffed7e2df6fba2
2012-03-07 19:03:31 -06:00
Vishvananda Ishaya
03f54c57e1 Makes novaclient use the volumes endpoint
* Depends on https://review.openstack.org/#change,4479
 * Adds support to change service type including tests
 * Adds decorator for methods that need to use another service type
 * Changes volume and snapshots to use the volume endpoint
 * These extensions will move into the volume client once it exists
 * Fixes bug 940017

Change-Id: I683e4ca6c67e278d8aa8a9acec3dc0f1872f43f2
2012-02-26 06:11:12 +00:00
Dean Troyer
87dab38b2b Fix bug 904364: Consistiently handle trailing '/' on URLs
novaclient used to require a trailing '/' on --auth-url and would
mysteriously break if it was not present.  This is mostly due to
urlparse.urljoin()'s behaviour; it was only used here for concatenation
so it was eliminated and trailing '/' chars consistiently stripped.
All url concatenation now requires the second element to begin
with '/'.

Change-Id: I99e95ea92682d917348201bc3190a1e77bbcbff0
2012-02-03 15:11:09 -08:00
Matt Stephenson
fe4fa9daef Add Accept: applicaton/json header to all service requests. Fixes bug 904436
Change-Id: I5f7c78f0ea516a7a96c32b1f745686e130c2b9af
2012-02-02 16:37:55 -08:00
Jenkins
9d4b854ff1 Merge "do not require NOVA_VERSION in env, default to 1.1" 2012-02-01 22:18: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
Scott Moser
9c6a1ac205 do not require NOVA_VERSION in env, default to 1.1
fixes bug 920474.

the nova client was not defaulting to version 1.1 unless NOVA_VERSION was
set.  This makes version 1.1 the default if NOVA_VERSION is not set in the
environment.

It also makes shell.py usable from a git checkout as in:
  PYTHONPATH=$PWD python novaclient/shell.py image-list

Change-Id: I02b7e060d1c0694639fcb146a7394b92014c140b
2012-01-23 13:31:10 -05:00
lzyeval
4ff27703d0 PEP8 python-novaclient cleanup
Fixes bug #911552

The None, True, and False values are singletons.

All variable *comparisons* to singletons should use 'is' or 'is not'.
All variable *evaluations* to boolean should use 'if' or 'if not'.
All Object type comparisons should use isinstance()
instead of comparing types directly

Change-Id: Ia5571e58e2662c652f0e996d8c1a1acb4531623d
2012-01-06 20:16:31 +08:00
Chris Behrens
20be4a0add show 409 responses
409s are getting eaten... and nova uses this to return error when not in
the correct state to do an operation.

Change-Id: I76e9e98a89deb19e6b8aa32426fa31d6d66b8fdd
2012-01-04 16:04:17 -08: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
Brian Waldon
90212e9317 Remove unused imports and fix NameError on exc
Change-Id: Ie35ccd7abaada74acb298ace97ae88eb0e0cce1e
2011-12-29 11:10:04 -05:00
Brian Waldon
d7f04e19fe Removing cache-busting query param (fresh)
Change-Id: I9154baef778fd2790f4933918f3a48ec94fc7214
2011-12-28 17:12:43 -05:00
Rick Harris
3661be6673 Removed v1.0 support.
Change-Id: I6850075a2ac0e1558aa94539e73f4fb939dfb318
2011-12-15 23:10:59 +00:00
Josh Kearney
6509fe253f Add support for RAX authentication.
Change-Id: Ia9180a3919373d3ec2e794d4dffe21838b23fc95
2011-12-14 12:22:27 -06:00
Sandy Walsh
f53675a4dd trunk merge 2011-11-16 08:44:31 -08:00
Sandy Walsh
1f4971a136 Merge pull request #150 from SandyWalsh/remove_api_key
Remove api key
2011-11-16 08:38:52 -08:00
Kevin L. Mitchell
7adecf7c3b Use a try/finally to ensure state restoration 2011-11-14 10:39:16 -06:00
Kevin L. Mitchell
5bc980105b Follow redirects when calling out to Keystone. 2011-11-09 16:54:58 -06:00
Sandy Walsh
cdde0d22cd tests working 2011-11-09 07:10:46 -08:00
Sandy Walsh
13b7edfc42 added --endpoint_name support 2011-11-08 10:27:41 -08:00
Nicholas Mistry
1f8c6f8ee2 minor pep8 tweaks 2011-11-03 11:52:42 -05:00
Nicholas Mistry
1015cab9fd resolved merge conflict. 2011-11-03 11:06:24 -05:00
Nicholas Mistry
84076fed6c Added the option --insecure. This disables SSL certificate validation. 2011-11-03 02:13:36 -05:00
Sandy Walsh
557b4eee47 minor fixes 2011-10-25 16:49:22 -07:00
Sandy Walsh
0a3eda6cdd minor tweaks and long overdue pep8 2011-10-25 09:34:23 -07:00
Sandy Walsh
881427de9d new service catalog semantics 2011-10-25 06:28:30 -07:00
Sandy Walsh
42e726ffed now uses tenantName vs. tenantId to auth 2011-09-28 11:00:15 -07:00
Sandy Walsh
9cd9635c42 removed unicode casts 2011-09-26 12:58:03 -07:00
Sandy Walsh
4a53b06e0e cleaned up exception handling 2011-09-26 12:53:29 -07:00
Sandy Walsh
8491c76027 new service catalog implementation. 2011-09-26 12:28:43 -07:00
Sandy Walsh
2d5f6b2df6 change auth cred format for keystone 2011-09-26 07:41:42 -07:00
Sandy Walsh
f932961252 removed debugging 2011-09-15 18:15:59 -07:00
Sandy Walsh
9b767784d8 properly uses keystone admin endpoint for token lookup 2011-09-12 06:39:11 -07:00
Sandy Walsh
2c3a865f6b proxy token support - no tests 2011-09-09 06:33:38 -07:00
Sandy Walsh
55a09cd935 service catalog with multiple endpoints per service 2011-09-07 13:02:50 -07:00
Sandy Walsh
159dbd8076 Merge branch 'master' of github.com:rackspace/python-novaclient into zone-add-optional-creds 2011-09-06 08:52:03 -07:00
Chmouel Boudjnah
0acc0cce69 Add ability to force debugging via os environ.
Currently we can do debug from the command line or integratng to an
application which has already logging configured. But if we want to do
it to experiment via ipython the process is quite cumbersome. This allow
to have an environement variable called NOVACLIENT_DEBUG which enable
debugging when set and defined.
2011-09-02 14:25:12 -05:00
Sandy Walsh
9deb35f36e merge fixup 2011-09-02 12:13:22 -07:00
Sandy Walsh
0cd6ed62fd service catalog as auth parameter 2011-09-02 11:44:25 -07:00
Sandy Walsh
11f31651ac service name support 2011-09-02 10:34:51 -07:00
Chmouel Boudjnah
441536daf1 Add body in debugging. 2011-09-01 11:50:13 -05:00
Sandy Walsh
667fb76e07 Merge branch 'master' of github.com:rackspace/python-novaclient into zone-add-optional-creds 2011-08-30 05:50:30 -07:00
Sandy Walsh
b96b4d039a take auth token param 2011-08-30 05:50:12 -07:00
Chmouel Boudjnah
bf2ef4d9ac Add piston service_catalog. 2011-08-26 16:02:08 -07:00
Sandy Walsh
1879131403 more cleanup 2011-08-24 05:32:40 -07:00
Sandy Walsh
7cb2f3e527 Merge remote branch 'rackspace/master'
Conflicts:
	novaclient/client.py
2011-08-24 05:30:15 -07:00
Nikolay Sokolov
5f241d9b8c Merge with trunk 2011-08-15 10:36:55 +04:00
Nikolay Sokolov
ee9655c218 Added self.auth_url updating, WrongResponse exception. 2011-08-11 13:45:04 +04:00
Brian Waldon
1f7605cb7e catching authorization failure (x-server-management-url KeyError) 2011-08-10 13:25:17 -04:00
Nokolay Sokolov
dfa2c86087 pep8, again 2011-08-09 01:44:01 +04:00