X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Ftopology.py;h=0214cc9c027d07d2e47c177770afc030ecdd5f5f;hb=4f70ebf481d496f91d2b1ec27361c9898b19c451;hp=3c903e5c94c1ac809f1d0307e3b3ec5fb54ca88f;hpb=d7e03f0eeeb599bd40b123123753ac41800bd3f5;p=csit.git diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py index 3c903e5c94..0214cc9c02 100644 --- a/resources/libraries/python/topology.py +++ b/resources/libraries/python/topology.py @@ -125,6 +125,19 @@ class Topology(object): """ node['interfaces'][iface_key]['vpp_sw_index'] = int(sw_if_index) + @staticmethod + def update_interface_name(node, iface_key, name): + """Update name on the interface from the node. + + :param node: Node to update name on. + :param iface_key: Topology key of the interface. + :param name: Interface name to store. + :type node: dict + :type iface_key: str + :type name: str + """ + node['interfaces'][iface_key]['name'] = str(name) + @staticmethod def update_interface_mac_address(node, iface_key, mac_address): """Update mac_address on the interface from the node.