summaryrefslogtreecommitdiff
path: root/openstackclient/volume/v2/volume.py
diff options
context:
space:
mode:
authorFan Zhang <zh.f@outlook.com>2018-07-30 19:31:27 +0800
committerJens Harbott <j.harbott@x-ion.de>2018-08-07 09:32:00 +0000
commitdef83a0e94de2f98e3bd68ee412c0f0a2c316f32 (patch)
treee55ae486bd6945b3ea1ca14ec3af7e6df970046a /openstackclient/volume/v2/volume.py
parentf77ca68d53421df867ff2ef274b0648e1abfaf9a (diff)
downloadpython-openstackclient-def83a0e94de2f98e3bd68ee412c0f0a2c316f32.tar.gz
Fix broken gate jobs
This patch aims at fixing the broken gate jobs because of cinder and glance patches [1], [2], [3] and [4]. * Remove parameter `--source-replicated` to drop volume replication v1 support * Address some timing issues with volume transfer requests * Only run Image v1 tests when the test cloud has v1 available * Get tolerant of unexpected additional attributes being returned in Image data [1].https://review.openstack.org/#/c/586293/ [2].https://review.openstack.org/#/c/532503/ [3].https://review.openstack.org/#/c/533564/ [4].https://review.openstack.org/#/c/578755/ Co-Authored-By: Dean Troyer <dtroyer@gmail.com> Co-Authored-By: Monty Taylor <mordred@inaugust.com> Depends-on: https://review.openstack.org/588664 Change-Id: I2a785750e92155185d3344e6116c7f5c6fdd3cbe Signed-off-by: Fan Zhang <zh.f@outlook.com>
Diffstat (limited to 'openstackclient/volume/v2/volume.py')
-rw-r--r--openstackclient/volume/v2/volume.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/openstackclient/volume/v2/volume.py b/openstackclient/volume/v2/volume.py
index ee3d2f20..fc648cef 100644
--- a/openstackclient/volume/v2/volume.py
+++ b/openstackclient/volume/v2/volume.py
@@ -14,6 +14,7 @@
"""Volume V2 Volume action implementations"""
+import argparse
import copy
import logging
@@ -37,7 +38,7 @@ def _check_size_arg(args):
volume is not specified.
"""
- if ((args.snapshot or args.source or args.source_replicated)
+ if ((args.snapshot or args.source)
is None and args.size is None):
msg = _("--size is a required option if snapshot "
"or source volume is not specified.")
@@ -59,7 +60,7 @@ class CreateVolume(command.ShowOne):
metavar="<size>",
type=int,
help=_("Volume size in GB (Required unless --snapshot or "
- "--source or --source-replicated is specified)"),
+ "--source is specified)"),
)
parser.add_argument(
"--type",
@@ -85,7 +86,7 @@ class CreateVolume(command.ShowOne):
source_group.add_argument(
"--source-replicated",
metavar="<replicated-volume>",
- help=_("Replicated volume to clone (name or ID)"),
+ help=argparse.SUPPRESS,
)
parser.add_argument(
"--description",
@@ -168,12 +169,6 @@ class CreateVolume(command.ShowOne):
volume_client.volumes,
parsed_args.source).id
- replicated_source_volume = None
- if parsed_args.source_replicated:
- replicated_source_volume = utils.find_resource(
- volume_client.volumes,
- parsed_args.source_replicated).id
-
consistency_group = None
if parsed_args.consistency_group:
consistency_group = utils.find_resource(
@@ -227,7 +222,6 @@ class CreateVolume(command.ShowOne):
imageRef=image,
source_volid=source_volume,
consistencygroup_id=consistency_group,
- source_replica=replicated_source_volume,
multiattach=parsed_args.multi_attach,
scheduler_hints=parsed_args.hint,
)