summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Chapman <woppin@gmail.com>2021-05-14 13:47:05 +1000
committerErik Olof Gunnar Andersson <eandersson@blizzard.com>2021-11-25 01:38:25 +0000
commit94e7e97e50b0622cb27a20c3aead22e6e25ac5ad (patch)
tree9d47fcd17f081b7ec334d956fd5b28519ae7c206
parent5951a78dda0fc7ef32e3e853769de8e913b788b6 (diff)
downloadpython-designateclient-94e7e97e50b0622cb27a20c3aead22e6e25ac5ad.tar.gz
Remove edit-managed from unsupported commands
--edit-managed sets a header x-designate-edit-managed-records that indicates the current request wishes to modify managed records such as the SOA or NS record created for a zone. This is only used by the recordset update and delete API methods so can be removed elsewhere. Closes-Bug: 1928411 Change-Id: I18bfdae045c8b5e589075865eb024cee4852d8f9
-rw-r--r--designateclient/v2/cli/common.py4
-rw-r--r--designateclient/v2/cli/recordsets.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/designateclient/v2/cli/common.py b/designateclient/v2/cli/common.py
index ca66754..59dd008 100644
--- a/designateclient/v2/cli/common.py
+++ b/designateclient/v2/cli/common.py
@@ -43,7 +43,6 @@ def add_sudo_project_id_option(parser):
def add_all_common_options(parser):
add_all_projects_option(parser)
- add_edit_managed_option(parser)
add_sudo_project_id_option(parser)
@@ -65,7 +64,8 @@ def set_all_common_headers(client, parsed_args):
isinstance(parsed_args.all_projects, bool):
set_all_projects(client, parsed_args.all_projects)
- if parsed_args.edit_managed is not None and \
+ if hasattr(parsed_args, 'edit_managed') and \
+ parsed_args.edit_managed is not None and \
isinstance(parsed_args.edit_managed, bool):
set_edit_managed(client, parsed_args.edit_managed)
diff --git a/designateclient/v2/cli/recordsets.py b/designateclient/v2/cli/recordsets.py
index f764454..d79dfb8 100644
--- a/designateclient/v2/cli/recordsets.py
+++ b/designateclient/v2/cli/recordsets.py
@@ -211,6 +211,7 @@ class SetRecordSetCommand(command.ShowOne):
ttl_group.add_argument('--no-ttl', action='store_true')
common.add_all_common_options(parser)
+ common.add_edit_managed_option(parser)
return parser
@@ -258,6 +259,7 @@ class DeleteRecordSetCommand(command.ShowOne):
parser.add_argument('id', help="RecordSet ID")
common.add_all_common_options(parser)
+ common.add_edit_managed_option(parser)
return parser