From 989e194c1a230493b26b26f96f55b6de2054c18a Mon Sep 17 00:00:00 2001 From: Justin Riley Date: Tue, 2 Aug 2016 13:32:12 -0400 Subject: [PATCH] cli: remove all commands except daemon and shell ...for now --- onedns/cli.py | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/onedns/cli.py b/onedns/cli.py index 17fc404..2a38100 100644 --- a/onedns/cli.py +++ b/onedns/cli.py @@ -11,24 +11,6 @@ def daemon(args, one_args): srv.daemon(dns_port=args.dns_port) -def add_host(args, one_args): - pass - - -def remove_host(args, one_args): - pass - - -def add_vm(args, one_args): - client = api.OneDNS(args.domain, one_kwargs=one_args) - client.add_vm_by_id(args.id) - - -def remove_vm(args, one_args): - client = api.OneDNS(args.domain, one_kwargs=one_args) - client.remove_vm_by_id(args.id) - - def shell(args, one_args): srv = server.OneDNS(args.domain, one_kwargs=one_args) oneclient = srv._one @@ -58,30 +40,6 @@ def main(args=None): '--dns-port', required=False, default=5053, type=int, help="port for DNS server to listen on") - add_parser = subparsers.add_parser('add') - add_subparser = add_parser.add_subparsers() - - add_vm_parser = add_subparser.add_parser('vm') - add_vm_parser.set_defaults(func=add_vm) - add_vm_parser.add_argument('id', type=int, help='id of the vm to add') - - add_host_parser = add_subparser.add_parser('host') - add_host_parser.set_defaults(func=add_host) - add_host_parser.add_argument('hostname', help='name of host to add') - add_host_parser.add_argument('ip', help='ip of host to add') - - rm_parser = subparsers.add_parser('remove') - rm_subparser = rm_parser.add_subparsers() - - rm_vm_parser = rm_subparser.add_parser('vm') - rm_vm_parser.set_defaults(func=remove_vm) - rm_vm_parser.add_argument('id', type=int, help='id of the vm to add') - - rm_host_parser = rm_subparser.add_parser('host') - rm_host_parser.set_defaults(func=remove_host) - rm_host_parser.add_argument('hostname', help='name of host to remove') - rm_host_parser.add_argument('ip', help='ip of host to remove') - shell_parser = subparsers.add_parser('shell') shell_parser.set_defaults(func=shell)