public static Config SNMPPortToConfig(int portConfig) { Config config; //if ((SNMPPortConfig.SNMPPPC_PORT_DOWN.getValue() & portConfig) != 0) if(portConfig != Config.ADMIN_UP)//Bug fix: with the 'if' criteria, can't process correct, so I directly use this criteria config = new Config(Config.ADMIN_DOWN); else config = new Config(Config.ADMIN_UP); return config; }
private boolean isEnabled(NodeConnector nodeConnector) { if (nodeConnector == null) { return false; } Config config = (Config) getProp(nodeConnector, Config.ConfigPropName); //State state = (State) getProp(nodeConnector, State.StatePropName); return ((config != null) && (config.getValue() == Config.ADMIN_UP) /*&& (state != null) && (state.getValue() == State.EDGE_UP)*/); }
@Override public Boolean isNodeConnectorEnabled(NodeConnector nodeConnector) { if (nodeConnector == null) { return false; } Config config = (Config) getNodeConnectorProp(nodeConnector, Config.ConfigPropName); State state = (State) getNodeConnectorProp(nodeConnector, State.StatePropName); return ((config != null) && (config.getValue() == Config.ADMIN_UP) && (state != null) && (state.getValue() == State.EDGE_UP)); }
@Override public Config clone() { return new Config(this.configValue); }
private boolean isEnabled(NodeConnector nodeConnector) { if (nodeConnector == null) { return false; } Config config = (Config) getProp(nodeConnector, Config.ConfigPropName); State state = (State) getProp(nodeConnector, State.StatePropName); return ((config != null) && (config.getValue() == Config.ADMIN_UP) && (state != null) && (state.getValue() == State.EDGE_UP)); }
enabled = ((config != null) && (config.getValue() == Config.ADMIN_UP) /*&& (state != null) && (state.getValue() == State.EDGE_UP)*/);
if (((prop instanceof Config) && (((Config) prop).getValue() != Config.ADMIN_UP)) || ((prop instanceof State) && (((State) prop) .getValue() != State.EDGE_UP))) {
if (((prop instanceof Config) && (((Config) prop).getValue() != Config.ADMIN_UP)) || ((prop instanceof State) && (((State) prop) .getValue() != State.EDGE_UP))) {
Config config = (propMap == null) ? null : (Config) propMap.get(Config.ConfigPropName); if (config != null) { switch (config.getValue()) { case Config.ADMIN_DOWN: log.trace("Port {} is administratively down: uninstalling interested flows", nodeConnector);
enabled = ((config != null) && (config.getValue() == Config.ADMIN_UP) && (state != null) && (state.getValue() == State.EDGE_UP));