diff --git a/designateclient/v2/cli/zones.py b/designateclient/v2/cli/zones.py index c897db7..b7623e0 100644 --- a/designateclient/v2/cli/zones.py +++ b/designateclient/v2/cli/zones.py @@ -40,7 +40,14 @@ class ListZonesCommand(lister.Lister): def get_parser(self, prog_name): parser = super(ListZonesCommand, self).get_parser(prog_name) + 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('--ttl', help="Time To Live (Seconds)", + required=False) + parser.add_argument('--description', help="Description", + required=False) + parser.add_argument('--status', help="Zone Status", required=False) return parser @@ -51,6 +58,21 @@ class ListZonesCommand(lister.Lister): if parsed_args.type is not None: criterion["type"] = parsed_args.type + if parsed_args.name is not None: + criterion["name"] = parsed_args.name + + if parsed_args.ttl is not None: + criterion["ttl"] = parsed_args.ttl + + if parsed_args.description is not None: + criterion["description"] = parsed_args.description + + if parsed_args.email is not None: + criterion["email"] = parsed_args.email + + if parsed_args.status is not None: + criterion["status"] = parsed_args.status + data = client.zones.list(criterion=criterion) cols = self.columns