diff options
| author | Zuul <zuul@review.opendev.org> | 2020-12-02 23:25:25 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-12-02 23:25:25 +0000 |
| commit | e6e7b191a3b19a2af99fd2c8a860dea3083bc6b1 (patch) | |
| tree | e809b89c86e76d1b72068fbefa82821e1bb24314 | |
| parent | 5b8068818dba6b20475aeb89fe02613f99978365 (diff) | |
| parent | b68b70a097fd9b968407f253c8eaf91c76ff0fd1 (diff) | |
| download | python-designateclient-4.2.0.tar.gz | |
Merge "Add choices to `--type` command line argument"4.2.0
| -rw-r--r-- | designateclient/v2/cli/zones.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/designateclient/v2/cli/zones.py b/designateclient/v2/cli/zones.py index d54154b..f740504 100644 --- a/designateclient/v2/cli/zones.py +++ b/designateclient/v2/cli/zones.py @@ -55,7 +55,10 @@ class ListZonesCommand(command.Lister): parser.add_argument('--name', help="Zone Name", required=False) parser.add_argument('--email', help="Zone Email", required=False) - parser.add_argument('--type', help="Zone Type", required=False) + parser.add_argument('--type', help="Zone Type", + choices=["PRIMARY", "SECONDARY"], + default="PRIMARY", + required=False) parser.add_argument('--ttl', help="Time To Live (Seconds)", required=False) parser.add_argument('--description', help="Description", @@ -129,7 +132,9 @@ class CreateZoneCommand(command.ShowOne): parser.add_argument('name', help="Zone Name") parser.add_argument('--email', help="Zone Email") - parser.add_argument('--type', help="Zone Type", default='PRIMARY') + parser.add_argument('--type', help="Zone Type", + choices=["PRIMARY", "SECONDARY"], + default='PRIMARY') parser.add_argument('--ttl', type=int, help="Time To Live (Seconds)") parser.add_argument('--description', help="Description") parser.add_argument('--masters', help="Zone Masters", nargs='+') |
