Exemplo n.º 1
0
def plugin_extract(args):
    try:
        extract_plugin_dir(plugin_url=args.plugin_source_url,
                           plugin_dir=args.dest_dir)
    except:
        cli_logger.exception('unable to extract plugin to dir [{0}]'
                             .format(args.dest_dir))
        sys.exit(1)
Exemplo n.º 2
0
def list_operations(args):
    try:
        blueprint_yaml = requests.get(url=args.blueprint_url).text
        blueprint_data = yaml.load(stream=blueprint_yaml)
        results = [{'plugin_name': plugin_name,
                    'operations': get_for_plugin(plugin_data=plugin_data)}
                   for plugin_name, plugin_data
                   in blueprint_data.get('plugins', {}).items()]
        cli_logger.info(json.dumps(results))
    except:
        cli_logger.exception('unable to list operations on plugin')
        sys.exit(1)