This commit is contained in:
@@ -18,7 +18,7 @@ import uuid
|
||||
from enum import Enum
|
||||
|
||||
# pyroute2 nftables
|
||||
from pyroute2 import nftables
|
||||
from pyroute2.nftables import NFTables
|
||||
|
||||
router = APIRouter()
|
||||
logger = logging.getLogger("nftables")
|
||||
@@ -89,7 +89,7 @@ class ReplaceResult(BaseModel):
|
||||
# ---------------------- nft wrapper ----------------------
|
||||
class NFT:
|
||||
def __init__(self):
|
||||
self.nft = nftables.main.NFTables()
|
||||
self.nft = NFTables()
|
||||
|
||||
def run(self, cmd: str) -> Dict[str, Any]:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user