diff --git a/src/main/java/net/floodlightcontroller/restserver/RestApiServer.java b/src/main/java/net/floodlightcontroller/restserver/RestApiServer.java index 9973e0b319a4ec47d367856503cab6a5a707041d..307577161daed30e6eca1f52eff040a758485911 100644 --- a/src/main/java/net/floodlightcontroller/restserver/RestApiServer.java +++ b/src/main/java/net/floodlightcontroller/restserver/RestApiServer.java @@ -113,6 +113,11 @@ public class RestApiServer fmlContext.getServiceImpl(s)); } + /* + * Specifically add the FML for use by the REST API's /wm/core/modules/... + */ + context.getAttributes().put(fmlContext.getModuleLoader().getClass().getCanonicalName(), fmlContext.getModuleLoader()); + // Start listening for REST requests try { final Component component = new Component(); diff --git a/src/main/java/net/floodlightcontroller/testmodule/TestModule.java b/src/main/java/net/floodlightcontroller/testmodule/TestModule.java index 3c345ce6ab6ab0042b1818f456417f0884d6abd3..e72a250589d927584bc7a5f63a7173a69da2ad85 100644 --- a/src/main/java/net/floodlightcontroller/testmodule/TestModule.java +++ b/src/main/java/net/floodlightcontroller/testmodule/TestModule.java @@ -18,6 +18,7 @@ import org.projectfloodlight.openflow.protocol.OFMeterModCommand; import org.projectfloodlight.openflow.protocol.OFOxmClass; import org.projectfloodlight.openflow.protocol.OFPortDesc; import org.projectfloodlight.openflow.protocol.OFSetConfig; +import org.projectfloodlight.openflow.protocol.OFTableConfig; import org.projectfloodlight.openflow.protocol.OFTableFeaturePropWriteActions; import org.projectfloodlight.openflow.protocol.OFTableFeaturePropWriteSetfield; import org.projectfloodlight.openflow.protocol.OFTableMod; @@ -140,13 +141,11 @@ public class TestModule implements IFloodlightModule, IOFSwitchListener { .setCommand(0) .build(); */ - /*HashSet<OFTableModPropEvictionFlag> efs = new HashSet<OFTableModPropEvictionFlag>(); - efs.add(OFTableModPropEvictionFlag.IMPORTANCE); + /*HashSet<OFTableConfig> tblCfg = new HashSet<OFTableConfig>(); + tblCfg.add(OFTableConfig.TABLE_MISS_CONTROLLER); ArrayList<OFTableModProp> tabModPropList = new ArrayList<OFTableModProp>(); - OFTableFeaturePropWriteActions propEvic = switchService.getActiveSwitch(switchId).getOFFactory().buildTableFeaturePropWriteActions() - .setActionIds(actionIds) - .build(); + OFTableModProp propEvic = switchService.getActiveSwitch(switchId).getOFFactory().tableDesc(TableId.ALL, arg1) tabModPropList.add(propEvic); OFTableMod tm = switchService.getActiveSwitch(switchId).getOFFactory().buildTableMod() .setProperties(pro) diff --git a/src/main/resources/web/js/models/switchmodel.js b/src/main/resources/web/js/models/switchmodel.js index 785e1f6464beac7e54ad13cba154ec656eb664d6..fc47aea603e02df545cade15f21737c8ea0ee49b 100644 --- a/src/main/resources/web/js/models/switchmodel.js +++ b/src/main/resources/web/js/models/switchmodel.js @@ -186,13 +186,13 @@ window.Switch = Backbone.Model.extend({ f.applyActionText = ''; f.writeActionText = ''; if(f.hasOwnProperty('instructions')) { - if(f.instructions.hasOwnProperty('apply_actions')) { - _.each(f.instructions.apply_actions, function(value, key) { + if(f.instructions.hasOwnProperty('instruction_apply_actions')) { + _.each(f.instructions.instruction_apply_actions, function(value, key) { f.applyActionText += key + ":" + value +" "; },f); } - if(f.instructions.hasOwnProperty('write_actions')) { - _.each(f.instructions.write_actions, function(value, key) { + if(f.instructions.hasOwnProperty('instruction_write_actions')) { + _.each(f.instructions.instruction_write_actions, function(value, key) { f.writeActionText += key + ":" + value +" "; },f); }