Commit Graph

23 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
Katie McLaughlin 39dac3140c Update volumes.get() docstring to correctly reflect functionality
The get() command gets a volume based on an id. It does not have
anything to do with deleting a volume, and thus should not be documented
as such.

Change-Id: Id62fb07ddd9024ee02090201ce1b679d4968b168
2015-01-30 16:48:45 +11:00
Eugeniya Kudryashova 75727c2d37 Fix E128 failures in novaclient/v1_1/
E128 continuation line under-indented for visual indent

Change-Id: I93660ef15df87993738c98f8bb1a88cc65f99870
2014-11-18 17:21:30 +02:00
Andrey Kurilin ae6c39397e Enable check for E127
E127 continuation line over-indented for visual indent

Change-Id: I9dfd489565ee2d1469b2048a930c3a8384dd245d
2014-10-23 14:28:50 +00:00
Eric Guo d44e598692 Remove usage of module py3kcompat
Module py3kcompat was removed from oslo-incubator. We need remove its
usage in client side firstly. This make us move smoothly when sync
oslo-incubator code.

Change-Id: I8b07c32c9852e747579a23685f3c8a07ac13ec01
Partial-Bug: #1280033
2014-02-25 09:17:54 +08:00
Chuck Short c450b39828 python3: Fix imports for py2/py3
Python3 reorganized the standard library and moved several functions
to different modules. Six provides a consistent interface
to them through the fake six.moves module.

However, the urlparse, urllib2, etc modules have been combined
into one module which Six does not support so we do it via
py3kcompat.

Modules such as StringIO and CStringIO have been removed
completely so we use the io module.

Change-Id: I53adac11b634de2c710fc39def36bcec96366710
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-08-27 14:50:34 -04:00
Avishay Traeger 930a10abf9 Add support for swap_volume
Add client support for swap_volume, which allows swapping a volume
currently attached to an instance with a different volume which is not
attached. The contents of the old volume will be copied onto the new
volume. This was added in nova commit
8f51b120b430c7c21399256f37e1d8f75d030484.

Change-Id: I98323d594617c1c435e403d9f3ddc4ff4fa74da6
2013-08-05 12:30:33 +03:00
Chuck Short a25d4fe59a python3: Compatibility for iteritems differences
In python3 dict.iteritems(), dict.iterkeys(), and
dict.itervalues() are no longer supported. So use
six.iteritems() where it is appropriate.

Change-Id: I8b07dc2a89d790ec275d45f859e1644e9b00c837
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-24 11:51:04 -05:00
Vincent Untz c01fae7370 Add --all-tenants option to volume-list
The list and secgroup-list commands have this option, and
nova-volume/cinder respect this search option too nowadays.

Change-Id: Ie95432727dec9702e09a0ce314bf418f6a36b799
2012-09-26 14:57:18 +02:00
Ollie Leahy e8b6aae14a Add the image_id arg to volume create
This fixes bug 1042158 and is a port of
    Josh Durgin's fix to python-cinderclient

    Patch set 2, remove unnecessary secondary option for
    image_id

Change-Id: If028f784f1c6de9b47705cb580711849d1c00060
2012-08-30 13:47:43 +01:00
Jenkins 8ccd9059d6 Merge "Add availability_zone support for volume creation." 2012-08-24 19:13:55 +00:00
Zhiteng Huang 1a47ac1dfb Add availability_zone support for volume creation.
Add '--availability_zone' flag to 'create' sub command in order to allow
user to speicify target availability zone for volume.

Change-Id: Ie20760cdbf6a8fa5869ed5e79dc0ac56d2741cb2
2012-08-09 16:43:14 +08:00
Vishvananda Ishaya 576a64fbb5 Allow resources to use any field as 'name'
The 'name' field for some resources is called something different,
for example 'display_name' for volumes. There was a hack in our
find method to search for display_name as well.

This change adds a new class variable to a Resource to tell it
which attribute to use for searching by name. Volumes and snapshots
were switched to use 'display_name' and hypervisors were switched
to use 'hypervisor_hostname'.

Tests fixed and added.

Fixes bug 1034536

Change-Id: I1b4fb969d42c59d1ab8e3e275a563bbe158e9264
2012-08-08 12:01:40 -07:00
Scott Moser 30e1133203 Add support for volume types
* Depends on https://review.openstack.org/4600

Change-Id: I56eace59f774623a2cb878657b3b797420c48408
2012-02-27 22:46:02 +00: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
François Charlier d18954f4a8 Add missing returns and remove superfluous ones
Some methods which should have returned  objects dit not return and some
methods which don't  return anything used return ... Fixed  all that and
added tests to detect two returns which were missing.

Fixes bug 892058

Change-Id: If59468cfe1c7b1ab74ed0bfc6f81590dfd5dd668
2011-12-30 17:40:02 +01:00
Gaurav Gupta ff48a3e1ec Merge branch 'master' of git://github.com/rackspace/python-novaclient
Conflicts:
	novaclient/v1_1/shell.py
2011-11-09 10:49:51 -08:00
Gaurav Gupta 3d03a25363 Modified as per code-review comments:
- Renaned snapshot to volume-snapshot
    - Created a new file for volume snapshots

Review:
https://github.com/rackspace/python-novaclient/pull/136#issuecomment-2623509
2011-11-09 10:36:16 -08:00
Sandy Walsh 0a3eda6cdd minor tweaks and long overdue pep8 2011-10-25 09:34:23 -07:00
Gaurav Gupta 5c38baf65a Added support for listing/creating/deleting snapshots of nova volumes. Also
implemented the supporting CLI commands.
    Requires the OS API extension, 'os-snapshots'
2011-10-19 10:54:27 -07:00
Gaurav Gupta 66f2432f65 Updated volume-create command to accept an optional attribute, snapshot_id.
This enables the user to create a volume from a snapshot.
2011-10-19 08:31:16 -07:00
Gaurav Gupta acf8a2783a Added methods to get, attach and detach volumes to/from running instances 2011-09-22 06:45:04 -07:00
Gaurav Gupta 74e92a6914 Added support to access nova-volume api (v1.1 extension)
- Only the basic functionality (create, delete, list) is implemented
2011-09-21 12:31:53 -07:00