Пример #1
0
  @Override
  public Future<RpcResult<Void>> putServiceFunctionChains(PutServiceFunctionChainsInput input) {
    printTraceStart(LOG);
    ServiceFunctionChainsBuilder serviceFunctionChainsBuilder = new ServiceFunctionChainsBuilder();
    serviceFunctionChainsBuilder =
        serviceFunctionChainsBuilder.setServiceFunctionChain(input.getServiceFunctionChain());
    ServiceFunctionChains sfcs = serviceFunctionChainsBuilder.build();

    if (!SfcDataStoreAPI.writeMergeTransactionAPI(
        OpendaylightSfc.SFC_IID, sfcs, LogicalDatastoreType.CONFIGURATION)) {
      LOG.error(
          "Failed to create service function chain: {}",
          input.getServiceFunctionChain().toString());
    }
    return Futures.immediateFuture(Rpcs.<Void>getRpcResult(true, Collections.<RpcError>emptySet()));
  }
  public ServiceFunctionChainsBuilder serviceFunctionChainsBuilder(
      ServiceFunctionChainsBuilder serviceFunctionChainsBuilder,
      List<ServiceFunctionChain> serviceFunctionChainBuilderList) {

    return serviceFunctionChainsBuilder.setServiceFunctionChain(serviceFunctionChainBuilderList);
  }