X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FIPsecUtil.py;h=78239f9950fee45568e4f85987f18af30fc4d791;hp=1a5917295868f2ae734f6f967288b87a8a202776;hb=33fb34665214bbbd0a4b3154169b21c2da01f69b;hpb=ccfe499e2a27f2caf234ecbb2ec948120810eab6 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,