summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-12-21 12:03:25 +0200
committerimarom <imarom@cisco.com>2016-12-21 14:26:13 +0200
commitbf7c614dc174697b416eb3dfad515cedb104028b (patch)
tree96baa43bc014f325e8c150e68c83c182f0decd41 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
parenteae78d4356b8834b78a91c52d869a7949f8f3e90 (diff)
minor error checks refinements
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py18
1 files changed, 3 insertions, 15 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
index 4662768a..946c79dc 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
@@ -27,7 +27,6 @@ import json
import traceback
import os.path
-
############################ logger #############################
############################ #############################
############################ #############################
@@ -909,7 +908,7 @@ class STLClient(object):
if not rc:
return rc
-
+
# API sync
rc = self._transmit("api_sync", params = {'api_vers': self.api_vers}, api_class = None)
if not rc:
@@ -1708,7 +1707,6 @@ class STLClient(object):
self.logger.set_verbose(modes[level])
-
@__api_check(False)
def connect (self):
"""
@@ -1722,7 +1720,6 @@ class STLClient(object):
+ :exc:`STLError`
"""
-
rc = self.__connect()
if not rc:
raise STLError(rc)
@@ -3809,17 +3806,8 @@ class STLClient(object):
if not opts:
return opts
- ports = list_intersect(opts.ports, self.get_resolvable_ports())
- if not ports:
- if not opts.ports:
- msg = 'resolve - no ports with IPv4 destination'
- else:
- msg = 'pause - none of ports {0} are configured with IPv4 destination'.format(opts.ports)
-
- self.logger.log(msg)
- return RC_ERR(msg)
-
- self.resolve(ports = ports, retries = opts.retries)
+
+ self.resolve(ports = opts.ports, retries = opts.retries)
return RC_OK()