Skip to content
Snippets Groups Projects
Commit 07cf733b authored by Ryan Izard's avatar Ryan Izard
Browse files

Added REST API support for getting list of loaded and all modules. Tinkered...

Added REST API support for getting list of loaded and all modules. Tinkered with Web UI's flow action display. The problem is that the actions (write and apply) will not display for any flow. Need to spend some time figuring out the issue.
parent 2477697c
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
......@@ -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)
......
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment