Add tests for Honeycomb L2 FIB support
[csit.git] / resources / libraries / python / honeycomb / HcAPIKwInterfaces.py
index e2be81e..afd6076 100644 (file)
@@ -300,6 +300,29 @@ class InterfaceKeywords(object):
         return InterfaceKeywords._set_interface_properties(
             node, interface, path, v3po_l2)
 
         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.
     @staticmethod
     def configure_interface_base(node, interface, param, value):
         """Configure the base parameters of interface.