diff options
Diffstat (limited to 'resources/libraries/python/NATUtil.py')
-rw-r--r-- | resources/libraries/python/NATUtil.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/resources/libraries/python/NATUtil.py b/resources/libraries/python/NATUtil.py index aeeb3bc1a5..5c0278db90 100644 --- a/resources/libraries/python/NATUtil.py +++ b/resources/libraries/python/NATUtil.py @@ -66,8 +66,7 @@ class NATUtil(object): flags=getattr(NATConfigFlags, "NAT_IS_INSIDE").value ) with PapiExecutor(node) as papi_exec: - papi_exec.add(cmd, **args_in).get_replies(err_msg).\ - verify_reply(err_msg=err_msg) + papi_exec.add(cmd, **args_in).get_reply(err_msg) int_out_idx = InterfaceUtil.get_sw_if_index(node, int_out) err_msg = 'Failed to set outside interface {int} for NAT44 on host ' \ @@ -78,8 +77,7 @@ class NATUtil(object): flags=getattr(NATConfigFlags, "NAT_IS_OUTSIDE").value ) with PapiExecutor(node) as papi_exec: - papi_exec.add(cmd, **args_in).get_replies(err_msg). \ - verify_reply(err_msg=err_msg) + papi_exec.add(cmd, **args_in).get_reply(err_msg) @staticmethod def set_nat44_deterministic(node, ip_in, subnet_in, ip_out, subnet_out): @@ -108,8 +106,7 @@ class NATUtil(object): out_plen=int(subnet_out) ) with PapiExecutor(node) as papi_exec: - papi_exec.add(cmd, **args_in).get_replies(err_msg). \ - verify_reply(err_msg=err_msg) + papi_exec.add(cmd, **args_in).get_reply(err_msg) @staticmethod def show_nat(node): @@ -135,9 +132,8 @@ class NATUtil(object): err_msg = 'Failed to get NAT configuration on host {host}'.\ format(host=node['host']) with PapiExecutor(node) as papi_exec: - data = papi_exec.add(cmd).get_replies(err_msg).\ - verify_reply(err_msg=err_msg) - logger.debug("NAT Configuration:\n{data}".format(data=pformat(data))) + reply = papi_exec.add(cmd).get_reply(err_msg) + logger.debug("NAT Configuration:\n{reply}".format(reply=pformat(reply))) cmds = [ "nat_worker_dump", |