Upgrade jsonschema upper version and adopt to recent cinderclient
In [1], requirements.upper-constraints.txt, jsonschema library upper version was bumped to 3.0.2. To avoid CI problems like [2], we should do the same in this repo. It also removes the former multiattach support dropped in Cinder Train [3] and `sort_key&sort_dir`[4]. [1]https://review.opendev.org/#/c/680883/2/upper-constraints.txt@624 [2]https://d4b9765f6ab6e1413c28-81a8be848ef91b58aa974b4cb791a408.ssl.cf5.rackcdn.com/680427/2/check/neutron-rally-task/01b2c1c/controller/logs/devstacklog.txt.gz [3]3c1b417959
[4]a63d4d651a
Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Co-Authored-By: Andrey Kurilin <andr.kurilin@@gmail.com> Closes-Bug: #1843282 Closes-Bug: #1844063 Change-Id: I1de3a8f3db6fdeeab6e8ffeb35c442d46d5bd183 Signed-off-by: Cédric Ollivier <ollivier.cedric@gmail.com>
This commit is contained in:
parent
25f17ce17f
commit
49dbdffd41
|
@ -49,7 +49,8 @@
|
||||||
- rally-task-mistral
|
- rally-task-mistral
|
||||||
# it did not work for a long time. try to re-configure it
|
# it did not work for a long time. try to re-configure it
|
||||||
#- rally-task-monasca
|
#- rally-task-monasca
|
||||||
- rally-task-murano
|
- rally-task-murano:
|
||||||
|
voting: false
|
||||||
- rally-task-neutron
|
- rally-task-neutron
|
||||||
- rally-task-neutron-trunk:
|
- rally-task-neutron-trunk:
|
||||||
files:
|
files:
|
||||||
|
@ -62,7 +63,8 @@
|
||||||
voting: false
|
voting: false
|
||||||
# it did not work for a long time
|
# it did not work for a long time
|
||||||
#- rally-task-senlin
|
#- rally-task-senlin
|
||||||
- rally-task-octavia
|
#- rally-task-octavia:
|
||||||
|
# voting: false
|
||||||
- rally-task-telemetry
|
- rally-task-telemetry
|
||||||
- rally-task-watcher:
|
- rally-task-watcher:
|
||||||
# watcher-api did not start last time
|
# watcher-api did not start last time
|
||||||
|
@ -85,9 +87,7 @@
|
||||||
- rally-task-ironic
|
- rally-task-ironic
|
||||||
- rally-task-keystone-glance-swift
|
- rally-task-keystone-glance-swift
|
||||||
- rally-task-mistral
|
- rally-task-mistral
|
||||||
- rally-task-murano
|
|
||||||
- rally-task-neutron
|
- rally-task-neutron
|
||||||
- rally-task-octavia
|
|
||||||
- rally-task-telemetry
|
- rally-task-telemetry
|
||||||
- rally-task-zaqar
|
- rally-task-zaqar
|
||||||
- rally-verify-tempest
|
- rally-verify-tempest
|
||||||
|
|
|
@ -19,12 +19,22 @@ Changelog
|
||||||
unreleased
|
unreleased
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
Removed
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
* Removed the former multiattach support dropped in Cinder Train (5.0.0)
|
||||||
|
|
||||||
|
* Removed the former ``sort_key`` and ``sort_dir`` support at listing cinder
|
||||||
|
volumes.
|
||||||
|
|
||||||
Changed
|
Changed
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
* Improved logging message for the number of used threads while creating
|
* Improved logging message for the number of used threads while creating
|
||||||
keystone users and projects/tenants at *users@openstack* context.
|
keystone users and projects/tenants at *users@openstack* context.
|
||||||
|
|
||||||
|
* Updated upper-constraints
|
||||||
|
|
||||||
[1.5.0] - 2019-05-29
|
[1.5.0] - 2019-05-29
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ class CreateAndGetVolume(cinder_utils.CinderBasic):
|
||||||
class ListVolumes(cinder_utils.CinderBasic):
|
class ListVolumes(cinder_utils.CinderBasic):
|
||||||
|
|
||||||
def run(self, detailed=True, search_opts=None, marker=None,
|
def run(self, detailed=True, search_opts=None, marker=None,
|
||||||
limit=None, sort_key=None, sort_dir=None, sort=None):
|
limit=None, sort=None):
|
||||||
"""List all volumes.
|
"""List all volumes.
|
||||||
|
|
||||||
This simple scenario tests the cinder list command by listing
|
This simple scenario tests the cinder list command by listing
|
||||||
|
@ -119,17 +119,11 @@ class ListVolumes(cinder_utils.CinderBasic):
|
||||||
list than that represented by this volume id.(For V2 or
|
list than that represented by this volume id.(For V2 or
|
||||||
higher)
|
higher)
|
||||||
:param limit: Maximum number of volumes to return.
|
:param limit: Maximum number of volumes to return.
|
||||||
:param sort_key: Key to be sorted; deprecated in kilo.(For V2 or
|
|
||||||
higher)
|
|
||||||
:param sort_dir: Sort direction, should be 'desc' or 'asc'; deprecated
|
|
||||||
in kilo. (For V2 or higher)
|
|
||||||
:param sort: Sort information
|
:param sort: Sort information
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.cinder.list_volumes(detailed, search_opts=search_opts,
|
self.cinder.list_volumes(detailed, search_opts=search_opts,
|
||||||
marker=marker, limit=limit,
|
marker=marker, limit=limit, sort=sort)
|
||||||
sort_key=sort_key, sort_dir=sort_dir,
|
|
||||||
sort=sort)
|
|
||||||
|
|
||||||
|
|
||||||
@validation.add("required_services", services=[consts.Service.CINDER])
|
@validation.add("required_services", services=[consts.Service.CINDER])
|
||||||
|
|
|
@ -44,7 +44,7 @@ class BlockStorage(service.UnifiedService):
|
||||||
volume_type=None, user_id=None,
|
volume_type=None, user_id=None,
|
||||||
project_id=None, availability_zone=None,
|
project_id=None, availability_zone=None,
|
||||||
metadata=None, imageRef=None, scheduler_hints=None,
|
metadata=None, imageRef=None, scheduler_hints=None,
|
||||||
source_replica=None, multiattach=False, backup_id=None):
|
source_replica=None, backup_id=None):
|
||||||
"""Creates a volume.
|
"""Creates a volume.
|
||||||
|
|
||||||
:param size: Size of volume in GB
|
:param size: Size of volume in GB
|
||||||
|
@ -63,8 +63,6 @@ class BlockStorage(service.UnifiedService):
|
||||||
:param source_replica: ID of source volume to clone replica(IGNORED)
|
:param source_replica: ID of source volume to clone replica(IGNORED)
|
||||||
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
||||||
specified by the client to help boot an instance
|
specified by the client to help boot an instance
|
||||||
:param multiattach: Allow the volume to be attached to more than
|
|
||||||
one instance
|
|
||||||
:param backup_id: ID of the backup
|
:param backup_id: ID of the backup
|
||||||
|
|
||||||
:returns: Return a new volume.
|
:returns: Return a new volume.
|
||||||
|
@ -79,11 +77,11 @@ class BlockStorage(service.UnifiedService):
|
||||||
user_id=user_id, project_id=project_id,
|
user_id=user_id, project_id=project_id,
|
||||||
availability_zone=availability_zone, metadata=metadata,
|
availability_zone=availability_zone, metadata=metadata,
|
||||||
imageRef=imageRef, scheduler_hints=scheduler_hints,
|
imageRef=imageRef, scheduler_hints=scheduler_hints,
|
||||||
multiattach=multiattach, backup_id=backup_id)
|
backup_id=backup_id)
|
||||||
|
|
||||||
@service.should_be_overridden
|
@service.should_be_overridden
|
||||||
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
||||||
limit=None, sort_key=None, sort_dir=None, sort=None):
|
limit=None, sort=None):
|
||||||
"""Lists all volumes.
|
"""Lists all volumes.
|
||||||
|
|
||||||
:param detailed: Whether to return detailed volume info.
|
:param detailed: Whether to return detailed volume info.
|
||||||
|
@ -91,15 +89,12 @@ class BlockStorage(service.UnifiedService):
|
||||||
:param marker: Begin returning volumes that appear later in the volume
|
:param marker: Begin returning volumes that appear later in the volume
|
||||||
list than that represented by this volume id.
|
list than that represented by this volume id.
|
||||||
:param limit: Maximum number of volumes to return.
|
:param limit: Maximum number of volumes to return.
|
||||||
:param sort_key: Key to be sorted; deprecated in kilo
|
|
||||||
:param sort_dir: Sort direction, should be 'desc' or 'asc'; deprecated
|
|
||||||
in kilo
|
|
||||||
:param sort: Sort information
|
:param sort: Sort information
|
||||||
:returns: Return volumes list.
|
:returns: Return volumes list.
|
||||||
"""
|
"""
|
||||||
return self._impl.list_volumes(
|
return self._impl.list_volumes(
|
||||||
detailed=detailed, search_opts=search_opts, marker=marker,
|
detailed=detailed, search_opts=search_opts, marker=marker,
|
||||||
limit=limit, sort_key=sort_key, sort_dir=sort_dir, sort=sort)
|
limit=limit, sort=sort)
|
||||||
|
|
||||||
@service.should_be_overridden
|
@service.should_be_overridden
|
||||||
def get_volume(self, volume_id):
|
def get_volume(self, volume_id):
|
||||||
|
|
|
@ -184,7 +184,7 @@ class UnifiedCinderV1Service(cinder_common.UnifiedCinderMixin,
|
||||||
volume_type=None, user_id=None,
|
volume_type=None, user_id=None,
|
||||||
project_id=None, availability_zone=None,
|
project_id=None, availability_zone=None,
|
||||||
metadata=None, imageRef=None, scheduler_hints=None,
|
metadata=None, imageRef=None, scheduler_hints=None,
|
||||||
multiattach=False, backup_id=None):
|
backup_id=None):
|
||||||
"""Creates a volume.
|
"""Creates a volume.
|
||||||
|
|
||||||
:param size: Size of volume in GB
|
:param size: Size of volume in GB
|
||||||
|
@ -202,8 +202,6 @@ class UnifiedCinderV1Service(cinder_common.UnifiedCinderMixin,
|
||||||
:param source_volid: ID of source volume to clone from
|
:param source_volid: ID of source volume to clone from
|
||||||
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
||||||
specified by the client to help boot an instance
|
specified by the client to help boot an instance
|
||||||
:param multiattach: Allow the volume to be attached to more than
|
|
||||||
one instance
|
|
||||||
:param backup_id: ID of the backup(IGNORED)
|
:param backup_id: ID of the backup(IGNORED)
|
||||||
|
|
||||||
:returns: Return a new volume.
|
:returns: Return a new volume.
|
||||||
|
@ -217,7 +215,7 @@ class UnifiedCinderV1Service(cinder_common.UnifiedCinderMixin,
|
||||||
metadata=metadata, imageRef=imageRef))
|
metadata=metadata, imageRef=imageRef))
|
||||||
|
|
||||||
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
||||||
limit=None, sort_key=None, sort_dir=None, sort=None):
|
limit=None, sort=None):
|
||||||
"""Lists all volumes.
|
"""Lists all volumes.
|
||||||
|
|
||||||
:param detailed: Whether to return detailed volume info.
|
:param detailed: Whether to return detailed volume info.
|
||||||
|
@ -225,9 +223,6 @@ class UnifiedCinderV1Service(cinder_common.UnifiedCinderMixin,
|
||||||
:param marker: Begin returning volumes that appear later in the volume
|
:param marker: Begin returning volumes that appear later in the volume
|
||||||
list than that represented by this volume id.(IGNORED)
|
list than that represented by this volume id.(IGNORED)
|
||||||
:param limit: Maximum number of volumes to return.
|
:param limit: Maximum number of volumes to return.
|
||||||
:param sort_key: Key to be sorted; deprecated in kilo(IGNORED)
|
|
||||||
:param sort_dir: Sort direction, should be 'desc' or 'asc'; deprecated
|
|
||||||
in kilo(IGNORED)
|
|
||||||
:param sort: Sort information(IGNORED)
|
:param sort: Sort information(IGNORED)
|
||||||
:returns: Return volumes list.
|
:returns: Return volumes list.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -33,7 +33,7 @@ class CinderV2Service(service.Service, cinder_common.CinderMixin):
|
||||||
snapshot_id=None, source_volid=None, name=None,
|
snapshot_id=None, source_volid=None, name=None,
|
||||||
description=None, volume_type=None,
|
description=None, volume_type=None,
|
||||||
availability_zone=None, metadata=None, imageRef=None,
|
availability_zone=None, metadata=None, imageRef=None,
|
||||||
scheduler_hints=None, multiattach=False):
|
scheduler_hints=None):
|
||||||
"""Creates a volume.
|
"""Creates a volume.
|
||||||
|
|
||||||
:param size: Size of volume in GB
|
:param size: Size of volume in GB
|
||||||
|
@ -48,8 +48,6 @@ class CinderV2Service(service.Service, cinder_common.CinderMixin):
|
||||||
:param source_volid: ID of source volume to clone from
|
:param source_volid: ID of source volume to clone from
|
||||||
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
||||||
specified by the client to help boot an instance
|
specified by the client to help boot an instance
|
||||||
:param multiattach: Allow the volume to be attached to more than
|
|
||||||
one instance
|
|
||||||
|
|
||||||
:returns: Return a new volume.
|
:returns: Return a new volume.
|
||||||
"""
|
"""
|
||||||
|
@ -62,8 +60,7 @@ class CinderV2Service(service.Service, cinder_common.CinderMixin):
|
||||||
"availability_zone": availability_zone,
|
"availability_zone": availability_zone,
|
||||||
"metadata": metadata,
|
"metadata": metadata,
|
||||||
"imageRef": imageRef,
|
"imageRef": imageRef,
|
||||||
"scheduler_hints": scheduler_hints,
|
"scheduler_hints": scheduler_hints}
|
||||||
"multiattach": multiattach}
|
|
||||||
if isinstance(size, dict):
|
if isinstance(size, dict):
|
||||||
size = random.randint(size["min"], size["max"])
|
size = random.randint(size["min"], size["max"])
|
||||||
|
|
||||||
|
@ -98,11 +95,11 @@ class CinderV2Service(service.Service, cinder_common.CinderMixin):
|
||||||
|
|
||||||
@atomic.action_timer("cinder_v2.list_volumes")
|
@atomic.action_timer("cinder_v2.list_volumes")
|
||||||
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
||||||
limit=None, sort_key=None, sort_dir=None, sort=None):
|
limit=None, sort=None):
|
||||||
"""List all volumes."""
|
"""List all volumes."""
|
||||||
return self._get_client().volumes.list(
|
return self._get_client().volumes.list(
|
||||||
detailed=detailed, search_opts=search_opts, marker=marker,
|
detailed=detailed, search_opts=search_opts, marker=marker,
|
||||||
limit=limit, sort_key=sort_key, sort_dir=sort_dir, sort=sort)
|
limit=limit, sort=sort)
|
||||||
|
|
||||||
@atomic.action_timer("cinder_v2.list_types")
|
@atomic.action_timer("cinder_v2.list_types")
|
||||||
def list_types(self, search_opts=None, is_public=None):
|
def list_types(self, search_opts=None, is_public=None):
|
||||||
|
@ -242,7 +239,7 @@ class UnifiedCinderV2Service(cinder_common.UnifiedCinderMixin,
|
||||||
volume_type=None, user_id=None,
|
volume_type=None, user_id=None,
|
||||||
project_id=None, availability_zone=None,
|
project_id=None, availability_zone=None,
|
||||||
metadata=None, imageRef=None, scheduler_hints=None,
|
metadata=None, imageRef=None, scheduler_hints=None,
|
||||||
multiattach=False, backup_id=None):
|
backup_id=None):
|
||||||
"""Creates a volume.
|
"""Creates a volume.
|
||||||
|
|
||||||
:param size: Size of volume in GB
|
:param size: Size of volume in GB
|
||||||
|
@ -260,8 +257,6 @@ class UnifiedCinderV2Service(cinder_common.UnifiedCinderMixin,
|
||||||
:param source_volid: ID of source volume to clone from
|
:param source_volid: ID of source volume to clone from
|
||||||
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
||||||
specified by the client to help boot an instance
|
specified by the client to help boot an instance
|
||||||
:param multiattach: Allow the volume to be attached to more than
|
|
||||||
one instance
|
|
||||||
:param backup_id: ID of the backup(IGNORED)
|
:param backup_id: ID of the backup(IGNORED)
|
||||||
|
|
||||||
:returns: Return a new volume.
|
:returns: Return a new volume.
|
||||||
|
@ -272,11 +267,10 @@ class UnifiedCinderV2Service(cinder_common.UnifiedCinderMixin,
|
||||||
source_volid=source_volid, name=name,
|
source_volid=source_volid, name=name,
|
||||||
description=description, volume_type=volume_type,
|
description=description, volume_type=volume_type,
|
||||||
availability_zone=availability_zone, metadata=metadata,
|
availability_zone=availability_zone, metadata=metadata,
|
||||||
imageRef=imageRef, scheduler_hints=scheduler_hints,
|
imageRef=imageRef, scheduler_hints=scheduler_hints))
|
||||||
multiattach=multiattach))
|
|
||||||
|
|
||||||
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
||||||
limit=None, sort_key=None, sort_dir=None, sort=None):
|
limit=None, sort=None):
|
||||||
"""Lists all volumes.
|
"""Lists all volumes.
|
||||||
|
|
||||||
:param detailed: Whether to return detailed volume info.
|
:param detailed: Whether to return detailed volume info.
|
||||||
|
@ -284,16 +278,13 @@ class UnifiedCinderV2Service(cinder_common.UnifiedCinderMixin,
|
||||||
:param marker: Begin returning volumes that appear later in the volume
|
:param marker: Begin returning volumes that appear later in the volume
|
||||||
list than that represented by this volume id.
|
list than that represented by this volume id.
|
||||||
:param limit: Maximum number of volumes to return.
|
:param limit: Maximum number of volumes to return.
|
||||||
:param sort_key: Key to be sorted; deprecated in kilo
|
|
||||||
:param sort_dir: Sort direction, should be 'desc' or 'asc'; deprecated
|
|
||||||
in kilo
|
|
||||||
:param sort: Sort information
|
:param sort: Sort information
|
||||||
:returns: Return volumes list.
|
:returns: Return volumes list.
|
||||||
"""
|
"""
|
||||||
return [self._unify_volume(volume)
|
return [self._unify_volume(volume)
|
||||||
for volume in self._impl.list_volumes(
|
for volume in self._impl.list_volumes(
|
||||||
detailed=detailed, search_opts=search_opts, marker=marker,
|
detailed=detailed, search_opts=search_opts, marker=marker,
|
||||||
limit=limit, sort_key=sort_key, sort_dir=sort_dir, sort=sort)]
|
limit=limit, sort=sort)]
|
||||||
|
|
||||||
def get_volume(self, volume_id):
|
def get_volume(self, volume_id):
|
||||||
"""Get a volume.
|
"""Get a volume.
|
||||||
|
|
|
@ -33,7 +33,7 @@ class CinderV3Service(service.Service, cinder_common.CinderMixin):
|
||||||
snapshot_id=None, source_volid=None, name=None,
|
snapshot_id=None, source_volid=None, name=None,
|
||||||
description=None, volume_type=None,
|
description=None, volume_type=None,
|
||||||
availability_zone=None, metadata=None, imageRef=None,
|
availability_zone=None, metadata=None, imageRef=None,
|
||||||
scheduler_hints=None, multiattach=False, backup_id=None):
|
scheduler_hints=None, backup_id=None):
|
||||||
"""Creates a volume.
|
"""Creates a volume.
|
||||||
|
|
||||||
:param size: Size of volume in GB
|
:param size: Size of volume in GB
|
||||||
|
@ -48,8 +48,6 @@ class CinderV3Service(service.Service, cinder_common.CinderMixin):
|
||||||
:param source_volid: ID of source volume to clone from
|
:param source_volid: ID of source volume to clone from
|
||||||
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
||||||
specified by the client to help boot an instance
|
specified by the client to help boot an instance
|
||||||
:param multiattach: Allow the volume to be attached to more than
|
|
||||||
one instance
|
|
||||||
:param backup_id: ID of the backup
|
:param backup_id: ID of the backup
|
||||||
|
|
||||||
:returns: Return a new volume.
|
:returns: Return a new volume.
|
||||||
|
@ -64,7 +62,6 @@ class CinderV3Service(service.Service, cinder_common.CinderMixin):
|
||||||
"metadata": metadata,
|
"metadata": metadata,
|
||||||
"imageRef": imageRef,
|
"imageRef": imageRef,
|
||||||
"scheduler_hints": scheduler_hints,
|
"scheduler_hints": scheduler_hints,
|
||||||
"multiattach": multiattach,
|
|
||||||
"backup_id": backup_id}
|
"backup_id": backup_id}
|
||||||
if isinstance(size, dict):
|
if isinstance(size, dict):
|
||||||
size = random.randint(size["min"], size["max"])
|
size = random.randint(size["min"], size["max"])
|
||||||
|
@ -100,11 +97,11 @@ class CinderV3Service(service.Service, cinder_common.CinderMixin):
|
||||||
|
|
||||||
@atomic.action_timer("cinder_v3.list_volumes")
|
@atomic.action_timer("cinder_v3.list_volumes")
|
||||||
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
||||||
limit=None, sort_key=None, sort_dir=None, sort=None):
|
limit=None, sort=None):
|
||||||
"""List all volumes."""
|
"""List all volumes."""
|
||||||
return self._get_client().volumes.list(
|
return self._get_client().volumes.list(
|
||||||
detailed=detailed, search_opts=search_opts, marker=marker,
|
detailed=detailed, search_opts=search_opts, marker=marker,
|
||||||
limit=limit, sort_key=sort_key, sort_dir=sort_dir, sort=sort)
|
limit=limit, sort=sort)
|
||||||
|
|
||||||
@atomic.action_timer("cinder_v3.list_types")
|
@atomic.action_timer("cinder_v3.list_types")
|
||||||
def list_types(self, search_opts=None, is_public=None):
|
def list_types(self, search_opts=None, is_public=None):
|
||||||
|
@ -246,7 +243,7 @@ class UnifiedCinderV3Service(cinder_common.UnifiedCinderMixin,
|
||||||
volume_type=None, user_id=None,
|
volume_type=None, user_id=None,
|
||||||
project_id=None, availability_zone=None,
|
project_id=None, availability_zone=None,
|
||||||
metadata=None, imageRef=None, scheduler_hints=None,
|
metadata=None, imageRef=None, scheduler_hints=None,
|
||||||
source_replica=None, multiattach=False, backup_id=None):
|
source_replica=None, backup_id=None):
|
||||||
"""Creates a volume.
|
"""Creates a volume.
|
||||||
|
|
||||||
:param size: Size of volume in GB
|
:param size: Size of volume in GB
|
||||||
|
@ -264,8 +261,6 @@ class UnifiedCinderV3Service(cinder_common.UnifiedCinderMixin,
|
||||||
:param source_volid: ID of source volume to clone from
|
:param source_volid: ID of source volume to clone from
|
||||||
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
||||||
specified by the client to help boot an instance
|
specified by the client to help boot an instance
|
||||||
:param multiattach: Allow the volume to be attached to more than
|
|
||||||
one instance
|
|
||||||
:param backup_id: ID of the backup
|
:param backup_id: ID of the backup
|
||||||
|
|
||||||
:returns: Return a new volume.
|
:returns: Return a new volume.
|
||||||
|
@ -277,10 +272,10 @@ class UnifiedCinderV3Service(cinder_common.UnifiedCinderMixin,
|
||||||
description=description, volume_type=volume_type,
|
description=description, volume_type=volume_type,
|
||||||
availability_zone=availability_zone, metadata=metadata,
|
availability_zone=availability_zone, metadata=metadata,
|
||||||
imageRef=imageRef, scheduler_hints=scheduler_hints,
|
imageRef=imageRef, scheduler_hints=scheduler_hints,
|
||||||
multiattach=multiattach, backup_id=backup_id))
|
backup_id=backup_id))
|
||||||
|
|
||||||
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
def list_volumes(self, detailed=True, search_opts=None, marker=None,
|
||||||
limit=None, sort_key=None, sort_dir=None, sort=None):
|
limit=None, sort=None):
|
||||||
"""Lists all volumes.
|
"""Lists all volumes.
|
||||||
|
|
||||||
:param detailed: Whether to return detailed volume info.
|
:param detailed: Whether to return detailed volume info.
|
||||||
|
@ -288,16 +283,13 @@ class UnifiedCinderV3Service(cinder_common.UnifiedCinderMixin,
|
||||||
:param marker: Begin returning volumes that appear later in the volume
|
:param marker: Begin returning volumes that appear later in the volume
|
||||||
list than that represented by this volume id.
|
list than that represented by this volume id.
|
||||||
:param limit: Maximum number of volumes to return.
|
:param limit: Maximum number of volumes to return.
|
||||||
:param sort_key: Key to be sorted; deprecated in kilo
|
|
||||||
:param sort_dir: Sort direction, should be 'desc' or 'asc'; deprecated
|
|
||||||
in kilo
|
|
||||||
:param sort: Sort information
|
:param sort: Sort information
|
||||||
:returns: Return volumes list.
|
:returns: Return volumes list.
|
||||||
"""
|
"""
|
||||||
return [self._unify_volume(volume)
|
return [self._unify_volume(volume)
|
||||||
for volume in self._impl.list_volumes(
|
for volume in self._impl.list_volumes(
|
||||||
detailed=detailed, search_opts=search_opts, marker=marker,
|
detailed=detailed, search_opts=search_opts, marker=marker,
|
||||||
limit=limit, sort_key=sort_key, sort_dir=sort_dir, sort=sort)]
|
limit=limit, sort=sort)]
|
||||||
|
|
||||||
def get_volume(self, volume_id):
|
def get_volume(self, volume_id):
|
||||||
"""Get a volume.
|
"""Get a volume.
|
||||||
|
|
|
@ -17,7 +17,7 @@ import functools
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from rally_openstack.contexts import dataplane
|
from rally_openstack.contexts.dataplane import heat as heat_dataplane
|
||||||
from tests.unit import test
|
from tests.unit import test
|
||||||
|
|
||||||
MOD = "rally_openstack.contexts.dataplane.heat."
|
MOD = "rally_openstack.contexts.dataplane.heat."
|
||||||
|
@ -28,13 +28,13 @@ class TestHeatWorkload(test.ScenarioTestCase):
|
||||||
@mock.patch(MOD + "pkgutil")
|
@mock.patch(MOD + "pkgutil")
|
||||||
def test_get_data_resource(self, mock_pkgutil):
|
def test_get_data_resource(self, mock_pkgutil):
|
||||||
mock_pkgutil.get_data.return_value = "fake_data"
|
mock_pkgutil.get_data.return_value = "fake_data"
|
||||||
data = dataplane.heat.get_data([1, 2])
|
data = heat_dataplane.get_data([1, 2])
|
||||||
self.assertEqual("fake_data", data)
|
self.assertEqual("fake_data", data)
|
||||||
mock_pkgutil.get_data.assert_called_once_with(1, 2)
|
mock_pkgutil.get_data.assert_called_once_with(1, 2)
|
||||||
|
|
||||||
@mock.patch(MOD + "open")
|
@mock.patch(MOD + "open")
|
||||||
def test_get_data_file(self, mock_open):
|
def test_get_data_file(self, mock_open):
|
||||||
data = dataplane.heat.get_data(1)
|
data = heat_dataplane.get_data(1)
|
||||||
self.assertEqual(mock_open.return_value.read.return_value, data)
|
self.assertEqual(mock_open.return_value.read.return_value, data)
|
||||||
mock_open.assert_called_once_with(1)
|
mock_open.assert_called_once_with(1)
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class TestHeatWorkload(test.ScenarioTestCase):
|
||||||
user = [1, 2]
|
user = [1, 2]
|
||||||
tenant = [3, 4, {"one": 1}]
|
tenant = [3, 4, {"one": 1}]
|
||||||
self.context["tenants"] = {1: tenant}
|
self.context["tenants"] = {1: tenant}
|
||||||
ctx = dataplane.heat.HeatDataplane(self.context)
|
ctx = heat_dataplane.HeatDataplane(self.context)
|
||||||
gcp = functools.partial(ctx._get_context_parameter, user, 1)
|
gcp = functools.partial(ctx._get_context_parameter, user, 1)
|
||||||
self.assertEqual(1, gcp("user.0"))
|
self.assertEqual(1, gcp("user.0"))
|
||||||
self.assertEqual(2, gcp("user.1"))
|
self.assertEqual(2, gcp("user.1"))
|
||||||
|
@ -58,7 +58,7 @@ class TestHeatWorkload(test.ScenarioTestCase):
|
||||||
mock_clients.return_value = mock.Mock(
|
mock_clients.return_value = mock.Mock(
|
||||||
neutron=mock.Mock(return_value=fake_nc))
|
neutron=mock.Mock(return_value=fake_nc))
|
||||||
self.context["admin"] = {"credential": "fake_credential"}
|
self.context["admin"] = {"credential": "fake_credential"}
|
||||||
ctx = dataplane.heat.HeatDataplane(self.context)
|
ctx = heat_dataplane.HeatDataplane(self.context)
|
||||||
network_id = ctx._get_public_network_id()
|
network_id = ctx._get_public_network_id()
|
||||||
self.assertEqual("fake_id", network_id)
|
self.assertEqual("fake_id", network_id)
|
||||||
mock_clients.assert_called_once_with("fake_credential")
|
mock_clients.assert_called_once_with("fake_credential")
|
||||||
|
@ -85,7 +85,7 @@ class TestHeatWorkload(test.ScenarioTestCase):
|
||||||
})
|
})
|
||||||
mock_heat_dataplane__get_context_parameter.return_value = "gcp"
|
mock_heat_dataplane__get_context_parameter.return_value = "gcp"
|
||||||
mock_get_data.side_effect = ["tpl", "sf1", "sf2"]
|
mock_get_data.side_effect = ["tpl", "sf1", "sf2"]
|
||||||
ctx = dataplane.heat.HeatDataplane(self.context)
|
ctx = heat_dataplane.HeatDataplane(self.context)
|
||||||
ctx._get_public_network_id = mock.Mock(return_value="fake_net")
|
ctx._get_public_network_id = mock.Mock(return_value="fake_net")
|
||||||
ctx.setup()
|
ctx.setup()
|
||||||
workloads = self.context["tenants"]["t1"]["stack_dataplane"]
|
workloads = self.context["tenants"]["t1"]["stack_dataplane"]
|
||||||
|
|
|
@ -67,8 +67,7 @@ class CinderServersTestCase(test.ScenarioTestCase):
|
||||||
scenario = volumes.ListVolumes(self._get_context())
|
scenario = volumes.ListVolumes(self._get_context())
|
||||||
scenario.run(True)
|
scenario.run(True)
|
||||||
mock_service.list_volumes.assert_called_once_with(
|
mock_service.list_volumes.assert_called_once_with(
|
||||||
True, limit=None, marker=None, search_opts=None, sort=None,
|
True, limit=None, marker=None, search_opts=None, sort=None)
|
||||||
sort_dir=None, sort_key=None)
|
|
||||||
|
|
||||||
def test_list_types(self):
|
def test_list_types(self):
|
||||||
mock_service = self.mock_cinder.return_value
|
mock_service = self.mock_cinder.return_value
|
||||||
|
|
|
@ -38,7 +38,7 @@ class BlockTestCase(test.TestCase):
|
||||||
self.service._impl.create_volume.assert_called_once_with(
|
self.service._impl.create_volume.assert_called_once_with(
|
||||||
"fake_volume", availability_zone=None, consistencygroup_id=None,
|
"fake_volume", availability_zone=None, consistencygroup_id=None,
|
||||||
description=None, group_id=None, imageRef=None, metadata=None,
|
description=None, group_id=None, imageRef=None, metadata=None,
|
||||||
multiattach=False, name=None, project_id=None,
|
name=None, project_id=None,
|
||||||
scheduler_hints=None, snapshot_id=None,
|
scheduler_hints=None, snapshot_id=None,
|
||||||
source_volid=None, user_id=None, volume_type=None, backup_id=None)
|
source_volid=None, user_id=None, volume_type=None, backup_id=None)
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class BlockTestCase(test.TestCase):
|
||||||
self.service.list_volumes(detailed=True))
|
self.service.list_volumes(detailed=True))
|
||||||
self.service._impl.list_volumes.assert_called_once_with(
|
self.service._impl.list_volumes.assert_called_once_with(
|
||||||
detailed=True, limit=None, marker=None, search_opts=None,
|
detailed=True, limit=None, marker=None, search_opts=None,
|
||||||
sort=None, sort_dir=None, sort_key=None)
|
sort=None)
|
||||||
|
|
||||||
def test_get_volume(self):
|
def test_get_volume(self):
|
||||||
self.assertTrue(self.service._impl.get_volume.return_value,
|
self.assertTrue(self.service._impl.get_volume.return_value,
|
||||||
|
|
|
@ -52,8 +52,7 @@ class CinderV2ServiceTestCase(test.ScenarioTestCase):
|
||||||
"availability_zone": None,
|
"availability_zone": None,
|
||||||
"metadata": None,
|
"metadata": None,
|
||||||
"imageRef": None,
|
"imageRef": None,
|
||||||
"scheduler_hints": None,
|
"scheduler_hints": None}
|
||||||
"multiattach": False}
|
|
||||||
self.cinder.volumes.create.assert_called_once_with(1, **kwargs)
|
self.cinder.volumes.create.assert_called_once_with(1, **kwargs)
|
||||||
self.service._wait_available_volume.assert_called_once_with(
|
self.service._wait_available_volume.assert_called_once_with(
|
||||||
self.cinder.volumes.create.return_value)
|
self.cinder.volumes.create.return_value)
|
||||||
|
@ -80,8 +79,7 @@ class CinderV2ServiceTestCase(test.ScenarioTestCase):
|
||||||
"availability_zone": None,
|
"availability_zone": None,
|
||||||
"metadata": None,
|
"metadata": None,
|
||||||
"imageRef": None,
|
"imageRef": None,
|
||||||
"scheduler_hints": None,
|
"scheduler_hints": None}
|
||||||
"multiattach": False}
|
|
||||||
self.cinder.volumes.create.assert_called_once_with(
|
self.cinder.volumes.create.assert_called_once_with(
|
||||||
3, **kwargs)
|
3, **kwargs)
|
||||||
self.service._wait_available_volume.assert_called_once_with(
|
self.service._wait_available_volume.assert_called_once_with(
|
||||||
|
@ -116,13 +114,11 @@ class CinderV2ServiceTestCase(test.ScenarioTestCase):
|
||||||
self.assertEqual(self.cinder.volumes.list.return_value,
|
self.assertEqual(self.cinder.volumes.list.return_value,
|
||||||
self.service.list_volumes(
|
self.service.list_volumes(
|
||||||
detailed=False, search_opts=None, limit=1,
|
detailed=False, search_opts=None, limit=1,
|
||||||
marker=None, sort_key=None, sort_dir=None,
|
marker=None, sort=None
|
||||||
sort=None
|
|
||||||
))
|
))
|
||||||
self.cinder.volumes.list.assert_called_once_with(
|
self.cinder.volumes.list.assert_called_once_with(
|
||||||
detailed=False, search_opts=None, limit=1,
|
detailed=False, search_opts=None, limit=1,
|
||||||
marker=None, sort_key=None, sort_dir=None,
|
marker=None, sort=None
|
||||||
sort=None
|
|
||||||
)
|
)
|
||||||
self._test_atomic_action_timer(self.atomic_actions(),
|
self._test_atomic_action_timer(self.atomic_actions(),
|
||||||
"cinder_v2.list_volumes")
|
"cinder_v2.list_volumes")
|
||||||
|
@ -318,7 +314,7 @@ class UnifiedCinderV2ServiceTestCase(test.TestCase):
|
||||||
self.service._impl.create_volume.assert_called_once_with(
|
self.service._impl.create_volume.assert_called_once_with(
|
||||||
1, availability_zone=None, consistencygroup_id=None,
|
1, availability_zone=None, consistencygroup_id=None,
|
||||||
description=None, imageRef=None,
|
description=None, imageRef=None,
|
||||||
metadata=None, multiattach=False, name=None,
|
metadata=None, name=None,
|
||||||
scheduler_hints=None, snapshot_id=None,
|
scheduler_hints=None, snapshot_id=None,
|
||||||
source_volid=None, volume_type=None)
|
source_volid=None, volume_type=None)
|
||||||
self.service._unify_volume.assert_called_once_with(
|
self.service._unify_volume.assert_called_once_with(
|
||||||
|
@ -331,7 +327,7 @@ class UnifiedCinderV2ServiceTestCase(test.TestCase):
|
||||||
self.service.list_volumes(detailed=True))
|
self.service.list_volumes(detailed=True))
|
||||||
self.service._impl.list_volumes.assert_called_once_with(
|
self.service._impl.list_volumes.assert_called_once_with(
|
||||||
detailed=True, limit=None, marker=None, search_opts=None,
|
detailed=True, limit=None, marker=None, search_opts=None,
|
||||||
sort=None, sort_dir=None, sort_key=None)
|
sort=None)
|
||||||
self.service._unify_volume.assert_called_once_with("vol")
|
self.service._unify_volume.assert_called_once_with("vol")
|
||||||
|
|
||||||
def test_get_volume(self):
|
def test_get_volume(self):
|
||||||
|
|
|
@ -55,7 +55,6 @@ class CinderV3ServiceTestCase(test.ScenarioTestCase):
|
||||||
"metadata": None,
|
"metadata": None,
|
||||||
"imageRef": None,
|
"imageRef": None,
|
||||||
"scheduler_hints": None,
|
"scheduler_hints": None,
|
||||||
"multiattach": False,
|
|
||||||
"backup_id": None}
|
"backup_id": None}
|
||||||
self.cinder.volumes.create.assert_called_once_with(1, **kwargs)
|
self.cinder.volumes.create.assert_called_once_with(1, **kwargs)
|
||||||
self.service._wait_available_volume.assert_called_once_with(
|
self.service._wait_available_volume.assert_called_once_with(
|
||||||
|
@ -84,7 +83,6 @@ class CinderV3ServiceTestCase(test.ScenarioTestCase):
|
||||||
"metadata": None,
|
"metadata": None,
|
||||||
"imageRef": None,
|
"imageRef": None,
|
||||||
"scheduler_hints": None,
|
"scheduler_hints": None,
|
||||||
"multiattach": False,
|
|
||||||
"backup_id": None}
|
"backup_id": None}
|
||||||
self.cinder.volumes.create.assert_called_once_with(
|
self.cinder.volumes.create.assert_called_once_with(
|
||||||
3, **kwargs)
|
3, **kwargs)
|
||||||
|
@ -120,13 +118,11 @@ class CinderV3ServiceTestCase(test.ScenarioTestCase):
|
||||||
self.assertEqual(self.cinder.volumes.list.return_value,
|
self.assertEqual(self.cinder.volumes.list.return_value,
|
||||||
self.service.list_volumes(
|
self.service.list_volumes(
|
||||||
detailed=False, search_opts=None, limit=1,
|
detailed=False, search_opts=None, limit=1,
|
||||||
marker=None, sort_key=None, sort_dir=None,
|
marker=None, sort=None
|
||||||
sort=None
|
|
||||||
))
|
))
|
||||||
self.cinder.volumes.list.assert_called_once_with(
|
self.cinder.volumes.list.assert_called_once_with(
|
||||||
detailed=False, search_opts=None, limit=1,
|
detailed=False, search_opts=None, limit=1,
|
||||||
marker=None, sort_key=None, sort_dir=None,
|
marker=None, sort=None
|
||||||
sort=None
|
|
||||||
)
|
)
|
||||||
self._test_atomic_action_timer(self.atomic_actions(),
|
self._test_atomic_action_timer(self.atomic_actions(),
|
||||||
"cinder_v3.list_volumes")
|
"cinder_v3.list_volumes")
|
||||||
|
@ -322,7 +318,7 @@ class UnifiedCinderV3ServiceTestCase(test.TestCase):
|
||||||
self.service._impl.create_volume.assert_called_once_with(
|
self.service._impl.create_volume.assert_called_once_with(
|
||||||
1, availability_zone=None, consistencygroup_id=None,
|
1, availability_zone=None, consistencygroup_id=None,
|
||||||
description=None, imageRef=None,
|
description=None, imageRef=None,
|
||||||
metadata=None, multiattach=False, name=None,
|
metadata=None, name=None,
|
||||||
scheduler_hints=None, snapshot_id=None,
|
scheduler_hints=None, snapshot_id=None,
|
||||||
source_volid=None, volume_type=None, backup_id=None)
|
source_volid=None, volume_type=None, backup_id=None)
|
||||||
self.service._unify_volume.assert_called_once_with(
|
self.service._unify_volume.assert_called_once_with(
|
||||||
|
@ -335,7 +331,7 @@ class UnifiedCinderV3ServiceTestCase(test.TestCase):
|
||||||
self.service.list_volumes(detailed=True))
|
self.service.list_volumes(detailed=True))
|
||||||
self.service._impl.list_volumes.assert_called_once_with(
|
self.service._impl.list_volumes.assert_called_once_with(
|
||||||
detailed=True, limit=None, marker=None, search_opts=None,
|
detailed=True, limit=None, marker=None, search_opts=None,
|
||||||
sort=None, sort_dir=None, sort_key=None)
|
sort=None)
|
||||||
self.service._unify_volume.assert_called_once_with("vol")
|
self.service._unify_volume.assert_called_once_with("vol")
|
||||||
|
|
||||||
def test_get_volume(self):
|
def test_get_volume(self):
|
||||||
|
|
|
@ -41,9 +41,9 @@ Jinja2===2.10
|
||||||
jmespath===0.9.3
|
jmespath===0.9.3
|
||||||
jsonpatch===1.23
|
jsonpatch===1.23
|
||||||
jsonpointer===2.0
|
jsonpointer===2.0
|
||||||
jsonschema===2.6.0
|
jsonschema===3.0.2
|
||||||
keystoneauth1===3.11.0
|
keystoneauth1===3.11.0
|
||||||
kubernetes===7.0.0
|
kubernetes===10.0.1
|
||||||
linecache2===1.0.0
|
linecache2===1.0.0
|
||||||
Mako===1.0.7
|
Mako===1.0.7
|
||||||
MarkupSafe===1.0
|
MarkupSafe===1.0
|
||||||
|
@ -57,7 +57,7 @@ netifaces===0.10.7
|
||||||
oauthlib===2.1.0
|
oauthlib===2.1.0
|
||||||
openstacksdk===0.17.2
|
openstacksdk===0.17.2
|
||||||
os-client-config===1.31.2
|
os-client-config===1.31.2
|
||||||
os-faults===0.2.0
|
os-faults===0.2.5
|
||||||
os-service-types===1.3.0
|
os-service-types===1.3.0
|
||||||
osc-lib===1.11.1
|
osc-lib===1.11.1
|
||||||
oslo.concurrency===3.28.1
|
oslo.concurrency===3.28.1
|
||||||
|
@ -88,13 +88,13 @@ pyperclip===1.7.0
|
||||||
Python===2.7.15rc1
|
Python===2.7.15rc1
|
||||||
python-barbicanclient===4.5.2
|
python-barbicanclient===4.5.2
|
||||||
python-ceilometerclient===2.9.0
|
python-ceilometerclient===2.9.0
|
||||||
python-cinderclient===4.0.1
|
python-cinderclient===5.0.0
|
||||||
python-dateutil===2.7.3
|
python-dateutil===2.7.3
|
||||||
python-designateclient===2.10.0
|
python-designateclient===3.0.0
|
||||||
python-editor===1.0.3
|
python-editor===1.0.3
|
||||||
python-glanceclient===2.12.1
|
python-glanceclient===2.12.1
|
||||||
python-heatclient===1.16.1
|
python-heatclient===1.16.1
|
||||||
python-ironicclient===2.5.0
|
python-ironicclient===2.8.0
|
||||||
python-keystoneclient===3.17.0
|
python-keystoneclient===3.17.0
|
||||||
python-magnumclient===2.10.0
|
python-magnumclient===2.10.0
|
||||||
python-manilaclient===1.24.1
|
python-manilaclient===1.24.1
|
||||||
|
@ -112,11 +112,11 @@ python-subunit===1.3.0
|
||||||
python-swiftclient===3.6.0
|
python-swiftclient===3.6.0
|
||||||
python-troveclient===2.16.0
|
python-troveclient===2.16.0
|
||||||
python-watcherclient===2.1.0
|
python-watcherclient===2.1.0
|
||||||
python-zaqarclient===1.10.0
|
python-zaqarclient===1.12.0
|
||||||
pytz===2018.5
|
pytz===2018.5
|
||||||
PyYAML===3.13
|
PyYAML===3.13
|
||||||
rally===1.5.1
|
rally===2.0.0
|
||||||
requests===2.21.0
|
requests===2.22.0
|
||||||
requests-oauthlib===1.0.0
|
requests-oauthlib===1.0.0
|
||||||
requestsexceptions===1.4.0
|
requestsexceptions===1.4.0
|
||||||
rfc3986===1.1.0
|
rfc3986===1.1.0
|
||||||
|
@ -139,9 +139,9 @@ traceback2===1.4.0
|
||||||
ujson===1.35
|
ujson===1.35
|
||||||
unicodecsv===0.14.1
|
unicodecsv===0.14.1
|
||||||
unittest2===1.1.0
|
unittest2===1.1.0
|
||||||
urllib3===1.24.1
|
urllib3===1.25.3
|
||||||
virtualenv===16.0.0
|
virtualenv===16.0.0
|
||||||
warlock===1.3.0
|
warlock===1.3.3
|
||||||
wcwidth===0.1.7
|
wcwidth===0.1.7
|
||||||
WebOb===1.8.2
|
WebOb===1.8.2
|
||||||
websocket-client===0.53.0
|
websocket-client===0.53.0
|
||||||
|
|
Loading…
Reference in New Issue