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. Also fix library description in setup.py Change-Id: Ice3c9a550dcc486208208074730da13c64a6719b
This commit is contained in:
@@ -130,6 +130,9 @@ def do_show(cs, args):
|
|||||||
metavar='<volume_type>',
|
metavar='<volume_type>',
|
||||||
help='Optional volume type. (Default=None)',
|
help='Optional volume type. (Default=None)',
|
||||||
default=None)
|
default=None)
|
||||||
|
@utils.arg('--availability_zone', metavar='<availability_zone>',
|
||||||
|
help='Optional availability zone for volume. (Default=None)',
|
||||||
|
default=None)
|
||||||
@utils.service_type('volume')
|
@utils.service_type('volume')
|
||||||
def do_create(cs, args):
|
def do_create(cs, args):
|
||||||
"""Add a new volume."""
|
"""Add a new volume."""
|
||||||
@@ -137,7 +140,8 @@ def do_create(cs, args):
|
|||||||
args.snapshot_id,
|
args.snapshot_id,
|
||||||
args.display_name,
|
args.display_name,
|
||||||
args.display_description,
|
args.display_description,
|
||||||
args.volume_type)
|
args.volume_type,
|
||||||
|
availability_zone=args.availability_zone)
|
||||||
|
|
||||||
|
|
||||||
@utils.arg('volume', metavar='<volume>', help='ID of the volume to delete.')
|
@utils.arg('volume', metavar='<volume>', help='ID of the volume to delete.')
|
||||||
|
2
setup.py
2
setup.py
@@ -32,7 +32,7 @@ setuptools.setup(
|
|||||||
version=setup.get_post_version('cinderclient'),
|
version=setup.get_post_version('cinderclient'),
|
||||||
author="Rackspace, based on work by Jacob Kaplan-Moss",
|
author="Rackspace, based on work by Jacob Kaplan-Moss",
|
||||||
author_email="github@racklabs.com",
|
author_email="github@racklabs.com",
|
||||||
description="Client library for OpenStack Nova API.",
|
description="Client library for OpenStack Cinder API.",
|
||||||
long_description=read_file("README.rst"),
|
long_description=read_file("README.rst"),
|
||||||
license="Apache License, Version 2.0",
|
license="Apache License, Version 2.0",
|
||||||
url="https://github.com/openstack/python-cinderclient",
|
url="https://github.com/openstack/python-cinderclient",
|
||||||
|
Reference in New Issue
Block a user