use of org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sff.rev140701.service.function.forwarders.ServiceFunctionForwarderKey in project netvirt by opendaylight.
the class NeutronPortPairListener method remove.
/**
* Method removes PortPair which is identified by InstanceIdentifier.
*
* @param deletedPortPair - PortPair for removing
*/
@Override
public void remove(PortPair deletedPortPair) {
LOG.info("Received remove port pair event {}", deletedPortPair);
ServiceFunctionKey sfKey = PortPairTranslator.getSFKey(deletedPortPair);
LOG.info("Removing service function {}", sfKey);
sfcMdsalHelper.removeServiceFunction(sfKey);
ServiceFunctionForwarder sff;
ServiceFunctionForwarder updatedSff;
SffName sffName = new SffName(SfcMdsalHelper.NETVIRT_LOGICAL_SFF_NAME);
sff = sfcMdsalHelper.readServiceFunctionForwarder(new ServiceFunctionForwarderKey(sffName));
updatedSff = PortPairGroupTranslator.removePortPairFromServiceFunctionForwarder(sff, deletedPortPair);
LOG.info("Updating service function forwarder as {}", updatedSff);
sfcMdsalHelper.addServiceFunctionForwarder(updatedSff);
}
use of org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sff.rev140701.service.function.forwarders.ServiceFunctionForwarderKey in project netvirt by opendaylight.
the class SfcProvider method getServiceFunctionForwarder.
private Optional<ServiceFunctionForwarder> getServiceFunctionForwarder(SffName name) {
ServiceFunctionForwarderKey serviceFunctionForwarderKey = new ServiceFunctionForwarderKey(name);
InstanceIdentifier<ServiceFunctionForwarder> sffIid;
sffIid = InstanceIdentifier.builder(ServiceFunctionForwarders.class).child(ServiceFunctionForwarder.class, serviceFunctionForwarderKey).build();
return MDSALUtil.read(dataBroker, LogicalDatastoreType.CONFIGURATION, sffIid).toJavaUtil();
}
use of org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sff.rev140701.service.function.forwarders.ServiceFunctionForwarderKey in project netvirt by opendaylight.
the class SfcProviderTest method storeSff.
@SuppressWarnings("deprecation")
private void storeSff(SffName sffName, ServiceFunctionForwarder sff) {
InstanceIdentifier<ServiceFunctionForwarder> sffIid;
sffIid = InstanceIdentifier.builder(ServiceFunctionForwarders.class).child(ServiceFunctionForwarder.class, new ServiceFunctionForwarderKey(sffName)).build();
MDSALUtil.syncWrite(getDataBroker(), LogicalDatastoreType.CONFIGURATION, sffIid, sff);
}
Aggregations