Example #1
0
    def get_subcommand_parser(self, version):
        parser = self.get_base_parser()

        self.subcommands = {}
        subparsers = parser.add_subparsers(metavar='<subcommand>')
        submodule = utils.import_versioned_module(version, 'shell')
        self._find_actions(subparsers, submodule)
        self._find_actions(subparsers, self)

        return parser
Example #2
0
def Client(version, *args, **kwargs):
    module = utils.import_versioned_module(version, 'client')
    client_class = getattr(module, 'Client')
    return client_class(*args, **kwargs)
Example #3
0
def Client(version, *args, **kwargs):
    module = utils.import_versioned_module(version, "client")
    client_class = getattr(module, "Client")
    return client_class(*args, **kwargs)