Search in sources :

Example 1 with ServiceFunctionKey

use of org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sf.rev140701.service.functions.ServiceFunctionKey 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);
}
Also used : ServiceFunctionKey(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sf.rev140701.service.functions.ServiceFunctionKey) ServiceFunctionForwarder(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sff.rev140701.service.function.forwarders.ServiceFunctionForwarder) SffName(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SffName) ServiceFunctionForwarderKey(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sff.rev140701.service.function.forwarders.ServiceFunctionForwarderKey)

Aggregations

SffName (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SffName)1 ServiceFunctionKey (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sf.rev140701.service.functions.ServiceFunctionKey)1 ServiceFunctionForwarder (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sff.rev140701.service.function.forwarders.ServiceFunctionForwarder)1 ServiceFunctionForwarderKey (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sff.rev140701.service.function.forwarders.ServiceFunctionForwarderKey)1