Showing
1 changed file
with
21 additions
and
10 deletions
... | @@ -40,7 +40,6 @@ import org.projectfloodlight.openflow.protocol.OFFlowDelete; | ... | @@ -40,7 +40,6 @@ import org.projectfloodlight.openflow.protocol.OFFlowDelete; |
40 | import org.projectfloodlight.openflow.protocol.OFFlowMod; | 40 | import org.projectfloodlight.openflow.protocol.OFFlowMod; |
41 | import org.projectfloodlight.openflow.protocol.OFFlowModFlags; | 41 | import org.projectfloodlight.openflow.protocol.OFFlowModFlags; |
42 | import org.projectfloodlight.openflow.protocol.action.OFAction; | 42 | import org.projectfloodlight.openflow.protocol.action.OFAction; |
43 | -import org.projectfloodlight.openflow.protocol.instruction.OFInstruction; | ||
44 | import org.projectfloodlight.openflow.protocol.match.Match; | 43 | import org.projectfloodlight.openflow.protocol.match.Match; |
45 | import org.projectfloodlight.openflow.protocol.oxm.OFOxm; | 44 | import org.projectfloodlight.openflow.protocol.oxm.OFOxm; |
46 | import org.projectfloodlight.openflow.types.CircuitSignalID; | 45 | import org.projectfloodlight.openflow.types.CircuitSignalID; |
... | @@ -78,8 +77,15 @@ public class FlowModBuilderVer13 extends FlowModBuilder { | ... | @@ -78,8 +77,15 @@ public class FlowModBuilderVer13 extends FlowModBuilder { |
78 | @Override | 77 | @Override |
79 | public OFFlowAdd buildFlowAdd() { | 78 | public OFFlowAdd buildFlowAdd() { |
80 | Match match = buildMatch(); | 79 | Match match = buildMatch(); |
81 | - OFInstruction writeActions = | 80 | + List<OFAction> actions = buildActions(); |
82 | - factory().instructions().writeActions(buildActions()); | 81 | + |
82 | + // FIXME had to revert back to using apply-actions instead of | ||
83 | + // write-actions because LINC-OE apparently doesn't support | ||
84 | + // write-actions. I would prefer to change this back in the future | ||
85 | + // because apply-actions is an optional instruction in OF 1.3. | ||
86 | + | ||
87 | + //OFInstruction writeActions = | ||
88 | + //factory().instructions().writeActions(actions); | ||
83 | 89 | ||
84 | long cookie = flowRule().id().value(); | 90 | long cookie = flowRule().id().value(); |
85 | 91 | ||
... | @@ -88,7 +94,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder { | ... | @@ -88,7 +94,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder { |
88 | .setXid(cookie) | 94 | .setXid(cookie) |
89 | .setCookie(U64.of(cookie)) | 95 | .setCookie(U64.of(cookie)) |
90 | .setBufferId(OFBufferId.NO_BUFFER) | 96 | .setBufferId(OFBufferId.NO_BUFFER) |
91 | - .setInstructions(Collections.singletonList(writeActions)) | 97 | + .setActions(actions) |
98 | + //.setInstructions(Collections.singletonList(writeActions)) | ||
92 | .setMatch(match) | 99 | .setMatch(match) |
93 | .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM)) | 100 | .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM)) |
94 | .setPriority(flowRule().priority()) | 101 | .setPriority(flowRule().priority()) |
... | @@ -100,8 +107,9 @@ public class FlowModBuilderVer13 extends FlowModBuilder { | ... | @@ -100,8 +107,9 @@ public class FlowModBuilderVer13 extends FlowModBuilder { |
100 | @Override | 107 | @Override |
101 | public OFFlowMod buildFlowMod() { | 108 | public OFFlowMod buildFlowMod() { |
102 | Match match = buildMatch(); | 109 | Match match = buildMatch(); |
103 | - OFInstruction writeActions = | 110 | + List<OFAction> actions = buildActions(); |
104 | - factory().instructions().writeActions(buildActions()); | 111 | + //OFInstruction writeActions = |
112 | + //factory().instructions().writeActions(actions); | ||
105 | 113 | ||
106 | long cookie = flowRule().id().value(); | 114 | long cookie = flowRule().id().value(); |
107 | 115 | ||
... | @@ -110,7 +118,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder { | ... | @@ -110,7 +118,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder { |
110 | .setXid(cookie) | 118 | .setXid(cookie) |
111 | .setCookie(U64.of(cookie)) | 119 | .setCookie(U64.of(cookie)) |
112 | .setBufferId(OFBufferId.NO_BUFFER) | 120 | .setBufferId(OFBufferId.NO_BUFFER) |
113 | - .setInstructions(Collections.singletonList(writeActions)) | 121 | + .setActions(actions) |
122 | + //.setInstructions(Collections.singletonList(writeActions)) | ||
114 | .setMatch(match) | 123 | .setMatch(match) |
115 | .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM)) | 124 | .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM)) |
116 | .setPriority(flowRule().priority()) | 125 | .setPriority(flowRule().priority()) |
... | @@ -122,8 +131,9 @@ public class FlowModBuilderVer13 extends FlowModBuilder { | ... | @@ -122,8 +131,9 @@ public class FlowModBuilderVer13 extends FlowModBuilder { |
122 | @Override | 131 | @Override |
123 | public OFFlowDelete buildFlowDel() { | 132 | public OFFlowDelete buildFlowDel() { |
124 | Match match = buildMatch(); | 133 | Match match = buildMatch(); |
125 | - OFInstruction writeActions = | 134 | + List<OFAction> actions = buildActions(); |
126 | - factory().instructions().writeActions(buildActions()); | 135 | + //OFInstruction writeActions = |
136 | + //factory().instructions().writeActions(actions); | ||
127 | 137 | ||
128 | long cookie = flowRule().id().value(); | 138 | long cookie = flowRule().id().value(); |
129 | 139 | ||
... | @@ -131,7 +141,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder { | ... | @@ -131,7 +141,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder { |
131 | .setXid(cookie) | 141 | .setXid(cookie) |
132 | .setCookie(U64.of(cookie)) | 142 | .setCookie(U64.of(cookie)) |
133 | .setBufferId(OFBufferId.NO_BUFFER) | 143 | .setBufferId(OFBufferId.NO_BUFFER) |
134 | - .setInstructions(Collections.singletonList(writeActions)) | 144 | + .setActions(actions) |
145 | + //.setInstructions(Collections.singletonList(writeActions)) | ||
135 | .setMatch(match) | 146 | .setMatch(match) |
136 | .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM)) | 147 | .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM)) |
137 | .setPriority(flowRule().priority()) | 148 | .setPriority(flowRule().priority()) | ... | ... |
-
Please register or login to post a comment