aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2020-03-27 15:23:50 +0100
committerJan Gelety <jgelety@cisco.com>2020-03-31 09:34:16 +0000
commit423995e9d218fd45bf17ce96af3f4d620d1f1c61 (patch)
tree41a795431f773d49bb8dfd7f1fce1f18b79fcc5a /resources/libraries/python
parentfc97058d3532249912457cfdaff8e2bc087b3b83 (diff)
SRv6: Make show command output visible
Change-Id: Ie8764f1746fa51d8b6e8621db68ffd2966168a07 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python')
-rw-r--r--resources/libraries/python/SRv6.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/resources/libraries/python/SRv6.py b/resources/libraries/python/SRv6.py
index 063bcd5f2a..86dd0028bd 100644
--- a/resources/libraries/python/SRv6.py
+++ b/resources/libraries/python/SRv6.py
@@ -207,10 +207,7 @@ class SRv6:
:type node: dict
"""
cmd = u"sr_localsids_dump"
- err_msg = f"Failed to get SR localSID dump on host {node[u'host']}"
-
- with PapiSocketExecutor(node) as papi_exec:
- papi_exec.add(cmd).get_details(err_msg)
+ PapiSocketExecutor.dump_and_log(node, (cmd,))
@staticmethod
def configure_sr_policy(node, bsid, sid_list, mode=u"encap"):
@@ -247,10 +244,7 @@ class SRv6:
:type node: dict
"""
cmd = u"sr_policies_dump"
- err_msg = f"Failed to get SR policies dump on host {node[u'host']}"
-
- with PapiSocketExecutor(node) as papi_exec:
- papi_exec.add(cmd).get_details(err_msg)
+ PapiSocketExecutor.dump_and_log(node, (cmd,))
@staticmethod
def _get_sr_steer_policy_args(
@@ -359,10 +353,7 @@ class SRv6:
:type node: dict
"""
cmd = u"sr_steering_pol_dump"
- err_msg = f"Failed to get SR localSID dump on host {node[u'host']}"
-
- with PapiSocketExecutor(node) as papi_exec:
- papi_exec.add(cmd).get_details(err_msg)
+ PapiSocketExecutor.dump_and_log(node, (cmd,))
@staticmethod
def set_sr_encaps_source_address(node, ip6_addr):