Search in sources :

Example 1 with ServiceFunctionPathBuilder

use of org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.ServiceFunctionPathBuilder in project netvirt by opendaylight.

the class PortChainTranslator method buildServiceFunctionPath.

public static ServiceFunctionPath buildServiceFunctionPath(ServiceFunctionChain sfc) {
    Preconditions.checkNotNull(sfc, "Service Function Chain must not be null");
    ServiceFunctionPathBuilder sfpBuilder = new ServiceFunctionPathBuilder();
    // Set the name
    sfpBuilder.setName(new SfpName(SFP_NAME_PREFIX + sfc.getName().getValue()));
    sfpBuilder.setSymmetric(sfc.isSymmetric());
    // Set related SFC name
    sfpBuilder.setServiceChainName(sfc.getName());
    return sfpBuilder.build();
}
Also used : ServiceFunctionPathBuilder(org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.ServiceFunctionPathBuilder) 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 ServiceFunctionPathBuilder (org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.ServiceFunctionPathBuilder)1