def list_all_tables(): tables = table_parser.parse_tables(nft_utils.nft_get_json_command()) chains = chain_wrapper.list_all_chains() sets = set_wrapper.list_all_sets() dictionaries = dictionary_wrapper.list_all_dictionaries() tables = nft_utils.join_tables_with_chains(tables, chains) tables = nft_utils.join_tables_with_sets(tables, sets) tables = nft_utils.join_tables_with_dictionaries(tables, dictionaries) return tables
def list_all_chains(): chains = chain_parser.parse_chains(nft_utils.nft_get_json_command()) rules = rule_wrapper.list_all_rules() chains = nft_utils.join_chains_with_rules(chains, rules) return chains