X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FNATUtil.py;h=a9f760768e115226979986063c1618b6cbb098bf;hp=5d3d131c804a90212f8324563adb20afb52ab35c;hb=HEAD;hpb=ac0807e55644020c877329d3bc05adc26ce76e7f diff --git a/resources/libraries/python/NATUtil.py b/resources/libraries/python/NATUtil.py index 5d3d131c80..e5f530ab46 100644 --- a/resources/libraries/python/NATUtil.py +++ b/resources/libraries/python/NATUtil.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Cisco and/or its affiliates. +# Copyright (c) 2023 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -182,10 +182,9 @@ class NATUtil: """Delete and re-add the NAT range setting.""" with PapiSocketExecutor(node) as papi_exec: args_in[u"is_add"] = False - papi_exec.add(cmd, **args_in) + papi_exec.add(cmd, **args_in).get_reply(err_msg) args_in[u"is_add"] = True - papi_exec.add(cmd, **args_in) - papi_exec.get_replies(err_msg) + papi_exec.add(cmd, **args_in).get_reply(err_msg) return resetter @@ -427,10 +426,9 @@ class NATUtil: """Delete and re-add the deterministic NAT mapping.""" with PapiSocketExecutor(node) as papi_exec: args_in[u"is_add"] = False - papi_exec.add(cmd, **args_in) + papi_exec.add(cmd, **args_in).get_reply(err_msg) args_in[u"is_add"] = True - papi_exec.add(cmd, **args_in) - papi_exec.get_replies(err_msg) + papi_exec.add(cmd, **args_in).get_reply(err_msg) return resetter