use of org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.state.ServiceFunctionPathState in project netvirt by opendaylight.
the class SfcProvider method readServicePathState.
public Optional<List<String>> readServicePathState(String sfpName) {
ServiceFunctionPathStateKey serviceFunctionPathStateKey = new ServiceFunctionPathStateKey(new SfpName(sfpName));
InstanceIdentifier<ServiceFunctionPathState> sfpIiD;
sfpIiD = InstanceIdentifier.builder(ServiceFunctionPathsState.class).child(ServiceFunctionPathState.class, serviceFunctionPathStateKey).build();
return MDSALUtil.read(dataBroker, LogicalDatastoreType.OPERATIONAL, sfpIiD).toJavaUtil().map(ServiceFunctionPathState::getSfpRenderedServicePath).map(sfpRenderedServicePaths -> sfpRenderedServicePaths.stream().map(sfpRenderedServicePath -> sfpRenderedServicePath.getName().getValue()).collect(Collectors.toList()));
}
Aggregations