CHANGE: Add a global constant for the "protocolPluginType" key to prevent the key mispell issue again
Change-Id: Icb76cf8775881d41c1792e0c5ce59925276b7e8e
Signed-off-by: Alessandro Boch <aboch@cisco.com>
Dictionary<String, Object> props = new Hashtable<String, Object>();
// Set the protocolPluginType property which will be used
// by SAL
- props.put("protocolPluginType", Node.NodeIDType.OPENFLOW);
+ props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), Node.NodeIDType.OPENFLOW);
c.setInterface(IPluginInDataPacketService.class.getName(), props);
// Hook the services coming in from SAL, as optional in
// case SAL is not yet there, could happen
Dictionary<String, Object> props = new Hashtable<String, Object>();
// Set the protocolPluginType property which will be used
// by SAL
- props.put("protocolPluginType", Node.NodeIDType.OPENFLOW);
+ props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), Node.NodeIDType.OPENFLOW);
c.setInterface(IPluginInReadService.class.getName(), props);
c.add(createServiceDependency()
.setService(IPluginReadServiceFilter.class)
Dictionary<String, Object> props = new Hashtable<String, Object>();
// Set the protocolPluginType property which will be used
// by SAL
- props.put("protocolPluginType", Node.NodeIDType.OPENFLOW);
+ props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), Node.NodeIDType.OPENFLOW);
c.setInterface(IFlowProgrammerNotifier.class.getName(), props);
c.add(createContainerServiceDependency(containerName)
Dictionary<String, Object> props = new Hashtable<String, Object>();
// Set the protocolPluginType property which will be used
// by SAL
- props.put("protocolPluginType", Node.NodeIDType.OPENFLOW);
+ props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), Node.NodeIDType.OPENFLOW);
c.setInterface(
new String[] {
IPluginInFlowProgrammerService.class.getName(),
Dictionary<String, Object> props = new Hashtable<String, Object>();
// Set the protocolPluginType property which will be used
// by SAL
- props.put("protocolPluginType", "STUB");
+ props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), "STUB");
c.setInterface(IPluginInReadService.class.getName(), props);
}
Dictionary<String, Object> props = new Hashtable<String, Object>();
// Set the protocolPluginType property which will be used
// by SAL
- props.put("protocolPluginType", "STUB");
+ props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), "STUB");
c.setInterface(IPluginInInventoryService.class.getName(), props);
}
}
Dictionary<String, Object> props = new Hashtable<String, Object>();
// Set the protocolPluginType property which will be used
// by SAL
- props.put("protocolPluginType", "STUB");
+ props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), "STUB");
c.setInterface(IPluginInFlowProgrammerService.class.getName(), props);
}
if (imp.equals(StubNodeFactory.class)) {
Dictionary<String, Object> props = new Hashtable<String, Object>();
// Set the protocolPluginType property which will be used
// by SAL
- props.put("protocolPluginType", "STUB");
+ props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), "STUB");
props.put("protocolName", "STUB");
c.setInterface(INodeFactory.class.getName(), props);
}
Dictionary<String, Object> props = new Hashtable<String, Object>();
// Set the protocolPluginType property which will be used
// by SAL
- props.put("protocolPluginType", "STUB");
+ props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), "STUB");
props.put("protocolName", "STUB");
c.setInterface(INodeConnectorFactory.class.getName(), props);
}
CONTAINERNAME("name"),
STATICVLAN("staticvlan"),
CLUSTERINGSERVICES("clusteringservices"),
- STARTUPHOME("configuration/startup/");
+ STARTUPHOME("configuration/startup/"),
+ PROTOCOLPLUGINTYPE("protocolPluginType");
private GlobalConstants(String name) {
this.name = name;
* are done by the ComponentActivatorAbstractBase.
*
*/
+ @Override
public void init() {
}
* ComponentActivatorAbstractBase
*
*/
+ @Override
public void destroy() {
}
* instantiated in order to get an fully working implementation
* Object
*/
+ @Override
public Object[] getImplementations() {
Object[] res = { Topology.class, Inventory.class,
FlowProgrammerService.class, ReadService.class,
* per-container different behavior if needed, usually should not
* be the case though.
*/
+ @Override
public void configureInstance(Component c, Object imp, String containerName) {
if (imp.equals(Topology.class)) {
// export the service for Apps and Plugins
import org.opendaylight.controller.sal.packet.Packet;
import org.opendaylight.controller.sal.packet.PacketResult;
import org.opendaylight.controller.sal.packet.RawPacket;
+import org.opendaylight.controller.sal.utils.GlobalConstants;
import org.opendaylight.controller.sal.utils.NetUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
logger.trace("Prop key:({}) value:({})",entry.getKey(), entry.getValue());
}
- Object value = props.get("protocolPluginType");
+ Object value = props.get(GlobalConstants.PROTOCOLPLUGINTYPE.toString());
if (value instanceof String) {
type = (String) value;
}
logger.trace("Prop key:({}) value:({})",entry.getKey(), entry.getValue());
}
- Object value = props.get("protocoloPluginType");
+ Object value = props.get(GlobalConstants.PROTOCOLPLUGINTYPE.toString());
if (value instanceof String) {
type = (String) value;
}
import org.opendaylight.controller.sal.match.Match;
import org.opendaylight.controller.sal.match.MatchType;
import org.opendaylight.controller.sal.utils.EtherTypes;
+import org.opendaylight.controller.sal.utils.GlobalConstants;
import org.opendaylight.controller.sal.utils.IPProtocols;
import org.opendaylight.controller.sal.utils.NodeConnectorCreator;
import org.opendaylight.controller.sal.utils.Status;
entry.getValue());
}
- Object value = props.get("protocolPluginType");
+ Object value = props.get(GlobalConstants.PROTOCOLPLUGINTYPE.toString());
if (value instanceof String) {
type = (String) value;
}
entry.getValue());
}
- Object value = props.get("protocoloPluginType");
+ Object value = props.get(GlobalConstants.PROTOCOLPLUGINTYPE.toString());
if (value instanceof String) {
type = (String) value;
}
import org.opendaylight.controller.sal.reader.NodeDescription;
import org.opendaylight.controller.sal.reader.NodeTableStatistics;
import org.opendaylight.controller.sal.utils.EtherTypes;
+import org.opendaylight.controller.sal.utils.GlobalConstants;
import org.opendaylight.controller.sal.utils.IPProtocols;
import org.opendaylight.controller.sal.utils.NodeConnectorCreator;
import org.opendaylight.controller.sal.utils.NodeCreator;
entry.getValue());
}
- Object value = props.get("protocolPluginType");
+ Object value = props.get(GlobalConstants.PROTOCOLPLUGINTYPE.toString());
if (value instanceof String) {
type = (String) value;
}
entry.getValue());
}
- Object value = props.get("protocoloPluginType");
+ Object value = props.get(GlobalConstants.PROTOCOLPLUGINTYPE.toString());
if (value instanceof String) {
type = (String) value;
}