예제 #1
0
def build_dns_parsers(base_parser):
    # Build all the records
    for dispatch in [d for d in registrar.dispatches if d.dgroup == 'dns']:
        record_base_parser = base_parser.add_parser(
            dispatch.dtype,
            help="Interface for {0} records".format(dispatch.dtype),
            add_help=True)
        action_parser = record_base_parser.add_subparsers(
            help="{0} record actions".format(dispatch.dtype), dest='action')
        build_create_parser(dispatch, action_parser)
        build_update_parser(dispatch, action_parser)
        build_delete_parser(dispatch, action_parser)
        build_detail_parser(dispatch, action_parser)
예제 #2
0
 def build_parser(self, base_parser):
     record_base_parser = base_parser.add_parser(
         self.dtype,
         help="Interface for {0}'s".format(self.dtype),
         add_help=True
     )
     action_parser = record_base_parser.add_subparsers(
         help="{0} actions".format(self.dtype),
         dest='action'
     )
     build_create_parser(self, action_parser)
     build_update_parser(self, action_parser)
     build_delete_parser(self, action_parser)
     build_detail_parser(self, action_parser)
예제 #3
0
def build_dns_parsers(base_parser):
    # Build all the records
    for dispatch in [d for d in registrar.dispatches if d.dgroup == 'dns']:
        record_base_parser = base_parser.add_parser(
            dispatch.dtype,
            help="Interface for {0} records".format(dispatch.dtype),
            add_help=True
        )
        action_parser = record_base_parser.add_subparsers(
            help="{0} record actions".format(dispatch.dtype),
            dest='action'
        )
        build_create_parser(dispatch, action_parser)
        build_update_parser(dispatch, action_parser)
        build_delete_parser(dispatch, action_parser)
        build_detail_parser(dispatch, action_parser)
 def build_parser(self, base_parser):
     record_base_parser = base_parser.add_parser(
         self.dtype,
         help="The interface for CRUDing {0} Key Value "
         "pairs".format(self.dtype),
         add_help=True
     )
     action_parser = record_base_parser.add_subparsers(
         help="{0} record actions".format(self.dtype),
         dest='action'
     )
     build_create_parser(
         self, action_parser, help="Create a {0} KV pair".format(self.dtype)
     )
     build_update_parser(
         self, action_parser, help="Update a {0} KV pair".format(self.dtype)
     )
     build_delete_parser(
         self, action_parser, help="Delete a {0} KV pair".format(self.dtype)
     )
     build_detail_parser(
         self, action_parser, help="Detail a {0} KV pair".format(self.dtype)
     )
     build_kvlist_parser(self, action_parser)