Esempio n. 1
0
 public BridgeElement getBridgeElement() {
   BridgeElement bridge = new BridgeElement();
   bridge.setBaseBridgeAddress(getBridgeAddress());
   bridge.setBaseNumPorts(getNumberOfPorts());
   if (getBridgeType() != null) bridge.setBaseType(BridgeDot1dBaseType.get(getBridgeType()));
   if (getStpProtocolSpecification() != null) {
     bridge.setStpProtocolSpecification(
         BridgeDot1dStpProtocolSpecification.get(getStpProtocolSpecification()));
     bridge.setStpPriority(getStpPriority());
     bridge.setStpDesignatedRoot(getStpDesignatedRoot());
     bridge.setStpRootPort(getStpRootPort());
     bridge.setStpRootCost(getStpRootCost());
   }
   return bridge;
 }
Esempio n. 2
0
  public void merge(BridgeElement element) {
    // nodeid and vlan are unique primary key
    if (element == null) return;

    setBaseBridgeAddress(element.getBaseBridgeAddress());
    setBaseNumPorts(element.getBaseNumPorts());
    setBaseType(element.getBaseType());

    setStpProtocolSpecification(element.getStpProtocolSpecification());
    setStpPriority(element.getStpPriority());
    setStpDesignatedRoot(element.getStpDesignatedRoot());
    setStpRootCost(element.getStpRootCost());
    setStpRootPort(element.getStpRootPort());

    setBridgeNodeLastPollTime(element.getBridgeNodeCreateTime());
  }