Bug 6923 - sfc-translation-layer : OVS data path 95/46795/2
authorAnil Vishnoi <vishnoianil@gmail.com>
Tue, 11 Oct 2016 17:07:51 +0000 (10:07 -0700)
committerSam Hague <shague@redhat.com>
Thu, 13 Oct 2016 01:18:28 +0000 (01:18 +0000)
locator options (nsp,nsi,nshc*) are not required.

Apart form the netvirt expect data path locator name
to be vxgpe. This hardcoded dependency needs to be removed.
Following bug tracks the issue
https://bugs.opendaylight.org/show_bug.cgi?id=6924

Change-Id: Ic08cd65a547a93d1e878fcf8bce7d5f66a894b9b
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
openstack/sfc-translator/impl/src/main/java/org/opendaylight/netvirt/openstack/sfc/translator/portchain/PortPairGroupTranslator.java

index 39ab5af69ef3c47cc6fde115fc854ae1e003f4b2..1c857da455c06172b4a2c3556ab7d64b17e053fb 100644 (file)
@@ -57,11 +57,13 @@ import java.util.concurrent.atomic.AtomicInteger;
 public class PortPairGroupTranslator {
     private static final Logger LOG = LoggerFactory.getLogger(PortPairGroupTranslator.class);
     private static final String OPT_FLOW_STR = "flow";
+    private static final String OPT_GPE_STR = "gpe";
     private static final String OPT_DST_PORT = "6633";
 
     private static final AtomicInteger counter = new AtomicInteger(0);
     private static final String SFF_DEFAULT_NAME = "sff";
     private static final String SFF_DPL_SUFFIX = "-dpl";
+    private static final String SFF_DPL_FIX_NAME = "vxgpe";
 
     public static ServiceFunctionForwarderBuilder buildServiceFunctionForwarder(
             PortPairGroup portPairGroup,
@@ -140,7 +142,9 @@ public class PortPairGroupTranslator {
 
         //Set management ip, same to the ovsdb  node ip
         sffBuilder.setIpMgmtAddress(sffLocator.getIp());
-        sffDplBuilder.setName(new SffDataPlaneLocatorName(sffBuilder.getName().getValue() + SFF_DPL_SUFFIX));
+
+        //TODO: DPL name should not be hardcoded. Require net-virt classifier to remove dependency on it.
+        sffDplBuilder.setName(new SffDataPlaneLocatorName(SFF_DPL_FIX_NAME));
         sffDplBuilder.setKey(new SffDataPlaneLocatorKey(sffDplBuilder.getName()));
         sffDataPlaneLocator.add(sffDplBuilder.build());
         //set SFF key
@@ -194,12 +198,7 @@ public class PortPairGroupTranslator {
         ovsOptionsBuilder.setRemoteIp(OPT_FLOW_STR);
         ovsOptionsBuilder.setDstPort(OPT_DST_PORT);
         ovsOptionsBuilder.setKey(OPT_FLOW_STR);
-        ovsOptionsBuilder.setNsp(OPT_FLOW_STR);
-        ovsOptionsBuilder.setNsi(OPT_FLOW_STR);
-        ovsOptionsBuilder.setNshc1(OPT_FLOW_STR);
-        ovsOptionsBuilder.setNshc2(OPT_FLOW_STR);
-        ovsOptionsBuilder.setNshc3(OPT_FLOW_STR);
-        ovsOptionsBuilder.setNshc4(OPT_FLOW_STR);
+        ovsOptionsBuilder.setExts(OPT_GPE_STR);
         ovsOptions.setOvsOptions(ovsOptionsBuilder.build());
         return ovsOptions;
     }