Interface HostStore

    • Method Detail

      • createOrUpdateHost

        HostEvent createOrUpdateHost​(ProviderId providerId,
                                     HostId hostId,
                                     HostDescription hostDescription,
                                     boolean replaceIps)
        Creates a new host or updates the existing one based on the specified description.
        Parameters:
        providerId - provider identification
        hostId - host identification
        hostDescription - host description data
        replaceIps - replace IP set if true, merge IP set otherwise
        Returns:
        appropriate event or null if no change resulted
      • removeHost

        HostEvent removeHost​(HostId hostId)
        Removes the specified host from the inventory.
        Parameters:
        hostId - host identification
        Returns:
        remove event or null if host was not found
      • removeIp

        HostEvent removeIp​(HostId hostId,
                           IpAddress ipAddress)
        Removes the specified ip from the host entry.
        Parameters:
        hostId - host identification
        ipAddress - ipAddress to be removed
        Returns:
        remove event or null if host was not found
      • appendLocation

        void appendLocation​(HostId hostId,
                            HostLocation location)
        Append the specified location to the host entry.
        Parameters:
        hostId - host identification
        location - location to be added
      • removeLocation

        void removeLocation​(HostId hostId,
                            HostLocation location)
        Removes the specified location from the host entry.
        Parameters:
        hostId - host identification
        location - location to be removed
      • getHostCount

        int getHostCount()
        Returns the number of hosts in the store.
        Returns:
        host count
      • getHosts

        java.lang.Iterable<Host> getHosts()
        Returns a collection of all hosts in the store.
        Returns:
        iterable collection of all hosts
      • getHost

        Host getHost​(HostId hostId)
        Returns the host with the specified identifer.
        Parameters:
        hostId - host identification
        Returns:
        host or null if not found
      • getHosts

        java.util.Set<Host> getHosts​(VlanId vlanId)
        Returns the set of all hosts within the specified VLAN.
        Parameters:
        vlanId - vlan id
        Returns:
        set of hosts in the vlan
      • getHosts

        java.util.Set<Host> getHosts​(MacAddress mac)
        Returns the set of hosts with the specified MAC address.
        Parameters:
        mac - mac address
        Returns:
        set of hosts with the given mac
      • getHosts

        java.util.Set<Host> getHosts​(IpAddress ip)
        Returns the set of hosts with the specified IP address.
        Parameters:
        ip - ip address
        Returns:
        set of hosts with the given IP
      • getConnectedHosts

        java.util.Set<Host> getConnectedHosts​(ConnectPoint connectPoint)
        Returns the set of hosts that attach to the specified connection point.
        Parameters:
        connectPoint - connection point
        Returns:
        set of hosts
      • getConnectedHosts

        java.util.Set<Host> getConnectedHosts​(DeviceId deviceId)
        Returns the set of hosts that attach to the specified device.
        Parameters:
        deviceId - infrastructure device identifier
        Returns:
        set of hosts
      • addPendingHostLocation

        default MacAddress addPendingHostLocation​(HostId hostId,
                                                  ConnectPoint connectPoint,
                                                  ProbeMode probeMode)
        Notifies HostStore the beginning of pending host location verification and retrieves the unique MAC address for the probe.
        Parameters:
        hostId - ID of the host
        connectPoint - the connect point that is under verification
        probeMode - probe mode
        Returns:
        probeMac, the source MAC address ONOS uses to probe the host
      • removePendingHostLocation

        default void removePendingHostLocation​(MacAddress probeMac)
        Notifies HostStore the end of pending host location verification.
        Parameters:
        probeMac - the source MAC address ONOS uses to probe the host
      • suspend

        default void suspend​(HostId id)
        Update the host to suspended state to true denotes host is in suspended state.
        Parameters:
        id - ID of the host
      • unsuspend

        default void unsuspend​(HostId id)
        Update the host suspended state to false denotes host is in unsuspended state.
        Parameters:
        id - ID of the host