diff options
| author | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2016-06-28 15:54:13 +0800 |
|---|---|---|
| committer | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2016-06-28 08:12:40 +0000 |
| commit | 4e46c04f921c81927ded78f17fd28d5a55ebf9e2 (patch) | |
| tree | db9c4ab7ecbcd7c066da5c71828e308248651015 /openstackclient/volume/v1 | |
| parent | 9e47688e5eb2d3e4ee8fe0e15d49b34fe7c5512d (diff) | |
| download | python-openstackclient-4e46c04f921c81927ded78f17fd28d5a55ebf9e2.tar.gz | |
Add "--force" option to "volume qos delete" command
Add ``--force`` option to ``volume qos delete`` command in volume
v1 and v2 to allow users to delete in-use QoS specification(s).
Change-Id: I46036e5f55ced8b8a1be54c521f2a5c242b89160
Closes-Bug: #1596821
Diffstat (limited to 'openstackclient/volume/v1')
| -rw-r--r-- | openstackclient/volume/v1/qos_specs.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openstackclient/volume/v1/qos_specs.py b/openstackclient/volume/v1/qos_specs.py index 56a96256..c5850871 100644 --- a/openstackclient/volume/v1/qos_specs.py +++ b/openstackclient/volume/v1/qos_specs.py @@ -103,13 +103,19 @@ class DeleteQos(command.Command): nargs="+", help=_('QoS specification(s) to delete (name or ID)'), ) + parser.add_argument( + '--force', + action='store_true', + default=False, + help=_("Allow to delete in-use QoS specification(s)") + ) return parser def take_action(self, parsed_args): volume_client = self.app.client_manager.volume for qos in parsed_args.qos_specs: qos_spec = utils.find_resource(volume_client.qos_specs, qos) - volume_client.qos_specs.delete(qos_spec.id) + volume_client.qos_specs.delete(qos_spec.id, parsed_args.force) class DisassociateQos(command.Command): |
