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

Updated Forwarding's unit test to expect a priority of 1 now in all flowmods.

parent 94a6caa2
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,6 @@ public interface IRoutingDecision {
public void setMulticastInterfaces(List<SwitchPort> lspt);
public Match getMatch();
public void setMatch(Match match);
public short getHardTimeout();
public int getHardTimeout();
public void setHardTimeout(short hardTimeout);
}
......@@ -33,7 +33,7 @@ public class RoutingDecision implements IRoutingDecision {
protected RoutingAction action;
protected Match match;
protected short hardTimeout;
protected int hardTimeout;
protected SwitchPort srcPort;
protected IDevice srcDevice;
protected List<IDevice> destDevices;
......@@ -105,7 +105,7 @@ public class RoutingDecision implements IRoutingDecision {
}
@Override
public short getHardTimeout() {
public int getHardTimeout() {
return hardTimeout;
}
......
/*
Copyright 2012 IBM
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......@@ -165,9 +163,9 @@ window.Switch = Backbone.Model.extend({
url:hackBase + "/wm/core/switch/" + self.id + '/flow/json',
dataType:"json",
success:function (data) {
console.log("fetched switch " + self.id + " flows");
//console.log("fetched switch " + self.id + " flows");
var flows = data['flows'];
console.log(flows);
//console.log(flows);
// create flow models
var i = 0;
......@@ -181,7 +179,7 @@ window.Switch = Backbone.Model.extend({
f.matchHTML += key + "=" + value +" ";
},f);
}
f.matchHTML = f.matchHTML.substr(0, f.matchHTML.length - 1);
f.matchHTML = f.matchHTML.substr(0, f.matchHTML.length - 2);
f.applyActionText = '';
f.writeActionText = '';
......@@ -198,16 +196,10 @@ window.Switch = Backbone.Model.extend({
}
}
if(f.hasOwnProperty('actions')) {
_.each(f.actions, function(value, key) {
f.applyActionText += key + ":" + value +" ";
},f);
}
}
// build human-readable action list
f.applyActionText = f.applyActionText.substr(0, f.applyActionText.length - 1);
f.writeActionText = f.writeActionText.substr(0, f.writeActionText.length - 1);
console.log(f);
f.applyActionText = f.applyActionText.substr(0, f.applyActionText.length - 2);
f.writeActionText = f.writeActionText.substr(0, f.writeActionText.length - 2);
//console.log(f);
self.flows.add(f, {silent: true});
});
self.flows.trigger('add');
......@@ -248,3 +240,5 @@ window.SwitchCollection = Backbone.Collection.extend({
},
});
Status API Training Shop Blog About
© 2014 GitHub, Inc. Terms Privacy Security Contact
<td><%= cookie %></td><td><%= priority %></td><td><%= matchHTML %></td><td><%= applyActionText %></td><td><%= writeActionText %></td><td><%= packetCount %></td><td><%= byteCount %></td><td><%= durationSeconds %> s</td><td><%= idleTimeoutSec %> s</td>
<td><%= cookie %></td><td><%= priority %></td><td><%= matchHTML %></td><td><%= applyActionText %></td><td><%= writeActionText %></td><td><%= clearActionText %></td><td><%= gotoGroupText %></td><td><%= gotoMeterText %></td><td><%= writeMetadataText %></td><td><%= experimenterText %></td><td><%= packetCount %></td><td><%= byteCount %></td><td><%= durationSeconds %> s</td><td><%= idleTimeoutSec %> s</td>
......@@ -2,7 +2,7 @@
<h1>Flows (<%= nflows %>)</h1>
</div>
<table class="table table-striped flow-table">
<thead><tr><th>Cookie</th><th>Priority</th><th>Match</th><th>Apply Actions</th><th>Write Actions</th><th>Packets</th><th>Bytes</th><th>Age</th><th>Timeout</th></tr></thead>
<thead><tr><th>Cookie</th><th>Priority</th><th>Match</th><th>Apply Actions</th><th>Write Actions</th><th>Clear Actions</th><th>Goto Group</th><th>Goto Meter</th><th>Write Metadata</th><th>Experimenter</th><th>Packets</th><th>Bytes</th><th>Age</th><th>Timeout</th></tr></thead>
<tbody>
<!-- flows will be inserted here by FlowListView:render -->
</tbody>
......
......@@ -342,6 +342,7 @@ public class ForwardingTest extends FloodlightTestCase {
.setOutPort(action.getPort())
.setBufferId(OFBufferId.NO_BUFFER)
.setCookie(U64.of(2L << 52))
.setPriority(1)
.build();
OFFlowMod fm2 = fm1.createBuilder().build();
......@@ -405,6 +406,7 @@ public class ForwardingTest extends FloodlightTestCase {
.setOutPort(OFPort.of(3))
.setBufferId(OFBufferId.NO_BUFFER)
.setCookie(U64.of(2L<< 52))
.setPriority(1)
.build();
// Record expected packet-outs/flow-mods
......
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