summaryrefslogtreecommitdiff
path: root/designateclient
diff options
context:
space:
mode:
Diffstat (limited to 'designateclient')
-rw-r--r--designateclient/v2/cli/recordsets.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/designateclient/v2/cli/recordsets.py b/designateclient/v2/cli/recordsets.py
index 898da19..e4ea9aa 100644
--- a/designateclient/v2/cli/recordsets.py
+++ b/designateclient/v2/cli/recordsets.py
@@ -193,7 +193,15 @@ class SetRecordSetCommand(command.ShowOne):
parser.add_argument('zone_id', help="Zone ID")
parser.add_argument('id', help="RecordSet ID")
- parser.add_argument('--records', help="Records", nargs='+')
+ req_group = parser.add_mutually_exclusive_group()
+ req_group.add_argument(
+ '--records',
+ help=argparse.SUPPRESS,
+ nargs='+')
+ req_group.add_argument(
+ '--record',
+ help="RecordSet Record, repeat if necessary",
+ action='append')
description_group = parser.add_mutually_exclusive_group()
description_group.add_argument('--description', help="Description")
@@ -220,8 +228,13 @@ class SetRecordSetCommand(command.ShowOne):
elif parsed_args.ttl:
data['ttl'] = parsed_args.ttl
+ all_records = parsed_args.record or parsed_args.records
if parsed_args.records:
- data['records'] = parsed_args.records
+ self.log.warning(
+ "Option --records is deprecated, use --record instead.")
+
+ if all_records:
+ data['records'] = all_records
client = self.app.client_manager.dns
common.set_all_common_headers(client, parsed_args)