public void addServiceFunctionForwarder(ServiceFunctionForwarder sff) { InstanceIdentifier<ServiceFunctionForwarder> sffIid = getSFFPath(sff.getKey()); LOG.info("Write Service Function Forwarder {} to config data store at {}",sff, sffIid); mdsalPutWrapper(LogicalDatastoreType.CONFIGURATION, sffIid, sff); }
public static void lispUpdateServiceFunctionForwarder(ServiceFunctionForwarder sff) { LOG.debug("\n####### Start: {}", Thread.currentThread().getStackTrace()[1]); if (OpendaylightSfc.getOpendaylightSfcObj().getDataProvider() != null) { sff = LispUpdater.getLispUpdaterObj().updateLispData(sff); InstanceIdentifier<ServiceFunctionForwarder> sffEntryIID = InstanceIdentifier.builder(ServiceFunctionForwarders.class) .child(ServiceFunctionForwarder.class, sff.getKey()).build(); WriteTransaction writeTx = OpendaylightSfc.getOpendaylightSfcObj().getDataProvider().newWriteOnlyTransaction(); writeTx.merge(LogicalDatastoreType.CONFIGURATION, sffEntryIID, sff, true); writeTx.submit(); } LOG.debug("\n########## Stop: {}", Thread.currentThread().getStackTrace()[1]); }
/** * This method creates a SFF in the data store * <p> * * @param sff SFF object * @return true if SFF was created, false otherwise */ public static boolean putServiceFunctionForwarder(ServiceFunctionForwarder sff) { boolean ret; printTraceStart(LOG); InstanceIdentifier<ServiceFunctionForwarder> sffEntryIID = InstanceIdentifier .builder(ServiceFunctionForwarders.class).child(ServiceFunctionForwarder.class, sff.getKey()).build(); ret = SfcDataStoreAPI.writePutTransactionAPI(sffEntryIID, sff, LogicalDatastoreType.CONFIGURATION); printTraceStop(LOG); return ret; }