@fiss_cmd<EOL>def runnable(args):
w = fapi.get_workspace(args.project, args.workspace)<EOL>fapi._check_response_code(w, <NUM_LIT:200>)<EOL>workspace_d = w.json()<EOL>if args.config and args.namespace and not args.entity:<EOL><INDENT>r = fapi.validate_config(args.project, args.workspace, args.namespace,<EOL>args.config)<EOL>fapi._check_response_code(r, <NUM_LIT:200>)<EOL>config_d = r.json()<EOL>errs = sum(_validate_helper(args, config_d, workspace_d, None), [])<EOL>if errs:<EOL><INDENT>print("<STR_LIT>")<EOL>return <NUM_LIT:1><EOL><DEDENT>entity_type = config_d['<STR_LIT>']['<STR_LIT>']<EOL>ent_r = fapi.get_entities(args.project, args.workspace, entity_type)<EOL>fapi._check_response_code(r, <NUM_LIT:200>)<EOL>entities = ent_r.json()<EOL>can_run_on    = []<EOL>cannot_run_on = []<EOL>for entity_d in entities:<EOL><INDENT>if sum(_validate_helper(args, config_d, workspace_d, entity_d), []):<EOL><INDENT>cannot_run_on.append(entity_d['<STR_LIT:name>'])<EOL><DEDENT>else:<EOL><INDENT>can_run_on.append(entity_d['<STR_LIT:name>'])<EOL><DEDENT><DEDENT>if can_run_on:<EOL><INDENT>print("<STR_LIT>".format(args.config, len(can_run_on), entity_type))<EOL>print("<STR_LIT:\n>".join(can_run_on)+"<STR_LIT:\n>")<EOL><DEDENT>print("<STR_LIT>".format(args.config, len(cannot_run_on), entity_type))<EOL><DEDENT>elif args.entity and args.entity_type and not args.config:<EOL><INDENT>entity_r = fapi.get_entity(args.project, args.workspace,<EOL>args.entity_type, args.entity)<EOL>fapi._check_response_code(entity_r, [<NUM_LIT:200>,<NUM_LIT>])<EOL>if entity_r.status_code == <NUM_LIT>:<EOL><INDENT>print("<STR_LIT>".format(args.entity_type, args.entity))<EOL>return <NUM_LIT:2><EOL><DEDENT>entity_d = entity_r.json()<EOL>conf_r = fapi.list_workspace_configs(args.project, args.workspace)<EOL>fapi._check_response_code(conf_r, <NUM_LIT:200>)<EOL>for cfg in conf_r.json():<EOL><INDENT>if args.namespace and cfg['<STR_LIT>'] != args.namespace:<EOL><INDENT>continue<EOL><DEDENT>r = fapi.validate_config(args.project, args.workspace,<EOL>cfg['<STR_LIT>'], cfg['<STR_LIT:name>'])<EOL>fapi._check_response_code(r, [<NUM_LIT:200>, <NUM_LIT>])<EOL>if r.status_code == <NUM_LIT>:<EOL><INDENT>continue<EOL><DEDENT>config_d = r.json()<EOL>errs = sum(_validate_helper(args, config_d, workspace_d, entity_d),[])<EOL>if not errs:<EOL><INDENT>print(cfg['<STR_LIT>'] + "<STR_LIT:/>" + cfg['<STR_LIT:name>'])<EOL><DEDENT><DEDENT><DEDENT>elif args.entity_type:<EOL><INDENT>ent_r = fapi.get_entities(args.project, args.workspace, args.entity_type)<EOL>fapi._check_response_code(ent_r, <NUM_LIT:200>)<EOL>entities = ent_r.json()<EOL>entity_names = sorted(e['<STR_LIT:name>'] for e in entities)<EOL>conf_r = fapi.list_workspace_configs(args.project, args.workspace)<EOL>fapi._check_response_code(conf_r, <NUM_LIT:200>)<EOL>conf_list = conf_r.json()<EOL>config_names = sorted(c['<STR_LIT>'] + '<STR_LIT:/>' + c['<STR_LIT:name>'] for c in conf_list)<EOL>mat = {c:dict() for c in config_names}<EOL>for cfg in conf_list:<EOL><INDENT>if args.namespace and cfg['<STR_LIT>'] != args.namespace:<EOL><INDENT>continue<EOL><DEDENT>r = fapi.validate_config(args.project, args.workspace,<EOL>cfg['<STR_LIT>'], cfg['<STR_LIT:name>'])<EOL>fapi._check_response_code(r, [<NUM_LIT:200>, <NUM_LIT>])<EOL>if r.status_code == <NUM_LIT>:<EOL><INDENT>continue<EOL><DEDENT>config_d = r.json()<EOL>for entity_d in entities:<EOL><INDENT>errs = sum(_validate_helper(args, config_d, workspace_d, entity_d),[])<EOL>symbol = "<STR_LIT:X>" if not errs else "<STR_LIT>"<EOL>cfg_name = cfg['<STR_LIT>'] + '<STR_LIT:/>' + cfg['<STR_LIT:name>']<EOL>mat[cfg_name][entity_d['<STR_LIT:name>']] = symbol<EOL><DEDENT><DEDENT>print("<STR_LIT>" + "<STR_LIT:\t>".join(entity_names))<EOL>for conf in config_names:<EOL><INDENT>print(conf + "<STR_LIT:\t>" + "<STR_LIT:\t>".join(mat[conf][e] for e in entity_names))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>print("<STR_LIT>")<EOL>return <NUM_LIT:1><EOL><DEDENT>
Show me what can be run in a given workspace