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
(cherry picked from commit 94e7e97e50)
This commit is contained in:
Michael Chapman 2021-05-14 13:47:05 +10:00 committed by Michael Johnson
parent da7f4ca627
commit be1b1fda8a
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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