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

commit before pull

parent 04b75d0d
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,6 @@ import org.projectfloodlight.openflow.protocol.OFFeaturesReply;
import org.projectfloodlight.openflow.protocol.OFStatsReply;
import org.projectfloodlight.openflow.protocol.OFStatsType;
import org.projectfloodlight.openflow.types.DatapathId;
import org.projectfloodlight.openflow.util.HexString;
import org.restlet.resource.Get;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -100,9 +99,9 @@ public class AllSwitchStatisticsResource extends SwitchResourceBase {
for (GetConcurrentStatsThread curThread : activeThreads) {
if (curThread.getState() == State.TERMINATED) {
if (rType == REQUESTTYPE.OFSTATS) {
model.put(HexString.toHexString(curThread.getSwitchId().getLong()), curThread.getStatisticsReply());
model.put(curThread.getSwitchId().toString(), curThread.getStatisticsReply());
} else if (rType == REQUESTTYPE.OFFEATURES) {
model.put(HexString.toHexString(curThread.getSwitchId().getLong()), curThread.getFeaturesReply());
model.put(curThread.getSwitchId().toString(), curThread.getFeaturesReply());
}
pendingRemovalThreads.add(curThread);
}
......
This diff is collapsed.
package net.floodlightcontroller.core.web;
import java.util.List;
import java.util.Map;
import org.projectfloodlight.openflow.protocol.OFStatsReply;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@JsonSerialize(using = StatsReplySerializer.class)
public class StatsReplyToJson {
private Map<String, List<OFStatsReply>> toserialize;
StatsReplyToJson(Map<String, List<OFStatsReply>> serializeMe) {
toserialize = serializeMe;
}
}
......@@ -17,33 +17,23 @@
package net.floodlightcontroller.core.web;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import net.floodlightcontroller.core.IFloodlightProviderService;
import net.floodlightcontroller.core.IOFSwitch;
import net.floodlightcontroller.core.annotations.LogMessageDoc;
import net.floodlightcontroller.core.internal.IOFSwitchService;
import org.projectfloodlight.openflow.protocol.OFFeaturesReply;
import org.projectfloodlight.openflow.protocol.match.Match;
import org.projectfloodlight.openflow.protocol.queueprop.OFQueueProp;
import org.projectfloodlight.openflow.types.DatapathId;
import org.projectfloodlight.openflow.types.OFPort;
import org.projectfloodlight.openflow.types.TableId;
import org.projectfloodlight.openflow.protocol.OFFeaturesRequest;
import org.projectfloodlight.openflow.protocol.OFFlowStatsReply;
import org.projectfloodlight.openflow.protocol.OFQueueProperties;
import org.projectfloodlight.openflow.protocol.OFStatsReply;
import org.projectfloodlight.openflow.protocol.OFStatsRequest;
import org.projectfloodlight.openflow.protocol.OFAggregateStatsRequest;
import org.projectfloodlight.openflow.protocol.OFFlowStatsRequest;
import org.projectfloodlight.openflow.protocol.OFPortStatsRequest;
import org.projectfloodlight.openflow.protocol.OFQueueStatsRequest;
import org.projectfloodlight.openflow.protocol.OFStatsType;
import org.projectfloodlight.openflow.util.HexString;
import org.restlet.resource.ResourceException;
import org.restlet.resource.ServerResource;
import org.slf4j.Logger;
......
......@@ -26,6 +26,10 @@ import org.restlet.resource.Get;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize.Typing;
/**
* Return switch statistics information for specific switches
* @author readams
......@@ -35,6 +39,7 @@ public class SwitchStatisticsResource extends SwitchResourceBase {
LoggerFactory.getLogger(SwitchStatisticsResource.class);
@Get("json")
@JsonSerialize(using = StatsReplySerializer.class)
public Map<String, Object> retrieve() {
HashMap<String,Object> result = new HashMap<String,Object>();
Object values = null;
......
......@@ -10,7 +10,7 @@ net.floodlightcontroller.debugevent.DebugEventService,\
net.floodlightcontroller.staticflowentry.StaticFlowEntryPusher,\
net.floodlightcontroller.restserver.RestApiServer,\
net.floodlightcontroller.topology.TopologyManager,\
net.floodlightcontroller.forwarding.Forwarding,\
net.floodlightcontroller.testmodule.TestModule,\
net.floodlightcontroller.linkdiscovery.internal.LinkDiscoveryManager,\
net.floodlightcontroller.ui.web.StaticWebRoutable,\
net.floodlightcontroller.devicemanager.internal.DeviceManagerImpl
......
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