use of org.opennms.netmgt.model.NetworkBuilder in project opennms by OpenNMS.
the class Nms7918NetworkBuilder method buildNetwork7918.
public void buildNetwork7918() {
NetworkBuilder nb = getNetworkBuilder();
nb.addNode(PE01_NAME).setForeignSource("linkd").setForeignId(PE01_NAME).setSysObjectId(PE01_SYSOID).setType(NodeType.ACTIVE);
nb.addInterface(PE01_IP).setIsSnmpPrimary("P").setIsManaged("M");
m_nodeDao.save(nb.getCurrentNode());
nb.addNode(ASW01_NAME).setForeignSource("linkd").setForeignId(ASW01_NAME).setSysObjectId(ASW01_SYSOID).setType(NodeType.ACTIVE);
nb.addInterface(ASW01_IP).setIsSnmpPrimary("P").setIsManaged("M");
m_nodeDao.save(nb.getCurrentNode());
m_nodeDao.flush();
nb.addNode(OSPESS01_NAME).setForeignSource("linkd").setForeignId(OSPESS01_NAME).setSysObjectId(OSPESS01_SYSOID).setType(NodeType.ACTIVE);
nb.addInterface(OSPESS01_IP).setIsSnmpPrimary("P").setIsManaged("M");
m_nodeDao.save(nb.getCurrentNode());
m_nodeDao.flush();
nb.addNode(OSPWL01_NAME).setForeignSource("linkd").setForeignId(OSPWL01_NAME).setSysObjectId(OSPWL01_SYSOID).setType(NodeType.ACTIVE);
nb.addInterface(OSPWL01_IP).setIsSnmpPrimary("P").setIsManaged("M");
m_nodeDao.save(nb.getCurrentNode());
m_nodeDao.flush();
nb.addNode(SAMASW01_NAME).setForeignSource("linkd").setForeignId(SAMASW01_NAME).setSysObjectId(SAMASW01_SYSOID).setType(NodeType.ACTIVE);
nb.addInterface(SAMASW01_IP).setIsSnmpPrimary("P").setIsManaged("M");
m_nodeDao.save(nb.getCurrentNode());
m_nodeDao.flush();
nb.addNode(STCASW01_NAME).setForeignSource("linkd").setForeignId(STCASW01_NAME).setSysObjectId(STCASW01_SYSOID).setType(NodeType.ACTIVE);
nb.addInterface(STCASW01_IP).setIsSnmpPrimary("P").setIsManaged("M");
m_nodeDao.save(nb.getCurrentNode());
m_nodeDao.flush();
}
use of org.opennms.netmgt.model.NetworkBuilder in project opennms by OpenNMS.
the class NmsNetworkBuilder method getNodeWithoutSnmp.
public OnmsNode getNodeWithoutSnmp(String name, String ipaddr) {
NetworkBuilder nb = getNetworkBuilder();
nb.addNode(name).setForeignSource("linkd").setForeignId(name).setType(NodeType.ACTIVE);
nb.addInterface(ipaddr).setIsSnmpPrimary("N").setIsManaged("M");
return nb.getCurrentNode();
}
Aggregations