Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
PapiExecutor always verifies
[csit.git]
/
resources
/
libraries
/
python
/
IPsecUtil.py
diff --git
a/resources/libraries/python/IPsecUtil.py
b/resources/libraries/python/IPsecUtil.py
index
1a59172
..
78239f9
100644
(file)
--- a/
resources/libraries/python/IPsecUtil.py
+++ b/
resources/libraries/python/IPsecUtil.py
@@
-257,16
+257,11
@@
class IPsecUtil(object):
"""
cmd = 'ipsec_select_backend'
"""
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:
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):
@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:
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,
@staticmethod
def vpp_ipsec_add_sad_entry(node, sad_id, spi, crypto_alg, crypto_key,