Class OvsdbItUtils


  • public class OvsdbItUtils
    extends Object
    This class contains various utility methods used in OVSDB integration tests (IT).
    • Constructor Summary

      Constructors 
      Constructor Description
      OvsdbItUtils​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker)
      Create a new OvsdbItUtils instance.
    • Constructor Detail

      • OvsdbItUtils

        public OvsdbItUtils​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker)
        Create a new OvsdbItUtils instance.
        Parameters:
        dataBroker - md-sal data broker
    • Method Detail

      • createNodeInfo

        public NodeInfo createNodeInfo​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ConnectionInfo connectionInfo,
                                       List<org.opendaylight.ovsdb.utils.mdsal.utils.NotifyingDataChangeListener> waitList)
        Get a NodeInfo instance initialized with this ItUtil's DataBroker.
        Parameters:
        connectionInfo - ConnectionInfo for the OVSDB server
        waitList - For tracking outstanding md-sal events notifications
        Returns:
        a new NodeInfo object
      • isControllerConnected

        public boolean isControllerConnected​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ConnectionInfo connectionInfo)
                                      throws InterruptedException
        Checks whether the OVSDB controller is connected. This method will retry 10 times and will through an AssertionError for any number of unexpected states.
        Parameters:
        connectionInfo - where to connect to
        Returns:
        true if connected
        Throws:
        InterruptedException - if interrupted while waiting for connection to appear