@Test public void testCreateReadDeleteServiceFunction() throws Exception { boolean transactionSuccessful = writeRemoveServiceFunction(IP_MGMT_ADDRESS.get(1), true); assertTrue("Must be true", transactionSuccessful); ServiceFunction serviceFunction = SfcProviderServiceFunctionAPI.readServiceFunction(SF_NAME); assertNotNull("Must be not null", serviceFunction); assertEquals("Must be equal", serviceFunction.getIpMgmtAddress().getIpv4Address().getValue(), IP_MGMT_ADDRESS.get(1)); transactionSuccessful = writeRemoveServiceFunction(IP_MGMT_ADDRESS.get(1), false); assertTrue("Must be true", transactionSuccessful); }
public static ServiceFunction readServiceFunction(SfName serviceFunctionName) { printTraceStart(LOG); ServiceFunction sf; InstanceIdentifier<ServiceFunction> sfIID; ServiceFunctionKey serviceFunctionKey = new ServiceFunctionKey(serviceFunctionName); sfIID = InstanceIdentifier.builder(ServiceFunctions.class) .child(ServiceFunction.class, serviceFunctionKey) .build(); sf = SfcDataStoreAPI.readTransactionAPI(sfIID, LogicalDatastoreType.CONFIGURATION); printTraceStop(LOG); return sf; }
SfcProviderServiceFunctionAPI { public static ServiceFunction readServiceFunction(SfName serviceFunctionName) { printTraceStart(LOG); ServiceFunction sf; InstanceIdentifier<ServiceFunction> sfIID; ServiceFunctionKey serviceFunctionKey = new ServiceFunctionKey(serviceFunctionName); sfIID = InstanceIdentifier.builder(ServiceFunctions.class) .child(ServiceFunction.class, serviceFunctionKey) .build(); sf = SfcDataStoreAPI.readTransactionAPI(sfIID, LogicalDatastoreType.CONFIGURATION); printTraceStop(LOG); return sf; } }
SfcProviderServiceFunctionAPI { public static ServiceFunction readServiceFunction(SfName serviceFunctionName) { printTraceStart(LOG); ServiceFunction sf; InstanceIdentifier<ServiceFunction> sfIID; ServiceFunctionKey serviceFunctionKey = new ServiceFunctionKey(serviceFunctionName); sfIID = InstanceIdentifier.builder(ServiceFunctions.class) .child(ServiceFunction.class, serviceFunctionKey) .build(); sf = SfcDataStoreAPI.readTransactionAPI(sfIID, LogicalDatastoreType.CONFIGURATION); printTraceStop(LOG); return sf; }  }
SfcProviderServiceFunctionAPI { public static ServiceFunction readServiceFunction(SfName serviceFunctionName) { printTraceStart(LOG); ServiceFunction sf; InstanceIdentifier<ServiceFunction> sfIID; ServiceFunctionKey serviceFunctionKey = new ServiceFunctionKey(serviceFunctionName); sfIID = InstanceIdentifier.builder(ServiceFunctions.class) .child(ServiceFunction.class, serviceFunctionKey) .build(); sf = SfcDataStoreAPI.readTransactionAPI(sfIID, LogicalDatastoreType.CONFIGURATION); printTraceStop(LOG); return sf; }  static List<SfServicePath> readServiceFunctionState(SfName serviceFunctionName); static List<RspName> getRspsBySfName(SfName serviceFunctionName); static SfcSfDescMon readServiceFunctionDescriptionMonitor(SfName serviceFunctionName); static boolean deleteServiceFunctionState(SfName serviceFunctionName); static boolean addPathToServiceFunctionState(RenderedServicePath renderedServicePath); static boolean putServiceFunction(ServiceFunction sf); static boolean putServiceFunctionState(ServiceFunctionState sfState); static boolean mergeServiceFunctionState(ServiceFunctionState sfState); static ServiceFunction readServiceFunction(SfName serviceFunctionName); static boolean deleteServicePathFromServiceFunctionState(SfpName sfpName); static boolean deleteServicePathFromServiceFunctionState(List<RspName> rspNames); static boolean deleteRspFromServiceFunctionState(RspName rspName); }
SfcProviderServiceFunctionAPI { public static ServiceFunction readServiceFunction(SfName serviceFunctionName) { printTraceStart(LOG); ServiceFunction sf; InstanceIdentifier<ServiceFunction> sfIID; ServiceFunctionKey serviceFunctionKey = new ServiceFunctionKey(serviceFunctionName); sfIID = InstanceIdentifier.builder(ServiceFunctions.class) .child(ServiceFunction.class, serviceFunctionKey) .build(); sf = SfcDataStoreAPI.readTransactionAPI(sfIID, LogicalDatastoreType.CONFIGURATION); printTraceStop(LOG); return sf; }  static List<SfServicePath> readServiceFunctionState(SfName serviceFunctionName); static List<RspName> getRspsBySfName(SfName serviceFunctionName); static SfcSfDescMon readServiceFunctionDescriptionMonitor(SfName serviceFunctionName); static boolean deleteServiceFunctionState(SfName serviceFunctionName); static boolean addPathToServiceFunctionState(RenderedServicePath renderedServicePath); static boolean putServiceFunction(ServiceFunction sf); static boolean putServiceFunctionState(ServiceFunctionState sfState); static boolean mergeServiceFunctionState(ServiceFunctionState sfState); static ServiceFunction readServiceFunction(SfName serviceFunctionName); static boolean deleteServicePathFromServiceFunctionState(SfpName sfpName); static boolean deleteServicePathFromServiceFunctionState(List<RspName> rspNames); static boolean deleteRspFromServiceFunctionState(RspName rspName);  }