diff options
author | imarom <imarom@cisco.com> | 2016-12-25 12:54:09 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-12-25 13:50:56 +0200 |
commit | 34cb66c9f06c7a43e68a17b4a8802f8d34298a65 (patch) | |
tree | aa6b081213e5715cf09a18503cc7b0a20168c6fc /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py | |
parent | 549f2750ab22db5695a8d29575c136ab06e37235 (diff) |
refactor layer config on prot attributes
added guard against unconfigured MAC when going up with empty config
file
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-x | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py | 9 |
1 files changed, 7 insertions, 2 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 f86fff26..79ed3a36 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 @@ -1396,8 +1396,13 @@ class STLClient(object): def get_resolvable_ports (self): return [port_id for port_id, port_obj in self.ports.items() - if port_obj.is_acquired() and port_obj.get_dst_addr()['ipv4'] is not None] - + if port_obj.is_acquired() and port_obj.is_l3_mode()] + + def get_resolved_ports (self): + return [port_id + for port_id, port_obj in self.ports.items() + if port_obj.is_acquired() and port_obj.is_resolved()] + def get_service_enabled_ports(self): return [port_id |