Commit Graph

15 Commits

Author SHA1 Message Date
Andrey Kurilin 0a60aae852 Rename v1_1 to v2
Module novaclient.v1_1 is used as implementation of V1.1, V2 and V3.
Since future development(microversioning) will be done across V2,
implementation should be done in appropriate module(to prevent misleading).

Despite the fact that implementation for all versions are equal, discover
method for contrib path worked only for v1.1. This patch fixes this bug and
modifies shell tests to check all versions.

Change-Id: Ib6798f4dfe177586302141f522dc593560ce6a5b
2015-02-04 17:40:46 +02:00
Zhengguang fdd59e142a Fix the incorrect return messages in keypair show and delete
When we delete or show a keypair, if the keypair doesn't exist,
we'll get "The resource could not be found.(HTTP 404)", this
patch will change it to "ERROR: No keypair with a name or ID of
'keypair_name' exists."

Change-Id: Ifebd8d2213c327f3d3fdd672207170aebbe1bb40
Closes-Bug: #1307338
2014-04-20 10:59:22 -04:00
Chris Yeoh a29b7c7cc7 Adds keypairs support for the Nova V3 API
Adds support and tests for the keypairs extension for
the Nova V3 API. The V3 version of the keypair extension
has been made part of the core V3 API and as a result no longer
has the "os-" prefix in the url.

Differences between the V2 and V3 API are described here:
https://wiki.openstack.org/wiki/NovaAPIv2tov3

Partially implements blueprint v3-api

Change-Id: Id4a77e1e4565f63ecdf7753d3c224975519fc07c
2013-12-19 23:40:00 +10:30
Roman Podolyaka 9e8dd063c6 Fix AttributeError in Keypair._add_details()
_add_details() method copies keypair attributes retrieved
from Nova to an instance of Keypair class. Trying to set
attribute 'id' fails with AttributeError, because Keypair
class has a read-only property 'id'.

We can safely omit setting of attribute 'id', because it's
just an implementation detail (the id of a table row in a
database), and keypairs for a given tenant are uniquely
identified using attribute 'name'.

Fixes bug 1223934

Change-Id: I1045730e47e9e6ad31fcdfbaefdad77e2f3b2c3e
2013-09-24 10:32:04 +03:00
Sergey Lukjanov 87bd54ff13 The 'nova keypair-show key_name' command added.
* 'os-keypairs' api extension used.

Change-Id: Idbb529135b6629f02306c49d8095b5fcf94770cc
2013-06-09 23:37:57 +04:00
Davanum Srinivas c5b579926f Fix Copyright Headers from LLC to Foundation
follow the lead from nova and oslo projects

Change-Id: I270c5f1e4eefa4b72e292bfb4a4c60de0c3f6e4a
2013-03-13 20:12:23 -04:00
Jay Pipes c135cf8ef6 Fix LP #990667 - Keypair __repr__ referencesuuid
Replaces reference to non-existant uuid property with
existant id property in Keypair.__repr__

Change-Id: I3aab0dce2c1f0f3cb5160e54a00a96b02f600854
2012-04-30 13:15:55 -04:00
Brian Waldon ea448e2497 Set resources as loaded on get
* Setting a resource to loaded prevents future lazy-loading
* Remove lookup by uuid in getid helper as it is no longer used
* Fixes bug 971183

Change-Id: Idd9d39ded41b94b08b03476c30e50277b477423d
2012-04-03 19:17:53 -07:00
Brian Waldon a905e5fe07 Accept 1 and 2 as version choices
- removes all unused imports
- update .gitignore with new venv path

Change-Id: I3e8199b72dc83268115133d7c73335ffb6060f9a
2011-12-14 14:44:26 -05:00
Jesse Andrews d6e6e044ea doc improvements 2011-10-17 13:57:56 -07:00
Pavel Shkitin 0ce3f97910 Added commands to work with keypairs 2011-10-14 14:51:50 +04:00
Chmouel Boudjnah 530e0b0f8e Fix loop properly. 2011-08-26 15:29:50 -07:00
Chmouel Boudjnah 541d578b90 Fix #85
Use internal dictionary self._info to get the keypair uuid (which equal
to name in this case).
2011-08-22 12:00:12 -07:00
Jesse Andrews 6c15f6f98c bring up-to-date with lp:~cloudbuilders/nova/os-keypairs 2011-08-09 16:44:43 -07:00
Jesse Andrews d25c627add keypair api 2011-08-08 13:41:04 -07:00