diff --git a/backend/src/api/nft_manager.py b/backend/src/api/nft_manager.py index a37d01d..93c9e7e 100644 --- a/backend/src/api/nft_manager.py +++ b/backend/src/api/nft_manager.py @@ -46,15 +46,6 @@ class NftManager: logger.warning("nft cmd rc=%s stderr=%s cmd=%s", rc, err, text_cmd) return {"rc": rc, "stdout": out, "stderr": err} - def list_rules(self) -> str: - """ - Return the textual ruleset as produced by 'nft list ruleset'. - Uses the textual command path. - """ - res = self.cmd("list ruleset") - if res["rc"] != 0: - raise NftError(f"nft list ruleset failed: {res['stderr']}") - return res["stdout"] def list_rules_json(self) -> Dict[str, Any]: """ @@ -707,7 +698,7 @@ def list_rules(): nft_json = mgr.list_rules_json() except NftError as e: logger.debug("could not obtain nft JSON ruleset: %s", e) - text = mgr.list_rules() + text = mgr.list_rules_json() return RulesetOut(ruleset=text.strip() if text is not None else None) custom = build_predictable_ruleset(nft_json)