SFC + GBP Integration Phase II: enhance readRspFirstHopBySftList 94/20094/18
authorYi Yang <[email protected]>
Tue, 12 May 2015 16:44:23 +0000 (00:44 +0800)
committerYi Yang <[email protected]>
Thu, 14 May 2015 14:22:57 +0000 (22:22 +0800)
readRspFirstHopBySftList can take two arguments now, one is
ServiceFunctionSchedulerTypeIdentity, the other is
List of ServiceFunctionTypeIdentity, this enables the caller to
specify scheduler algorithm on calling readRspFirstHopBySftList
to create a new RSP.

Change-Id: I73a742e19d0d623bf6fa49bf8911c50af610db29
Signed-off-by: Yi Yang <[email protected]>
sfc-model/src/main/yang/rendered-service-path.yang
sfc-provider/src/main/java/org/opendaylight/sfc/provider/SfcProviderRpc.java
sfc-provider/src/main/java/org/opendaylight/sfc/provider/api/SfcProviderRenderedPathAPI.java
sfc-provider/src/main/java/org/opendaylight/sfc/provider/api/SfcServiceFunctionRandomSchedulerAPI.java
sfc-provider/src/test/java/org/opendaylight/sfc/provider/api/SfcProviderRenderedPathAPITest.java

index b441710353d44f6b08f97aa19644e5ea3c32a56e..f4226cae0ee5a88db2a74369ffc67de5728efc45 100644 (file)
@@ -8,6 +8,7 @@ module rendered-service-path {
   import ietf-yang-types { prefix yang; }
   import service-function {prefix sfc-sf; }
   import service-function-type {prefix sfc-sft; }
+  import service-function-scheduler-type {prefix sfc-sfst;}
   import service-function-metadata {prefix sfc-md; }
   import service-function-forwarder {prefix sfc-sff; }
   import service-locator {prefix sfc-sl;}
@@ -315,6 +316,10 @@ module rendered-service-path {
       "Read all the necessary information for the first hop of a
       Rendered Service Path by ServiceFunctionTypeIdentity list";
     input {
+      leaf sfst {
+        description "Service function scheduler type for RSP";
+        type sfc-sfst:service-function-scheduler-type;
+      }
       leaf-list sft-list {
         description "List of service function type";
         type sfc-sft:service-function-type;
index 82158894157114842c91bece5c8201e613b723c5..585fb71f6612095e90d0586798cbcf1a8894c39f 100755 (executable)
@@ -370,7 +370,7 @@ public class SfcProviderRpc implements ServiceFunctionService,
     @Override
     public Future<RpcResult<ReadRspFirstHopBySftListOutput>> readRspFirstHopBySftList(ReadRspFirstHopBySftListInput input) {
         RenderedServicePathFirstHop renderedServicePathFirstHop = null;
-        renderedServicePathFirstHop = SfcProviderRenderedPathAPI.readRspFirstHopBySftList(input.getSftList());
+        renderedServicePathFirstHop = SfcProviderRenderedPathAPI.readRspFirstHopBySftList(input.getSfst(), input.getSftList());
         ReadRspFirstHopBySftListOutput readRspFirstHopBySftListOutput = null;
         if (renderedServicePathFirstHop != null) {
             ReadRspFirstHopBySftListOutputBuilder readRspFirstHopBySftListOutputBuilder = new ReadRspFirstHopBySftListOutputBuilder();
index 0e75f3f7ed1cbadf1f7965c70d2c904f18a01e9e..7c84df4df52a95c56f796cfa48785b437ba86aa3 100644 (file)
@@ -41,6 +41,7 @@ import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sl.rev14070
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.opendaylight.yang.gen.v1.urn.intel.params.xml.ns.yang.sfc.sfst.rev150312.ServiceFunctionSchedulerTypeIdentity;
 import org.opendaylight.yang.gen.v1.urn.intel.params.xml.ns.yang.sfc.sfst.rev150312.Random;
 import org.opendaylight.yang.gen.v1.urn.intel.params.xml.ns.yang.sfc.sfst.rev150312.RoundRobin;
 import org.opendaylight.yang.gen.v1.urn.intel.params.xml.ns.yang.sfc.sfst.rev150312.LoadBalance;
@@ -75,6 +76,8 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
     private static final int MAX_STARTING_INDEX = 255;
     private static AtomicInteger numCreatedPath = new AtomicInteger(0);
     private static final OpendaylightSfc ODL_SFC = OpendaylightSfc.getOpendaylightSfcObj();
+    private static SfcServiceFunctionSchedulerAPI defaultScheduler;
+
     static final Comparator<SfcServiceFunction> SF_ORDER =
             new Comparator<SfcServiceFunction>() {
                 public int compare(SfcServiceFunction e1, SfcServiceFunction e2) {
@@ -89,18 +92,8 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
                 }
             };
 
-    private SfcServiceFunctionSchedulerAPI scheduler;
-
-    private void initServiceFunctionScheduler()
-    {
-        java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.intel.params.xml.ns.yang.sfc.sfst.rev150312.ServiceFunctionSchedulerTypeIdentity> serviceFunctionSchedulerType;
-
-        try {
-            serviceFunctionSchedulerType = SfcProviderScheduleTypeAPI
-                    .readEnabledServiceFunctionScheduleTypeEntryExecutor().getType();
-        } catch (Exception e) {
-            serviceFunctionSchedulerType = Random.class;
-        }
+    private static SfcServiceFunctionSchedulerAPI getServiceFunctionScheduler(Class<? extends ServiceFunctionSchedulerTypeIdentity> serviceFunctionSchedulerType) {
+        SfcServiceFunctionSchedulerAPI scheduler;
 
         if (serviceFunctionSchedulerType == RoundRobin.class) {
             scheduler = new SfcServiceFunctionRoundRobinSchedulerAPI();
@@ -113,7 +106,21 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
         } else {
             scheduler = new SfcServiceFunctionRandomSchedulerAPI();
         }
+        return scheduler;
+    }
+
+    private void initDefaultServiceFunctionScheduler()
+    {
+        java.lang.Class<? extends ServiceFunctionSchedulerTypeIdentity> serviceFunctionSchedulerType;
+
+        try {
+            serviceFunctionSchedulerType = SfcProviderScheduleTypeAPI
+                    .readEnabledServiceFunctionScheduleTypeEntryExecutor().getType();
+        } catch (Exception e) {
+            serviceFunctionSchedulerType = Random.class;
+        }
 
+        defaultScheduler = getServiceFunctionScheduler(serviceFunctionSchedulerType);
         LOG.info("Selected SF Schdedule Type: {}",  serviceFunctionSchedulerType);
     }
 
@@ -132,12 +139,12 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
 
     SfcProviderRenderedPathAPI(Object[] params, String m) {
         super(params, m);
-        initServiceFunctionScheduler();
+        initDefaultServiceFunctionScheduler();
     }
 
     SfcProviderRenderedPathAPI(Object[] params, Class[] paramsTypes, String m) {
         super(params, paramsTypes, m);
-        initServiceFunctionScheduler();
+        initDefaultServiceFunctionScheduler();
     }
 
 
@@ -171,11 +178,10 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
         this.createRenderedServicePathEntry(serviceFunctionPath);
     }*/
 
-    public static RenderedServicePath createRenderedServicePathEntryExecutor(ServiceFunctionPath serviceFunctionPath,
-                                                                             CreateRenderedPathInput createRenderedPathInput) {
+    public static RenderedServicePath createRenderedServicePathEntryExecutor(ServiceFunctionPath serviceFunctionPath, CreateRenderedPathInput createRenderedPathInput, SfcServiceFunctionSchedulerAPI scheduler) {
         RenderedServicePath ret = null;
-        Object[] servicePathObj = {serviceFunctionPath, createRenderedPathInput};
-        Class[] servicePathClass = {ServiceFunctionPath.class, CreateRenderedPathInput.class};
+        Object[] servicePathObj = {serviceFunctionPath, createRenderedPathInput, scheduler};
+        Class[] servicePathClass = {ServiceFunctionPath.class, CreateRenderedPathInput.class, SfcServiceFunctionSchedulerAPI.class};
         SfcProviderRenderedPathAPI sfcProviderRenderedPathAPI = SfcProviderRenderedPathAPI
                 .getCreateRenderedServicePathEntryAPI(servicePathObj, servicePathClass);
         Future futureCreateRSP = ODL_SFC.getExecutor().submit(sfcProviderRenderedPathAPI);
@@ -212,37 +218,44 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
 
     /**
      * Creates a RSP and all the associated operational state based on the
-     * given service function path
+     * given service function path and scheduler
      *
      * <p>
      * @param createdServiceFunctionPath Service Function Path
-     * @return Created RSP or null
+     * @param createRenderedPathInput CreateRenderedPathInput object
+     * @param scheduler SfcServiceFunctionSchedulerAPI object
+     * @return RenderedServicePath Created RSP or null
      */
-    public static RenderedServicePath createRenderedServicePathAndState(ServiceFunctionPath createdServiceFunctionPath,
-                                                                        CreateRenderedPathInput createRenderedPathInput) {
-
-        RenderedServicePath renderedServicePath;
+    public static RenderedServicePath createRenderedServicePathAndState(ServiceFunctionPath createdServiceFunctionPath, CreateRenderedPathInput createRenderedPathInput, SfcServiceFunctionSchedulerAPI scheduler) {
+        RenderedServicePath renderedServicePath = null;
 
         boolean rspSuccessful = false;
         boolean addPathToSffStateSuccessful = false;
         boolean addPathToSfStateSuccessful = false;
         boolean addPathtoSfpStateSuccessful = false;
 
+        if (scheduler == null) {//Fall back to defaultScheduler
+            scheduler = defaultScheduler;
+        }
+
         // Create RSP
         if ((renderedServicePath = SfcProviderRenderedPathAPI
-                .createRenderedServicePathEntryExecutor(createdServiceFunctionPath, createRenderedPathInput)) != null) {
+                .createRenderedServicePathEntryExecutor(createdServiceFunctionPath, createRenderedPathInput, scheduler)) != null) {
             rspSuccessful = true;
 
         } else {
             LOG.error("Could not create RSP. System state inconsistent. Deleting and add SFP {} back",
                     createdServiceFunctionPath.getName());
         }
+
         // Add Path name to SFF operational state
         if (rspSuccessful &&  SfcProviderServiceForwarderAPI
                 .addPathToServiceForwarderStateExecutor(renderedServicePath)) {
             addPathToSffStateSuccessful = true;
         } else {
-            SfcProviderRenderedPathAPI.deleteRenderedServicePathExecutor(renderedServicePath.getName());
+            if (renderedServicePath != null) {
+                SfcProviderRenderedPathAPI.deleteRenderedServicePathExecutor(renderedServicePath.getName());
+            }
         }
 
         // Add Path to SF operational state
@@ -254,9 +267,11 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
         } else {
             SfcProviderServiceForwarderAPI
                     .deletePathFromServiceForwarderStateExecutor(createdServiceFunctionPath);
-            SfcProviderRenderedPathAPI.deleteRenderedServicePathExecutor(renderedServicePath.getName());
-
+            if (renderedServicePath != null) {
+                SfcProviderRenderedPathAPI.deleteRenderedServicePathExecutor(renderedServicePath.getName());
+            }
         }
+
         // Add RSP to SFP operational state
         if (addPathToSfStateSuccessful &&
                 SfcProviderServicePathAPI.addRenderedPathToServicePathStateExecutor
@@ -267,13 +282,33 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
             SfcProviderServiceFunctionAPI.deleteServicePathFromServiceFunctionStateExecutor(createdServiceFunctionPath.getName());
             SfcProviderServiceForwarderAPI
                     .deletePathFromServiceForwarderStateExecutor(createdServiceFunctionPath);
-            SfcProviderRenderedPathAPI.deleteRenderedServicePathExecutor(renderedServicePath.getName());
+            if (renderedServicePath != null) {
+                SfcProviderRenderedPathAPI.deleteRenderedServicePathExecutor(renderedServicePath.getName());
+            }
+        }
 
+        if (renderedServicePath == null) {
+            LOG.error("Failed to create RSP for SFP {}", createdServiceFunctionPath.getName());
+        } else {
+            LOG.info("Create RSP {} for SFP {} successfully", renderedServicePath.getName(), createdServiceFunctionPath.getName());
         }
 
         return renderedServicePath;
     }
 
+    /**
+     * Creates a RSP and all the associated operational state based on the
+     * given service function path
+     *
+     * <p>
+     * @param createdServiceFunctionPath Service Function Path
+     * @param createRenderedPathInput CreateRenderedPathInput object
+     * @return RenderedServicePath Created RSP or null
+     */
+    public static RenderedServicePath createRenderedServicePathAndState(ServiceFunctionPath createdServiceFunctionPath, CreateRenderedPathInput createRenderedPathInput) {
+        return createRenderedServicePathAndState(createdServiceFunctionPath, createRenderedPathInput, defaultScheduler);
+    }
+
     /**
      * Create a Symmetric Path and all the associated operational state based on the
      * given rendered service path
@@ -434,14 +469,15 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
 
     /**
      * Create a Rendered Path and all the associated operational state based on the
-     * given rendered service path
+     * given rendered service path and scheduler
      *
      * <p>
      * @param serviceFunctionPath RSP Object
-     * @return Nothing.
+     * @param createRenderedPathInput CreateRenderedPathInput object
+     * @param scheduler SfcServiceFunctionSchedulerAPI object
+     * @return RenderedServicePath
      */
-    protected RenderedServicePath createRenderedServicePathEntry (ServiceFunctionPath serviceFunctionPath,
-                                                                  CreateRenderedPathInput createRenderedPathInput) {
+    protected RenderedServicePath createRenderedServicePathEntry (ServiceFunctionPath serviceFunctionPath, CreateRenderedPathInput createRenderedPathInput, SfcServiceFunctionSchedulerAPI scheduler) {
 
         printTraceStart(LOG);
 
@@ -514,6 +550,7 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
 
         RenderedServicePath renderedServicePath =
                 renderedServicePathBuilder.build();
+
         if (SfcDataStoreAPI.writeMergeTransactionAPI(rspIID, renderedServicePath, LogicalDatastoreType.OPERATIONAL)) {
             ret = renderedServicePath;
         } else {
@@ -524,6 +561,19 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
         return ret;
     }
 
+    /**
+     * Create a Rendered Path and all the associated operational state based on the
+     * given rendered service path
+     *
+     * <p>
+     * @param serviceFunctionPath RSP Object
+     * @param createRenderedPathInput CreateRenderedPathInput object
+     * @return RenderedServicePath
+     */
+    protected RenderedServicePath createRenderedServicePathEntry (ServiceFunctionPath serviceFunctionPath, CreateRenderedPathInput createRenderedPathInput) {
+        return createRenderedServicePathEntry(serviceFunctionPath, createRenderedPathInput, defaultScheduler);
+    }
+
     private List<String> getSfgNameList(ServiceFunctionChain serviceFunctionChain) {
         List<String> ret = new ArrayList<String>();
         List<SfcServiceFunction> sfcServiceFunction = serviceFunctionChain.getSfcServiceFunction();
@@ -883,7 +933,7 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
      * @param serviceFunctionTypeList ServiceFunctionTypeIdentity list
      * @return RenderedServicePathFirstHop.
      */
-    public static RenderedServicePathFirstHop readRspFirstHopBySftList(List<Class<? extends ServiceFunctionTypeIdentity>> serviceFunctionTypeList) {
+    public static RenderedServicePathFirstHop readRspFirstHopBySftList(Class<? extends ServiceFunctionSchedulerTypeIdentity> serviceFunctionSchedulerType, List<Class<? extends ServiceFunctionTypeIdentity>> serviceFunctionTypeList) {
         int i;
         String serviceTypeName;
         Class serviceFunctionType = null;
@@ -893,8 +943,10 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
         ServiceFunctionChain serviceFunctionChain = null;
         boolean ret = false;
         RenderedServicePathFirstHop firstHop = null;
+        SfcServiceFunctionSchedulerAPI scheduler;
 
         printTraceStart(LOG);
+        scheduler = getServiceFunctionScheduler(serviceFunctionSchedulerType);
 
         /* Build sfcName, pathName and ServiceFunction list */
         for (i = 0; i < serviceFunctionTypeList.size(); i++) {
@@ -953,7 +1005,7 @@ public class SfcProviderRenderedPathAPI extends SfcProviderAbstractAPI {
         createRenderedPathInputBuilder.setSymmetric(serviceFunctionPath.isSymmetric());
 
         renderedServicePath = SfcProviderRenderedPathAPI.createRenderedServicePathAndState(serviceFunctionPath,
-                createRenderedPathInputBuilder.build());
+                createRenderedPathInputBuilder.build(), scheduler);
         if (renderedServicePath == null) {
             LOG.error("Failed to create RenderedServicePath for ServiceFunctionPath: {}", pathName);
             return null;
index 40df7d0c1513c3448c2a998f177fd9ee0451e1cb..fff7d6b5f8a812a2ff318a5c193ffc3881f4eef8 100644 (file)
@@ -86,6 +86,7 @@ public class SfcServiceFunctionRandomSchedulerAPI extends SfcServiceFunctionSche
                 List<SftServiceFunctionName> sftServiceFunctionNameList = serviceFunctionType.getSftServiceFunctionName();
                 if (!sftServiceFunctionNameList.isEmpty()) {
                     String sfName = getServiceFunctionByType(serviceFunctionType);
+                    LOG.info("sfName {} for serviceFunctionType {}", sfName, serviceFunctionType.getType().getSimpleName());
                     sfNameList.add(sfName);
                 } else {
                     LOG.error("Could not create path because there are no configured SFs of type: {}",
index a331cb7c17d618460f64aa5ce26898a8a67334d3..a9c5af577f552e550538fbd526ac674c9c38b5d4 100755 (executable)
@@ -81,11 +81,14 @@ public class SfcProviderRenderedPathAPITest extends AbstractDataBrokerTest {
     private static final String SFC_NAME = "unittest-chain-1";
     private static final String SFP_NAME = "unittest-sfp-1";
     private static final Logger LOG = LoggerFactory.getLogger(SfcProviderServiceChainAPITest.class);
+    private static final String[] sfNames = {"unittest-fw-1", "unittest-dpi-1", "unittest-napt-1", "unittest-http-header-enrichment-1", "unittest-qos-1"};
     private String[] SFF_NAMES = {"SFF1", "SFF2", "SFF3", "SFF4", "SFF5"};
     private String[][] TO_SFF_NAMES =
             {{"SFF2", "SFF5"}, {"SFF3", "SFF1"}, {"SFF4", "SFF2"}, {"SFF5", "SFF3"}, {"SFF1", "SFF4"}};
     private String[] SFF_LOCATOR_IP =
             {"196.168.66.101", "196.168.66.102", "196.168.66.103", "196.168.66.104", "196.168.66.105"};
+    private List<ServiceFunction> sfList = new ArrayList<>();
+    private static final String rspName = "unittest-rsp-1";
     private DataBroker dataBroker;
     private ExecutorService executor;
     private OpendaylightSfc opendaylightSfc = new OpendaylightSfc();
@@ -93,7 +96,6 @@ public class SfcProviderRenderedPathAPITest extends AbstractDataBrokerTest {
     private ServiceFunctionPathBuilder serviceFunctionPathBuilder;
     private RenderedServicePath testRenderedServicePath;
     private SfcProviderRenderedPathAPI sfcProviderRenderedPathAPI;
-    private List<ServiceFunction> sfList = new ArrayList<>();
     private Object[] params;
 
     @Before
@@ -111,7 +113,6 @@ public class SfcProviderRenderedPathAPITest extends AbstractDataBrokerTest {
         Thread.sleep(1000); // Wait for real delete
 
         // Create Service Functions
-        final String[] sfNames = {"unittest-fw-1", "unittest-dpi-1", "unittest-napt-1", "unittest-http-header-enrichment-1", "unittest-qos-1"};
         final IpAddress[] ipMgmtAddress = new IpAddress[sfNames.length];
         final IpAddress[] locatorIpAddress = new IpAddress[sfNames.length];
         SfDataPlaneLocator[] sfDataPlaneLocator = new SfDataPlaneLocator[sfNames.length];
@@ -263,15 +264,28 @@ public class SfcProviderRenderedPathAPITest extends AbstractDataBrokerTest {
                 SfcProviderServicePathAPI.readServiceFunctionPathExecutor(SFP_NAME);
         assertNotNull("Must be not null", serviceFunctionPath);
 
+        /* Can't create RSP if we don't do these cleanups, don't know why */
+        SfcProviderServiceFunctionAPI.deleteServicePathFromServiceFunctionStateExecutor(SFP_NAME);
+        SfcProviderServiceForwarderAPI.deletePathFromServiceForwarderStateExecutor(serviceFunctionPath);
+        SfcProviderServicePathAPI.deleteServicePathStateExecutor(SFP_NAME);
+        SfcProviderRenderedPathAPI.deleteRenderedServicePathExecutor(rspName);
+        for (int i = 0; i < SFF_NAMES.length; i++) {
+            SfcProviderServiceForwarderAPI.deleteServiceFunctionForwarderStateExecutor(SFF_NAMES[i]);
+        }
+        for (int i = 0; i < sfNames.length; i++) {
+            SfcProviderServiceFunctionAPI.deleteServiceFunctionStateExecutor(sfNames[i]);
+        }
+
         /* Create RenderedServicePath and reverse RenderedServicePath */
         RenderedServicePath renderedServicePath = null;
         RenderedServicePath revRenderedServicePath = null;
 
         CreateRenderedPathInputBuilder createRenderedPathInputBuilder = new CreateRenderedPathInputBuilder();
+        createRenderedPathInputBuilder.setName(rspName);
         createRenderedPathInputBuilder.setSymmetric(serviceFunctionPath.isSymmetric());
         try {
             renderedServicePath = SfcProviderRenderedPathAPI.createRenderedServicePathAndState(serviceFunctionPath, createRenderedPathInputBuilder.build());
-        } catch (NullPointerException e) {
+        } catch (Exception e) {
             e.printStackTrace();
         }
         assertNotNull("Must be not null", renderedServicePath);
@@ -310,7 +324,7 @@ public class SfcProviderRenderedPathAPITest extends AbstractDataBrokerTest {
         assertEquals("sftList size should be 5", sftList.size(), 5);
         RenderedServicePathFirstHop firstHop = null;
         try {
-            firstHop = SfcProviderRenderedPathAPI.readRspFirstHopBySftList(sftList);
+            firstHop = SfcProviderRenderedPathAPI.readRspFirstHopBySftList(null, sftList);
         } catch (NullPointerException e) {
             e.printStackTrace();
         }
@@ -322,8 +336,8 @@ public class SfcProviderRenderedPathAPITest extends AbstractDataBrokerTest {
 
     @Test
     public void testCreateRenderedServicePathHopList() throws ExecutionException, InterruptedException {
-        final String[] sfNames = {"unittest-fw-1", "unittest-dpi-1", "unittest-napt-1"};
-        List<String> sfNameList = Arrays.asList(sfNames);
+        final String[] tmpSfNames = {"unittest-fw-1", "unittest-dpi-1", "unittest-napt-1"};
+        List<String> sfNameList = Arrays.asList(tmpSfNames);
         final int startingIndex = 255;
 
         Object[] parameters = {};
@@ -360,8 +374,6 @@ public class SfcProviderRenderedPathAPITest extends AbstractDataBrokerTest {
         SfcProviderServiceFunctionAPI.deleteServiceFunctionStateExecutor("unittest-fw-1");
         SfcProviderServicePathAPI.deleteServicePathStateExecutor(SFP_NAME);
 
-        final String rspName = "unittest-rsp";
-
         ServiceFunctionPath serviceFunctionPath =
                 SfcProviderServicePathAPI.readServiceFunctionPathExecutor(SFP_NAME);
         assertNotNull("Must be not null", serviceFunctionPath);