diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-04-11 01:47:32 +0300 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-04-11 01:47:32 +0300 |
commit | af49c70aaaecb897c7d3b4bddb18f504d32b0546 (patch) | |
tree | 4b30e6a2533379fd3febd512aab4e6bc359c7ba7 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py | |
parent | 9b790cd6df9545ad69515560f6af62a6638a4093 (diff) |
hltapi stream stats, port tx/rx graphs at console
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py index cd15b831..f3ac5c65 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py @@ -139,4 +139,16 @@ def validate_type(arg_name, arg, valid_types): def verify_exclusive_arg (args_list): if not (len(list(filter(lambda x: x is not None, args_list))) == 1): raise STLError('exactly one parameter from {0} should be provided'.format(args_list)) - + + +# shows as 'N/A', but does not let any compares for user to not mistake in automation +class StatNotAvailable(object): + def __init__(self, stat_name): + self.stat_name = stat_name + + def __repr__(self, *args, **kwargs): + return 'N/A' + + def __cmp__(self, *args, **kwargs): + raise Exception("Stat '%s' not available at this setup" % self.stat_name) + |