X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Fhoneycomb%2FHcAPIKwInterfaces.py;h=afd6076c7b8b45c0967556777f4914e9bbbcc32c;hp=e2be81e87767bb8c9e913222699f2869cdaf9a5a;hb=95253bdf705a06ec01c2a04f437bae2ef23355c3;hpb=33e58e512b91d57f0ccab05d6e57de11d7c9fd37 diff --git a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py b/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py index e2be81e877..afd6076c7b 100644 --- a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py +++ b/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py @@ -300,6 +300,29 @@ class InterfaceKeywords(object): return InterfaceKeywords._set_interface_properties( node, interface, path, v3po_l2) + @staticmethod + def get_bd_oper_data_from_interface(node, interface): + """Returns operational data about bridge domain settings in the + interface. + + :param node: Honeycomb node. + :param interface: The name of interface. + :type interface: str + :type param: str + :return: Operational data about bridge domain settings in the + interface. + :rtype: dict + """ + + if_data = InterfaceKeywords.get_interface_oper_data(node, interface) + + if if_data: + try: + return if_data["v3po:l2"] + except KeyError: + return {} + return {} + @staticmethod def configure_interface_base(node, interface, param, value): """Configure the base parameters of interface.