diff options
| author | Kiall Mac Innes <kiall@managedit.ie> | 2012-12-29 19:21:25 +0000 |
|---|---|---|
| committer | Kiall Mac Innes <kiall@managedit.ie> | 2012-12-29 19:27:02 +0000 |
| commit | ec6137590f4dac912312fced8da08d4f8f6f5a12 (patch) | |
| tree | 83db32823a5b14ff2146562461f5e72d39fa8630 | |
| parent | 145a7275f351d6399c4642b453cfb773f35a1d6e (diff) | |
| download | python-designateclient-ec6137590f4dac912312fced8da08d4f8f6f5a12.tar.gz | |
Support record priority in the CLI
Change-Id: I772029632f8fa349621fc8f9e600d452cce0ad86
| -rw-r--r-- | monikerclient/cli/records.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/monikerclient/cli/records.py b/monikerclient/cli/records.py index 8cd7935..e6fbb66 100644 --- a/monikerclient/cli/records.py +++ b/monikerclient/cli/records.py @@ -60,6 +60,7 @@ class CreateRecordCommand(base.CreateCommand): parser.add_argument('--type', help="Record Type", required=True) parser.add_argument('--data', help="Record Data", required=True) parser.add_argument('--ttl', type=int, help="Record TTL") + parser.add_argument('--priority', type=int, help="Record Priority") return parser @@ -73,6 +74,9 @@ class CreateRecordCommand(base.CreateCommand): if parsed_args.ttl: record.ttl = parsed_args.ttl + if parsed_args.priority: + record.priority = parsed_args.priority + return self.client.records.create(parsed_args.domain_id, record) @@ -93,6 +97,8 @@ class UpdateRecordCommand(base.UpdateCommand): help="Record Time To Live (Seconds)") ttl_group.add_argument('--no-ttl', action='store_true') + parser.add_argument('--priority', type=int, help="Record Priority") + return parser def execute(self, parsed_args): |
