2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.groupbasedpolicy.renderer.ofoverlay.sfcutils;
11 import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfc.rev140701.ServiceFunctionChains;
12 import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfc.rev140701.service.function.chain.grouping.ServiceFunctionChain;
13 import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfc.rev140701.service.function.chain.grouping.ServiceFunctionChainKey;
14 import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.ServiceFunctionPaths;
15 import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.ServiceFunctionPath;
16 import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.ServiceFunctionPathKey;
17 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
19 public class SfcIidFactory {
21 private SfcIidFactory() {
22 throw new UnsupportedOperationException();
25 public static InstanceIdentifier<ServiceFunctionChain> sfcIid(String sfcName) {
27 ServiceFunctionChainKey serviceFunctionChainKey =
28 new ServiceFunctionChainKey(sfcName);
29 return InstanceIdentifier.builder(ServiceFunctionChains.class)
30 .child(ServiceFunctionChain.class, serviceFunctionChainKey).build();
33 public static InstanceIdentifier<ServiceFunctionPath> sfpIid(String sfpName) {
35 ServiceFunctionPathKey serviceFunctionPathKey = new ServiceFunctionPathKey(sfpName);
36 return InstanceIdentifier.builder(ServiceFunctionPaths.class)
37 .child(ServiceFunctionPath.class, serviceFunctionPathKey).build();