Committed by
Gerrit Code Review
Add implementation of nsh actions
Change-Id: I24f778bf11c96ad5f9eaa3b47d1ffcf1824e12a0
Showing
1 changed file
with
14 additions
and
8 deletions
... | @@ -100,28 +100,34 @@ public class NiciraExtensionTreatmentInterpreter extends AbstractHandlerBehaviou | ... | @@ -100,28 +100,34 @@ public class NiciraExtensionTreatmentInterpreter extends AbstractHandlerBehaviou |
100 | return factory.actions().niciraResubmit((int) resubmit.inPort().toLong(), | 100 | return factory.actions().niciraResubmit((int) resubmit.inPort().toLong(), |
101 | resubmit.table()); | 101 | resubmit.table()); |
102 | } | 102 | } |
103 | - if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_SPI.type())) { | ||
104 | - // TODO this will be implemented later | ||
105 | - } | ||
106 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_RESUBMIT_TABLE.type())) { | 103 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_RESUBMIT_TABLE.type())) { |
107 | NiciraResubmitTable resubmitTable = (NiciraResubmitTable) extensionTreatment; | 104 | NiciraResubmitTable resubmitTable = (NiciraResubmitTable) extensionTreatment; |
108 | return factory.actions().niciraResubmitTable((int) resubmitTable.inPort().toLong(), | 105 | return factory.actions().niciraResubmitTable((int) resubmitTable.inPort().toLong(), |
109 | resubmitTable.table()); | 106 | resubmitTable.table()); |
110 | } | 107 | } |
108 | + if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_SPI.type())) { | ||
109 | + NiciraSetNshSpi niciraNshSpi = (NiciraSetNshSpi) extensionTreatment; | ||
110 | + return factory.actions().niciraSetNsp(niciraNshSpi.nshSpi().servicePathId()); | ||
111 | + } | ||
111 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_SI.type())) { | 112 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_SI.type())) { |
112 | - // TODO this will be implemented later | 113 | + NiciraSetNshSi niciraNshSi = (NiciraSetNshSi) extensionTreatment; |
114 | + return factory.actions().niciraSetNsp(niciraNshSi.nshSi().serviceIndex()); | ||
113 | } | 115 | } |
114 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_CH1.type())) { | 116 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_CH1.type())) { |
115 | - // TODO this will be implemented later | 117 | + NiciraSetNshContextHeader niciraNshch = (NiciraSetNshContextHeader) extensionTreatment; |
118 | + return factory.actions().niciraSetNshc1(niciraNshch.nshCh().nshContextHeader()); | ||
116 | } | 119 | } |
117 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_CH2.type())) { | 120 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_CH2.type())) { |
118 | - // TODO this will be implemented later | 121 | + NiciraSetNshContextHeader niciraNshch = (NiciraSetNshContextHeader) extensionTreatment; |
122 | + return factory.actions().niciraSetNshc2(niciraNshch.nshCh().nshContextHeader()); | ||
119 | } | 123 | } |
120 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_CH3.type())) { | 124 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_CH3.type())) { |
121 | - // TODO this will be implemented later | 125 | + NiciraSetNshContextHeader niciraNshch = (NiciraSetNshContextHeader) extensionTreatment; |
126 | + return factory.actions().niciraSetNshc3(niciraNshch.nshCh().nshContextHeader()); | ||
122 | } | 127 | } |
123 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_CH4.type())) { | 128 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_CH4.type())) { |
124 | - // TODO this will be implemented later | 129 | + NiciraSetNshContextHeader niciraNshch = (NiciraSetNshContextHeader) extensionTreatment; |
130 | + return factory.actions().niciraSetNshc4(niciraNshch.nshCh().nshContextHeader()); | ||
125 | } | 131 | } |
126 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_MOV_ETH_SRC_TO_DST.type()) | 132 | if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_MOV_ETH_SRC_TO_DST.type()) |
127 | || type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_MOV_ARP_SPA_TO_TPA.type()) | 133 | || type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_MOV_ARP_SPA_TO_TPA.type()) | ... | ... |
-
Please register or login to post a comment