summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/automation/trex_control_plane/client/trex_client.py140
-rwxr-xr-xscripts/automation/trex_control_plane/client_utils/general_utils.py2
-rwxr-xr-xscripts/automation/trex_control_plane/client_utils/trex_yaml_gen.py8
-rwxr-xr-xscripts/automation/trex_control_plane/common/trex_exceptions.py34
-rwxr-xr-xscripts/automation/trex_control_plane/common/trex_status_e.py2
5 files changed, 93 insertions, 93 deletions
diff --git a/scripts/automation/trex_control_plane/client/trex_client.py b/scripts/automation/trex_control_plane/client/trex_client.py
index 56775766..c3677132 100755
--- a/scripts/automation/trex_control_plane/client/trex_client.py
+++ b/scripts/automation/trex_control_plane/client/trex_client.py
@@ -30,18 +30,18 @@ from distutils.util import strtobool
class CTRexClient(object):
"""
- This class defines the client side of the RESTfull interaction with T-Rex
+ This class defines the client side of the RESTfull interaction with TRex
"""
def __init__(self, trex_host, max_history_size = 100, trex_daemon_port = 8090, trex_zmq_port = 4500, verbose = False):
"""
- Instantiate a T-Rex client object, and connecting it to listening daemon-server
+ Instantiate a TRex client object, and connecting it to listening daemon-server
:parameters:
trex_host : str
- a string of the t-rex ip address or hostname.
+ a string of the TRex ip address or hostname.
max_history_size : int
- a number to set the maximum history size of a single T-Rex run. Each sampling adds a new item to history.
+ a number to set the maximum history size of a single TRex run. Each sampling adds a new item to history.
default value : **100**
trex_daemon_port : int
@@ -69,7 +69,7 @@ class CTRexClient(object):
self.result_obj = CTRexResult(max_history_size)
self.decoder = JSONDecoder()
self.trex_server_path = "http://{hostname}:{port}/".format( hostname = trex_host, port = trex_daemon_port )
- self.__verbose_print("Connecting to T-Rex @ {trex_path} ...".format( trex_path = self.trex_server_path ) )
+ self.__verbose_print("Connecting to TRex @ {trex_path} ...".format( trex_path = self.trex_server_path ) )
self.history = jsonrpclib.history.History()
self.server = jsonrpclib.Server(self.trex_server_path, history = self.history)
self.check_server_connectivity()
@@ -90,7 +90,7 @@ class CTRexClient(object):
def start_trex (self, f, d, block_to_success = True, timeout = 30, user = None, **trex_cmd_options):
"""
- Request to start a T-Rex run on server.
+ Request to start a TRex run on server.
:parameters:
f : str
@@ -98,17 +98,17 @@ class CTRexClient(object):
d : int
the desired duration of the test. must be at least 30 seconds long.
block_to_success : bool
- determine if this method blocks until T-Rex changes state from 'Starting' to either 'Idle' or 'Running'
+ determine if this method blocks until TRex changes state from 'Starting' to either 'Idle' or 'Running'
default value : **True**
timeout : int
- maximum time (in seconds) to wait in blocking state until T-Rex changes state from 'Starting' to either 'Idle' or 'Running'
+ maximum time (in seconds) to wait in blocking state until TRex changes state from 'Starting' to either 'Idle' or 'Running'
default value: **30**
user : str
the identity of the the run issuer.
trex_cmd_options : key, val
- sets desired T-Rex options using key=val syntax, separated by comma.
+ sets desired TRex options using key=val syntax, separated by comma.
for keys with no value, state key=True
:return:
@@ -117,8 +117,8 @@ class CTRexClient(object):
:raises:
+ :exc:`ValueError`, in case 'd' parameter inserted with wrong value.
+ :exc:`trex_exceptions.TRexError`, in case one of the trex_cmd_options raised an exception at server.
- + :exc:`trex_exceptions.TRexInUseError`, in case T-Rex is already taken.
- + :exc:`trex_exceptions.TRexRequestDenied`, in case T-Rex is reserved for another user than the one trying start T-Rex.
+ + :exc:`trex_exceptions.TRexInUseError`, in case TRex is already taken.
+ + :exc:`trex_exceptions.TRexRequestDenied`, in case TRex is reserved for another user than the one trying start TRex.
+ ProtocolError, in case of error in JSON-RPC protocol.
"""
@@ -128,7 +128,7 @@ class CTRexClient(object):
if d < 30: # specify a test should take at least 30 seconds long.
raise ValueError
except ValueError:
- raise ValueError('d parameter must be integer, specifying how long T-Rex run, and must be larger than 30 secs.')
+ raise ValueError('d parameter must be integer, specifying how long TRex run, and must be larger than 30 secs.')
trex_cmd_options.update( {'f' : f, 'd' : d} )
@@ -146,25 +146,25 @@ class CTRexClient(object):
if retval!=0:
self.seq = retval # update seq num only on successful submission
return True
- else: # T-Rex is has been started by another user
- raise TRexInUseError('T-Rex is already being used by another user or process. Try again once T-Rex is back in IDLE state.')
+ else: # TRex is has been started by another user
+ raise TRexInUseError('TRex is already being used by another user or process. Try again once TRex is back in IDLE state.')
def stop_trex (self):
"""
- Request to stop a T-Rex run on server.
+ Request to stop a TRex run on server.
- The request is only valid if the stop initiator is the same client as the T-Rex run initiator.
+ The request is only valid if the stop initiator is the same client as the TRex run initiator.
:parameters:
None
:return:
+ **True** on successful termination
- + **False** if request issued but T-Rex wasn't running.
+ + **False** if request issued but TRex wasn't running.
:raises:
- + :exc:`trex_exceptions.TRexRequestDenied`, in case T-Rex ir running but started by another user.
- + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed T-Rex run (unexpected termination).
+ + :exc:`trex_exceptions.TRexRequestDenied`, in case TRex ir running but started by another user.
+ + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed TRex run (unexpected termination).
+ ProtocolError, in case of error in JSON-RPC protocol.
"""
@@ -179,16 +179,16 @@ class CTRexClient(object):
def force_kill (self, confirm = True):
"""
- Force killing of running T-Rex process (if exists) on the server.
+ Force killing of running TRex process (if exists) on the server.
.. tip:: This method is a safety method and **overrides any running or reserved resources**, and as such isn't designed to be used on a regular basis.
Always consider using :func:`trex_client.CTRexClient.stop_trex` instead.
- In the end of this method, T-Rex will return to IDLE state with no reservation.
+ In the end of this method, TRex will return to IDLE state with no reservation.
:parameters:
confirm : bool
- Prompt a user confirmation before continue terminating T-Rex session
+ Prompt a user confirmation before continue terminating TRex session
:return:
+ **True** on successful termination
@@ -199,7 +199,7 @@ class CTRexClient(object):
"""
if confirm:
- prompt = "WARNING: This will terminate active T-Rex session indiscriminately.\nAre you sure? "
+ prompt = "WARNING: This will terminate active TRex session indiscriminately.\nAre you sure? "
sys.stdout.write('%s [y/n]\n' % prompt)
while True:
try:
@@ -221,20 +221,20 @@ class CTRexClient(object):
def wait_until_kickoff_finish(self, timeout = 40):
"""
- Block the client application until T-Rex changes state from 'Starting' to either 'Idle' or 'Running'
+ Block the client application until TRex changes state from 'Starting' to either 'Idle' or 'Running'
- The request is only valid if the stop initiator is the same client as the T-Rex run initiator.
+ The request is only valid if the stop initiator is the same client as the TRex run initiator.
:parameters:
timeout : int
- maximum time (in seconds) to wait in blocking state until T-Rex changes state from 'Starting' to either 'Idle' or 'Running'
+ maximum time (in seconds) to wait in blocking state until TRex changes state from 'Starting' to either 'Idle' or 'Running'
:return:
+ **True** on successful termination
- + **False** if request issued but T-Rex wasn't running.
+ + **False** if request issued but TRex wasn't running.
:raises:
- + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed T-Rex run (unexpected termination).
+ + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed TRex run (unexpected termination).
+ ProtocolError, in case of error in JSON-RPC protocol.
.. note:: Exceptions are throws only when start_trex did not block in the first place, i.e. `block_to_success` parameter was set to `False`
@@ -252,22 +252,22 @@ class CTRexClient(object):
def is_running (self, dump_out = False):
"""
- Poll for T-Rex running status.
+ Poll for TRex running status.
- If T-Rex is running, a history item will be added into result_obj and processed.
+ If TRex is running, a history item will be added into result_obj and processed.
- .. tip:: This method is especially useful for iterating until T-Rex run is finished.
+ .. tip:: This method is especially useful for iterating until TRex run is finished.
:parameters:
dump_out : dict
if passed, the pointer object is cleared and the latest dump stored in it.
:return:
- + **True** if T-Rex is running.
- + **False** if T-Rex is not running.
+ + **True** if TRex is running.
+ + **False** if TRex is not running.
:raises:
- + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed T-Rex run (unexpected termination).
+ + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed TRex run (unexpected termination).
+ :exc:`TypeError`, in case JSON stream decoding error.
+ ProtocolError, in case of error in JSON-RPC protocol.
@@ -292,7 +292,7 @@ class CTRexClient(object):
def get_trex_files_path (self):
"""
- Fetches the local path in which files are stored when pushed to t-rex server from client.
+ Fetches the local path in which files are stored when pushed to TRex server from client.
:parameters:
None
@@ -300,7 +300,7 @@ class CTRexClient(object):
:return:
string representation of the desired path
- .. note:: The returned path represents a path on the T-Rex server **local machine**
+ .. note:: The returned path represents a path on the TRex server **local machine**
:raises:
ProtocolError, in case of error in JSON-RPC protocol.
@@ -317,7 +317,7 @@ class CTRexClient(object):
def get_running_status (self):
"""
- Fetches the current T-Rex status.
+ Fetches the current TRex status.
If available, a verbose data will accompany the state itself.
@@ -344,18 +344,18 @@ class CTRexClient(object):
def get_running_info (self):
"""
- Performs single poll of T-Rex running data and process it into the result object (named `result_obj`).
+ Performs single poll of TRex running data and process it into the result object (named `result_obj`).
- .. tip:: This method will throw an exception if T-Rex isn't running. Always consider using :func:`trex_client.CTRexClient.is_running` which handles a single poll operation in safer manner.
+ .. tip:: This method will throw an exception if TRex isn't running. Always consider using :func:`trex_client.CTRexClient.is_running` which handles a single poll operation in safer manner.
:parameters:
None
:return:
- dictionary containing the most updated data dump from T-Rex.
+ dictionary containing the most updated data dump from TRex.
:raises:
- + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed T-Rex run (unexpected termination).
+ + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed TRex run (unexpected termination).
+ :exc:`TypeError`, in case JSON stream decoding error.
+ ProtocolError, in case of error in JSON-RPC protocol.
@@ -379,7 +379,7 @@ class CTRexClient(object):
def sample_until_condition (self, condition_func, time_between_samples = 5):
"""
- Automatically sets ongoing sampling of T-Rex data, with sampling rate described by time_between_samples.
+ Automatically sets ongoing sampling of TRex data, with sampling rate described by time_between_samples.
On each fetched dump, the condition_func is applied on the result objects, and if returns True, the sampling will stop.
@@ -394,36 +394,36 @@ class CTRexClient(object):
default value : **5**
:return:
- the first result object (see :class:`CTRexResult` for further details) of the T-Rex run on which the condition has been met.
+ the first result object (see :class:`CTRexResult` for further details) of the TRex run on which the condition has been met.
:raises:
+ :exc:`UserWarning`, in case the condition_func method condition hasn't been met
- + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed T-Rex run (unexpected termination).
+ + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed TRex run (unexpected termination).
+ :exc:`TypeError`, in case JSON stream decoding error.
+ ProtocolError, in case of error in JSON-RPC protocol.
+ :exc:`Exception`, in case the condition_func suffered from any kind of exception
"""
- # make sure T-Rex is running. raise exceptions here if any
+ # make sure TRex is running. raise exceptions here if any
self.wait_until_kickoff_finish()
try:
while self.is_running():
results = self.get_result_obj()
if condition_func(results):
- # if condition satisfied, stop T-Rex and return result object
+ # if condition satisfied, stop TRex and return result object
self.stop_trex()
return results
time.sleep(time_between_samples)
except TRexWarning:
# means we're back to Idle state, and didn't meet our condition
- raise UserWarning("T-Rex results condition wasn't met during T-Rex run.")
+ raise UserWarning("TRex results condition wasn't met during TRex run.")
except Exception:
# this could come from provided method 'condition_func'
raise
def sample_to_run_finish (self, time_between_samples = 5):
"""
- Automatically sets automatically sampling of T-Rex data with sampling rate described by time_between_samples until T-Rex run finished.
+ Automatically sets automatically sampling of TRex data with sampling rate described by time_between_samples until TRex run finished.
:parameters:
time_between_samples : int
@@ -436,7 +436,7 @@ class CTRexClient(object):
:raises:
+ :exc:`UserWarning`, in case the condition_func method condition hasn't been met
- + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed T-Rex run (unexpected termination).
+ + :exc:`trex_exceptions.TRexIncompleteRunError`, in case one of failed TRex run (unexpected termination).
+ :exc:`TypeError`, in case JSON stream decoding error.
+ ProtocolError, in case of error in JSON-RPC protocol.
@@ -475,13 +475,13 @@ class CTRexClient(object):
def is_reserved (self):
"""
- Checks if T-Rex is currently reserved to any user or not.
+ Checks if TRex is currently reserved to any user or not.
:parameters:
None
:return:
- + **True** if T-Rex is reserved.
+ + **True** if TRex is reserved.
+ **False** otherwise.
:raises:
@@ -499,13 +499,13 @@ class CTRexClient(object):
def reserve_trex (self, user = None):
"""
- Reserves the usage of T-Rex to a certain user.
+ Reserves the usage of TRex to a certain user.
- When T-Rex is reserved, it can't be reserved.
+ When TRex is reserved, it can't be reserved.
:parameters:
user : str
- a username of the desired owner of T-Rex
+ a username of the desired owner of TRex
default: current logged user
@@ -513,8 +513,8 @@ class CTRexClient(object):
**True** if reservation made successfully
:raises:
- + :exc:`trex_exceptions.TRexRequestDenied`, in case T-Rex is reserved for another user than the one trying to make the reservation.
- + :exc:`trex_exceptions.TRexInUseError`, in case T-Rex is currently running.
+ + :exc:`trex_exceptions.TRexRequestDenied`, in case TRex is reserved for another user than the one trying to make the reservation.
+ + :exc:`trex_exceptions.TRexInUseError`, in case TRex is currently running.
+ ProtocolError, in case of error in JSON-RPC protocol.
"""
@@ -530,14 +530,14 @@ class CTRexClient(object):
def cancel_reservation (self, user = None):
"""
- Cancels a current reservation of T-Rex to a certain user.
+ Cancels a current reservation of TRex to a certain user.
- When T-Rex is reserved, no other user can start new T-Rex runs.
+ When TRex is reserved, no other user can start new TRex runs.
:parameters:
user : str
- a username of the desired owner of T-Rex
+ a username of the desired owner of TRex
default: current logged user
@@ -546,7 +546,7 @@ class CTRexClient(object):
+ **False** if there was no reservation at all.
:raises:
- + :exc:`trex_exceptions.TRexRequestDenied`, in case T-Rex is reserved for another user than the one trying to cancel the reservation.
+ + :exc:`trex_exceptions.TRexRequestDenied`, in case TRex is reserved for another user than the one trying to cancel the reservation.
+ ProtocolError, in case of error in JSON-RPC protocol.
"""
@@ -627,7 +627,7 @@ class CTRexClient(object):
return method_to_call()
except socket.error as e:
if e.errno == errno.ECONNREFUSED:
- raise SocketError(errno.ECONNREFUSED, "Connection from T-Rex server was refused. Please make sure the server is up.")
+ raise SocketError(errno.ECONNREFUSED, "Connection from TRex server was refused. Please make sure the server is up.")
def check_server_connectivity (self):
"""
@@ -640,7 +640,7 @@ class CTRexClient(object):
raise socket.gaierror(e.errno, "Could not resolve server hostname. Please make sure hostname entered correctly.")
except socket.error as e:
if e.errno == errno.ECONNREFUSED:
- raise socket.error(errno.ECONNREFUSED, "Connection from T-Rex server was refused. Please make sure the server is up.")
+ raise socket.error(errno.ECONNREFUSED, "Connection from TRex server was refused. Please make sure the server is up.")
finally:
self.prompt_verbose_data()
@@ -671,7 +671,7 @@ class CTRexClient(object):
def _handle_AppError_exception(self, err):
"""
- This private method triggres the T-Rex dedicated exception generation in case a general ProtocolError has been raised.
+ This private method triggres the TRex dedicated exception generation in case a general ProtocolError has been raised.
"""
# handle known exceptions based on known error codes.
# if error code is not known, raise ProtocolError
@@ -680,17 +680,17 @@ class CTRexClient(object):
class CTRexResult(object):
"""
- A class containing all results received from T-Rex.
+ A class containing all results received from TRex.
Ontop to containing the results, this class offers easier data access and extended results processing options
"""
def __init__(self, max_history_size):
"""
- Instatiate a T-Rex result object
+ Instatiate a TRex result object
:parameters:
max_history_size : int
- a number to set the maximum history size of a single T-Rex run. Each sampling adds a new item to history.
+ a number to set the maximum history size of a single TRex run. Each sampling adds a new item to history.
"""
self._history = deque(maxlen = max_history_size)
@@ -749,7 +749,7 @@ class CTRexResult(object):
def get_avg_latency (self):
"""
- Fetches the average latency measured on each of the interfaces from the start of T-Rex run
+ Fetches the average latency measured on each of the interfaces from the start of TRex run
:parameters:
None
@@ -779,7 +779,7 @@ class CTRexResult(object):
def get_total_drops (self):
"""
- Fetches the total number of drops identified from the moment T-Rex run began.
+ Fetches the total number of drops identified from the moment TRex run began.
:parameters:
None
@@ -835,7 +835,7 @@ class CTRexResult(object):
def is_done_warmup (self):
"""
- Checks if T-Rex latest results TX-rate indicates that T-Rex has reached its expected TX-rate.
+ Checks if TRex latest results TX-rate indicates that TRex has reached its expected TX-rate.
:parameters:
None
@@ -856,7 +856,7 @@ class CTRexResult(object):
defines a path to desired data.
.. tip:: | Use '.' to enter one level deeper in dictionary hierarchy.
- | Use '[i]' to access the i'th indexed obejct of an array.
+ | Use '[i]' to access the i'th indexed object of an array.
tree_path_to_key : regex
apply a regex to filter results out from a multiple results set.
diff --git a/scripts/automation/trex_control_plane/client_utils/general_utils.py b/scripts/automation/trex_control_plane/client_utils/general_utils.py
index b5912628..5488b9dd 100755
--- a/scripts/automation/trex_control_plane/client_utils/general_utils.py
+++ b/scripts/automation/trex_control_plane/client_utils/general_utils.py
@@ -37,7 +37,7 @@ def find_path_to_pardir (pardir, base_path = os.getcwd() ):
"""
Finds the absolute path for some parent dir `pardir`, starting from base_path
- The request is only valid if the stop intitiator is the same client as the T-Rex run intitiator.
+ The request is only valid if the stop initiator is the same client as the TRex run initiator.
:parameters:
pardir : str
diff --git a/scripts/automation/trex_control_plane/client_utils/trex_yaml_gen.py b/scripts/automation/trex_control_plane/client_utils/trex_yaml_gen.py
index 755674ea..c26fef29 100755
--- a/scripts/automation/trex_control_plane/client_utils/trex_yaml_gen.py
+++ b/scripts/automation/trex_control_plane/client_utils/trex_yaml_gen.py
@@ -7,7 +7,7 @@ import os
class CTRexYaml(object):
"""
- This class functions as a YAML generator according to T-Rex YAML format.
+ This class functions as a YAML generator according to TRex YAML format.
CTRexYaml is compatible with both Python 2 and Python 3.
"""
@@ -38,7 +38,7 @@ class CTRexYaml(object):
:parameters:
trex_files_path : str
- a path (on T-Rex server side) for the pcap files using which T-Rex can access it.
+ a path (on TRex server side) for the pcap files using which TRex can access it.
"""
self.yaml_obj = list(CTRexYaml.YAML_TEMPLATE)
@@ -114,7 +114,7 @@ class CTRexYaml(object):
:parameters:
None
- :reaturn:
+ :return:
None
"""
@@ -193,7 +193,7 @@ class CTRexYaml(object):
"""
Returns a list of all files related to the YAML object, including the YAML filename itself.
- .. tip:: This method is especially useful for listing all the files that should be pushed to T-Rex server as part of the same yaml selection.
+ .. tip:: This method is especially useful for listing all the files that should be pushed to TRex server as part of the same yaml selection.
:parameters:
None
diff --git a/scripts/automation/trex_control_plane/common/trex_exceptions.py b/scripts/automation/trex_control_plane/common/trex_exceptions.py
index 1353fd00..0de38411 100755
--- a/scripts/automation/trex_control_plane/common/trex_exceptions.py
+++ b/scripts/automation/trex_control_plane/common/trex_exceptions.py
@@ -27,7 +27,7 @@ class RPCError(Exception):
class TRexException(RPCError):
"""
- This is the most general T-Rex exception.
+ This is the most general TRex exception.
All exceptions inherits from this class has an error code and a default message which describes the most common use case of the error.
@@ -35,55 +35,55 @@ class TRexException(RPCError):
"""
code = -10
- _default_message = 'T-Rex encountered an unexpected error. please contact T-Rex dev team.'
+ _default_message = 'TRex encountered an unexpected error. please contact TRex dev team.'
# api_name = 'TRex'
class TRexError(TRexException):
"""
- This is the most general T-Rex exception.
+ This is the most general TRex exception.
This exception isn't used by default and will only when an unrelated to ProtocolError will occur, and it can't be resolved to any of the deriviate exceptions.
"""
code = -11
- _default_message = 'T-Rex run failed due to wrong input parameters, or due to reachability issues.'
+ _default_message = 'TRex run failed due to wrong input parameters, or due to reachability issues.'
class TRexWarning(TRexException):
- """ Indicates a warning from T-Rex server. When this exception raises it normally used to indicate required data isn't ready yet """
+ """ Indicates a warning from TRex server. When this exception raises it normally used to indicate required data isn't ready yet """
code = -12
- _default_message = 'T-Rex is starting (data is not available yet).'
+ _default_message = 'TRex is starting (data is not available yet).'
class TRexRequestDenied(TRexException):
""" Indicates the desired reques was denied by the server """
code = -33
- _default_message = 'T-Rex desired request denied because the requested resource is already taken. Try again once T-Rex is back in IDLE state.'
+ _default_message = 'TRex desired request denied because the requested resource is already taken. Try again once TRex is back in IDLE state.'
class TRexInUseError(TRexException):
"""
- Indicates that T-Rex is currently in use
+ Indicates that TRex is currently in use
"""
code = -13
- _default_message = 'T-Rex is already being used by another user or process. Try again once T-Rex is back in IDLE state.'
+ _default_message = 'TRex is already being used by another user or process. Try again once TRex is back in IDLE state.'
class TRexRunFailedError(TRexException):
- """ Indicates that T-Rex has failed due to some reason. This Exception is used when T-Rex process itself terminates due to unknown reason """
+ """ Indicates that TRex has failed due to some reason. This Exception is used when TRex process itself terminates due to unknown reason """
code = -14
_default_message = ''
class TRexIncompleteRunError(TRexException):
"""
- Indicates that T-Rex has failed due to some reason.
- This Exception is used when T-Rex process itself terminated with error fault or it has been terminated by an external intervention in the OS.
+ Indicates that TRex has failed due to some reason.
+ This Exception is used when TRex process itself terminated with error fault or it has been terminated by an external intervention in the OS.
"""
code = -15
- _default_message = 'T-Rex run was terminated unexpectedly by outer process or by the hosting OS'
+ _default_message = 'TRex run was terminated unexpectedly by outer process or by the hosting OS'
EXCEPTIONS = [TRexException, TRexError, TRexWarning, TRexInUseError, TRexRequestDenied, TRexRunFailedError, TRexIncompleteRunError]
class CExceptionHandler(object):
"""
- CExceptionHandler is responsible for generating T-Rex API related exceptions in client side.
+ CExceptionHandler is responsible for generating TRex API related exceptions in client side.
"""
def __init__(self, exceptions):
"""
@@ -92,7 +92,7 @@ class CExceptionHandler(object):
:parameters:
exceptions : list
- a list of all T-Rex acceptable exception objects.
+ a list of all TRex acceptable exception objects.
default list:
- :exc:`trex_exceptions.TRexException`
@@ -113,7 +113,7 @@ class CExceptionHandler(object):
"""
Generates an exception based on a general ProtocolError exception object `err`.
- When T-Rex is reserved, no other user can start new T-Rex runs.
+ When TRex is reserved, no other user can start new TRex runs.
:parameters:
@@ -122,7 +122,7 @@ class CExceptionHandler(object):
a ProtocolError exception raised by :class:`trex_client.CTRexClient` class
:return:
- A T-Rex exception from the exception list defined in class creation.
+ A TRex exception from the exception list defined in class creation.
If such exception wasn't found, returns a TRexException exception
diff --git a/scripts/automation/trex_control_plane/common/trex_status_e.py b/scripts/automation/trex_control_plane/common/trex_status_e.py
index 34db9b39..3ad85014 100755
--- a/scripts/automation/trex_control_plane/common/trex_status_e.py
+++ b/scripts/automation/trex_control_plane/common/trex_status_e.py
@@ -4,5 +4,5 @@
from enum import Enum
-# define the states in which a T-Rex can hold during its lifetime
+# define the states in which a TRex can hold during its lifetime
TRexStatus = Enum('TRexStatus', 'Idle Starting Running')