Class OnmsNode

    • Constructor Detail

      • OnmsNode

        public OnmsNode()

        Constructor for OnmsNode. This constructor should only be used by JAXB and by unit tests that do not need to persist the OnmsNode in the database. It does not associate the OnmsNode with a required OnmsMonitoringLocation.

      • OnmsNode

        public OnmsNode​(OnmsMonitoringLocation location)

        Constructor for OnmsNode.

        Parameters:
        location - The location where this node is located
      • OnmsNode

        public OnmsNode​(OnmsMonitoringLocation location,
                        String label)

        Constructor for OnmsNode.

        Parameters:
        location - The location where this node is located
        label - The node label
    • Method Detail

      • getId

        public Integer getId()
        Unique identifier for node.
        Returns:
        a Integer object.
      • getNodeId

        public String getNodeId()

        getNodeId

        Returns:
        a String object.
      • setId

        public void setId​(Integer nodeid)

        setId

        Parameters:
        nodeid - a Integer object.
      • setNodeId

        public void setNodeId​(String nodeid)

        setNodeId

        Parameters:
        nodeid - a String object.
      • getCreateTime

        public Date getCreateTime()
        Time node was added to the database.
        Returns:
        a Date object.
        Hibernate property:
        column="nodecreatetime" length="8" not-null="true"
      • setCreateTime

        public void setCreateTime​(Date nodecreatetime)

        setCreateTime

        Parameters:
        nodecreatetime - a Date object.
      • getParent

        public OnmsNode getParent()
        In the case that the node is virtual or an independent device in a chassis that should be reflected as a subcomponent or "child", this field reflects the nodeID of the chassis/physical node/"parent" device.
        Returns:
        a OnmsNode object.
      • setParent

        public void setParent​(OnmsNode parent)

        setParent

        Parameters:
        parent - a OnmsNode object.
      • getType

        public OnmsNode.NodeType getType()
        Flag indicating status of node - 'A' - active - 'D' - deleted TODO: Eventually this will be deprecated and deleted nodes will actually be deleted.
        Returns:
        a String object.
      • getSysObjectId

        public String getSysObjectId()
        SNMP MIB-2 system.sysObjectID.0
        Returns:
        a String object.
      • setSysObjectId

        public void setSysObjectId​(String nodesysoid)

        setSysObjectId

        Parameters:
        nodesysoid - a String object.
      • getSysName

        public String getSysName()
        SNMP MIB-2 system.sysName.0
        Returns:
        a String object.
      • setSysName

        public void setSysName​(String nodesysname)

        setSysName

        Parameters:
        nodesysname - a String object.
      • getHasFlows

        public boolean getHasFlows()
      • getHasIngressFlows

        public boolean getHasIngressFlows()
      • getHasEgressFlows

        public boolean getHasEgressFlows()
      • getLastIngressFlow

        public Date getLastIngressFlow()
      • setLastIngressFlow

        public void setLastIngressFlow​(Date lastIngressFlow)
      • getLastEgressFlow

        public Date getLastEgressFlow()
      • setLastEgressFlow

        public void setLastEgressFlow​(Date lastEgressFlow)
      • getSysDescription

        public String getSysDescription()
        SNMP MIB-2 system.sysDescr.0
        Returns:
        a String object.
      • setSysDescription

        public void setSysDescription​(String nodesysdescription)

        setSysDescription

        Parameters:
        nodesysdescription - a String object.
      • getSysLocation

        public String getSysLocation()
        SNMP MIB-2 system.sysLocation.0
        Returns:
        a String object.
      • setSysLocation

        public void setSysLocation​(String nodesyslocation)

        setSysLocation

        Parameters:
        nodesyslocation - a String object.
      • getSysContact

        public String getSysContact()
        SNMP MIB-2 system.sysContact.0
        Returns:
        a String object.
      • setSysContact

        public void setSysContact​(String nodesyscontact)

        setSysContact

        Parameters:
        nodesyscontact - a String object.
      • getLabel

        public String getLabel()
        User-friendly name associated with the node.
        Returns:
        a String object.
      • setLabel

        public void setLabel​(String nodelabel)

        setLabel

        Parameters:
        nodelabel - a String object.
      • getLabelSource

        public OnmsNode.NodeLabelSource getLabelSource()
        Flag indicating source of nodeLabel - 'U' = user defined - 'H' = IP hostname - 'S' = sysName - 'A' = IP address TODO: change this to an enum
        Returns:
        a String object.
      • setLabelSource

        public void setLabelSource​(OnmsNode.NodeLabelSource nodelabelsource)

        setLabelSource

        Parameters:
        nodelabelsource - a String object.
      • getNetBiosName

        public String getNetBiosName()
        NetBIOS workstation name associated with the node.
        Returns:
        a String object.
      • setNetBiosName

        public void setNetBiosName​(String nodenetbiosname)

        setNetBiosName

        Parameters:
        nodenetbiosname - a String object.
      • getNetBiosDomain

        public String getNetBiosDomain()
        NetBIOS domain name associated with the node.
        Returns:
        a String object.
      • setNetBiosDomain

        public void setNetBiosDomain​(String nodedomainname)

        setNetBiosDomain

        Parameters:
        nodedomainname - a String object.
      • getOperatingSystem

        public String getOperatingSystem()
        Operating system running on the node.
        Returns:
        a String object.
      • setOperatingSystem

        public void setOperatingSystem​(String operatingsystem)

        setOperatingSystem

        Parameters:
        operatingsystem - a String object.
      • getLastCapsdPoll

        public Date getLastCapsdPoll()
        Date and time of last Capsd scan.
        Returns:
        a Date object.
      • setLastCapsdPoll

        public void setLastCapsdPoll​(Date lastcapsdpoll)

        setLastCapsdPoll

        Parameters:
        lastcapsdpoll - a Date object.
      • getForeignId

        public String getForeignId()

        getForeignId

        Returns:
        a String object.
      • setForeignId

        public void setForeignId​(String foreignId)

        setForeignId

        Parameters:
        foreignId - a String object.
      • getForeignSource

        public String getForeignSource()

        getForeignSource

        Returns:
        a String object.
      • setForeignSource

        public void setForeignSource​(String foreignSource)

        setForeignSource

        Parameters:
        foreignSource - a String object.
      • setLocation

        public void setLocation​(OnmsMonitoringLocation location)
        Set the monitoring location that this node is located in.
      • setPathElement

        public void setPathElement​(PathElement pathElement)

        setPathElement

        Parameters:
        pathElement - a PathElement object.
      • getIpInterfaces

        public Set<OnmsIpInterface> getIpInterfaces()
        The interfaces on this node
        Returns:
        a Set object.
      • setIpInterfaces

        public void setIpInterfaces​(Set<OnmsIpInterface> ipinterfaces)

        setIpInterfaces

        Parameters:
        ipinterfaces - a Set object.
      • removeIpInterface

        public void removeIpInterface​(OnmsIpInterface iface)
      • getSnmpInterfaces

        public Set<OnmsSnmpInterface> getSnmpInterfaces()
        The information from the SNMP interfaces/ipAddrTables for the node
        Returns:
        a Set object.
      • setSnmpInterfaces

        public void setSnmpInterfaces​(Set<OnmsSnmpInterface> snmpinterfaces)

        setSnmpInterfaces

        Parameters:
        snmpinterfaces - a Set object.
      • getCategories

        public Set<OnmsCategory> getCategories()

        getCategories

        Returns:
        a Set object.
      • setCategories

        public void setCategories​(Set<OnmsCategory> categories)

        setCategories

        Parameters:
        categories - a Set object.
      • addCategory

        public boolean addCategory​(OnmsCategory category)

        addCategory

        Parameters:
        category - a OnmsCategory object.
        Returns:
        a boolean.
      • removeCategory

        public boolean removeCategory​(OnmsCategory category)

        removeCategory

        Parameters:
        category - a OnmsCategory object.
        Returns:
        a boolean.
      • hasCategory

        public boolean hasCategory​(String categoryName)

        hasCategory

        Parameters:
        categoryName - a String object.
        Returns:
        a boolean.
      • getRequisitionedCategories

        public Set<String> getRequisitionedCategories()
      • setRequisitionedCategories

        public void setRequisitionedCategories​(Set<String> categories)
      • addRequisitionedCategory

        public void addRequisitionedCategory​(String category)
      • removeRequisitionedCategory

        public void removeRequisitionedCategory​(String category)
      • removeMetaData

        public void removeMetaData​(String context,
                                   String key)
      • removeMetaData

        public void removeMetaData​(String context)
      • getRequisitionedMetaData

        public List<OnmsMetaData> getRequisitionedMetaData()
      • setRequisionedMetaData

        public void setRequisionedMetaData​(List<OnmsMetaData> requisitionedMetaData)
      • addRequisionedMetaData

        public void addRequisionedMetaData​(OnmsMetaData onmsMetaData)
      • isDown

        public boolean isDown()

        isDown

        Returns:
        a boolean.
      • getSnmpInterfaceWithIfIndex

        public OnmsSnmpInterface getSnmpInterfaceWithIfIndex​(int ifIndex)

        getSnmpInterfaceWithIfIndex

        Parameters:
        ifIndex - a int.
        Returns:
        a OnmsSnmpInterface object.
      • getPrimaryInterface

        public OnmsIpInterface getPrimaryInterface()

        getPrimaryInterface

        This function should be kept similar to IpInterfaceDao#findPrimaryInterfaceByNodeId().
        Returns:
        a OnmsIpInterface object.
      • mergeAgentAttributes

        public void mergeAgentAttributes​(OnmsNode scannedNode)

        mergeAgentAttributes

        Parameters:
        scannedNode - a OnmsNode object.
      • mergeNodeAttributes

        public void mergeNodeAttributes​(OnmsNode scannedNode,
                                        EventForwarder eventForwarder)

        mergeNodeAttributes

        Parameters:
        scannedNode - a OnmsNode object.
      • mergeSnmpInterfaces

        public void mergeSnmpInterfaces​(OnmsNode scannedNode,
                                        boolean deleteMissing)

        mergeSnmpInterfaces

        Parameters:
        scannedNode - a OnmsNode object.
        deleteMissing - a boolean.
      • mergeIpInterfaces

        public void mergeIpInterfaces​(OnmsNode scannedNode,
                                      EventForwarder eventForwarder,
                                      boolean deleteMissing)

        mergeIpInterfaces

        Parameters:
        scannedNode - a OnmsNode object.
        eventForwarder - a EventForwarder object.
        deleteMissing - a boolean.
      • mergeCategorySet

        public void mergeCategorySet​(OnmsNode scannedNode)

        mergeCategorySet

        Parameters:
        scannedNode - a OnmsNode object.
      • mergeAssets

        public void mergeAssets​(OnmsNode scannedNode)
        Truly merges the node's assert record
        Parameters:
        scannedNode - a OnmsNode object.
      • mergeMetaData

        public void mergeMetaData​(OnmsNode scanned)
        Truly merges the node's meta-data
        Parameters:
        scannedNode - a OnmsNode object.
      • replaceCurrentAssetRecord

        public void replaceCurrentAssetRecord​(OnmsNode scannedNode)
        Simply replaces the current asset record with the new record
        Parameters:
        scannedNode - a OnmsNode object.
      • mergeNode

        public void mergeNode​(OnmsNode scannedNode,
                              EventForwarder eventForwarder,
                              boolean deleteMissing)

        mergeNode

        Parameters:
        scannedNode - a OnmsNode object.
        eventForwarder - a EventForwarder object.
        deleteMissing - a boolean.
      • containsService

        public boolean containsService​(InetAddress addr,
                                       String service)
      • containsInterface

        public boolean containsInterface​(InetAddress addr)