def get_command(self, ctx, name):
config_file = ctx.params.get('config')
try:
conf = config.configure(path=config_file)
except ex.ApimasException as e:
raise click.BadOptionUsage(str(e))
root_url, spec = conf['root'], conf['spec']
cli = _construct_cli(root_url, spec)
if name is None:
return cli.get_base_command()
return cli.endpoint_groups.get(name)
评论列表
文章目录