diff options
Diffstat (limited to 'resources/libraries/python/IPsecUtil.py')
-rw-r--r-- | resources/libraries/python/IPsecUtil.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/resources/libraries/python/IPsecUtil.py b/resources/libraries/python/IPsecUtil.py index 1a59172958..78239f9950 100644 --- a/resources/libraries/python/IPsecUtil.py +++ b/resources/libraries/python/IPsecUtil.py @@ -257,16 +257,11 @@ class IPsecUtil(object): """ cmd = 'ipsec_select_backend' - cmd_reply = 'ipsec_select_backend_reply' err_msg = 'Failed to select IPsec backend on host {host}'.format( host=node['host']) args = dict(protocol=protocol, index=index) with PapiExecutor(node) as papi_exec: - papi_resp = papi_exec.add(cmd, **args).execute_should_pass(err_msg) - data = papi_resp.reply[0]['api_reply'][cmd_reply] - if data['retval'] != 0: - raise RuntimeError('Failed to select IPsec backend on host {host}'. - format(host=node['host'])) + papi_exec.add(cmd, **args).get_reply(err_msg) @staticmethod def vpp_ipsec_backend_dump(node): @@ -279,8 +274,7 @@ class IPsecUtil(object): err_msg = 'Failed to dump IPsec backends on host {host}'.format( host=node['host']) with PapiExecutor(node) as papi_exec: - papi_exec.add('ipsec_backend_dump').execute_should_pass( - err_msg, process_reply=False) + papi_exec.add('ipsec_backend_dump').get_details(err_msg) @staticmethod def vpp_ipsec_add_sad_entry(node, sad_id, spi, crypto_alg, crypto_key, |