Search in sources :

Example 1 with ServiceFunctionPathStateKey

use of org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.state.ServiceFunctionPathStateKey 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()));
}
Also used : ServiceFunctionPathStateKey(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.state.ServiceFunctionPathStateKey) ServiceFunctionPathState(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.state.ServiceFunctionPathState) ServiceFunctionPathsState(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.ServiceFunctionPathsState) SfpName(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SfpName)

Aggregations

SfpName (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SfpName)1 ServiceFunctionPathsState (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.ServiceFunctionPathsState)1 ServiceFunctionPathState (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.state.ServiceFunctionPathState)1 ServiceFunctionPathStateKey (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.state.ServiceFunctionPathStateKey)1