X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Ftopology.py;h=8b6905d7e109ad073b0cf22c777b953953c3aaba;hp=6a7ea798ccc3d835d5eb59f50be92603c506be2d;hb=da15035461569ea175aabbac1df735cd5598b0b3;hpb=da23519d72dc9415b112f7bab1fd3617750fa79e diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py index 6a7ea798cc..8b6905d7e1 100644 --- a/resources/libraries/python/topology.py +++ b/resources/libraries/python/topology.py @@ -647,3 +647,20 @@ class Topology(object): 'DUT1_BD_LINKS': dut1_bd_links, 'DUT2_BD_LINKS': dut2_bd_links} return topology_links + + @staticmethod + def is_tg_node(node): + """Find out whether the node is TG + + :param node: node to examine + :return: True if node is type of TG; False otherwise + """ + return node['type'] == NodeType.TG + + @staticmethod + def get_node_hostname(node): + """ + :param node: node dictionary + :return: host name as 'str' type + """ + return node['host'] \ No newline at end of file