aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/NATUtil.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python/NATUtil.py')
-rw-r--r--resources/libraries/python/NATUtil.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/resources/libraries/python/NATUtil.py b/resources/libraries/python/NATUtil.py
index 5c0278db90..f018d38335 100644
--- a/resources/libraries/python/NATUtil.py
+++ b/resources/libraries/python/NATUtil.py
@@ -21,7 +21,7 @@ from enum import IntEnum
from robot.api import logger
from resources.libraries.python.InterfaceUtil import InterfaceUtil
-from resources.libraries.python.PapiExecutor import PapiExecutor
+from resources.libraries.python.PapiExecutor import PapiSocketExecutor
class NATConfigFlags(IntEnum):
@@ -65,7 +65,7 @@ class NATUtil(object):
is_add=1,
flags=getattr(NATConfigFlags, "NAT_IS_INSIDE").value
)
- with PapiExecutor(node) as papi_exec:
+ with PapiSocketExecutor(node) as papi_exec:
papi_exec.add(cmd, **args_in).get_reply(err_msg)
int_out_idx = InterfaceUtil.get_sw_if_index(node, int_out)
@@ -76,7 +76,7 @@ class NATUtil(object):
is_add=1,
flags=getattr(NATConfigFlags, "NAT_IS_OUTSIDE").value
)
- with PapiExecutor(node) as papi_exec:
+ with PapiSocketExecutor(node) as papi_exec:
papi_exec.add(cmd, **args_in).get_reply(err_msg)
@staticmethod
@@ -105,7 +105,7 @@ class NATUtil(object):
out_addr=inet_pton(AF_INET, str(ip_out)),
out_plen=int(subnet_out)
)
- with PapiExecutor(node) as papi_exec:
+ with PapiSocketExecutor(node) as papi_exec:
papi_exec.add(cmd, **args_in).get_reply(err_msg)
@staticmethod
@@ -131,7 +131,7 @@ class NATUtil(object):
cmd = 'nat_show_config'
err_msg = 'Failed to get NAT configuration on host {host}'.\
format(host=node['host'])
- with PapiExecutor(node) as papi_exec:
+ with PapiSocketExecutor(node) as papi_exec:
reply = papi_exec.add(cmd).get_reply(err_msg)
logger.debug("NAT Configuration:\n{reply}".format(reply=pformat(reply)))
@@ -145,4 +145,4 @@ class NATUtil(object):
"nat44_user_session_dump",
"nat_det_map_dump"
]
- PapiExecutor.dump_and_log(node, cmds)
+ PapiSocketExecutor.dump_and_log(node, cmds)