record-create/update: Account for priority being 0

Change-Id: Ia791e602d217cbf21fc8b636b0688c012a538169
This commit is contained in:
Alex Monk 2016-09-13 22:54:55 +01:00
parent 030889e549
commit 68b489985d
2 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ class CreateRecordCommand(base.CreateCommand):
if parsed_args.ttl is not None: if parsed_args.ttl is not None:
record.ttl = parsed_args.ttl record.ttl = parsed_args.ttl
if parsed_args.priority: if parsed_args.priority is not None:
record.priority = parsed_args.priority record.priority = parsed_args.priority
if parsed_args.description: if parsed_args.description:
@ -157,7 +157,7 @@ class UpdateRecordCommand(base.UpdateCommand):
if parsed_args.no_priority: if parsed_args.no_priority:
record.priority = None record.priority = None
elif parsed_args.priority: elif parsed_args.priority is not None:
record.priority = parsed_args.priority record.priority = parsed_args.priority
if parsed_args.no_description: if parsed_args.no_description:

View File

@ -42,7 +42,7 @@
"priority": { "priority": {
"type": ["integer", "null"], "type": ["integer", "null"],
"description": "DNS Record Priority", "description": "DNS Record Priority",
"minimum": 1, "minimum": 0,
"maximum": 65535 "maximum": 65535
}, },
"ttl": { "ttl": {