2 * Copyright (c) 2017 Cisco Systems. 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
8 package org.opendaylight.groupbasedpolicy.renderer.vpp.commands.lisp;
10 import org.opendaylight.groupbasedpolicy.renderer.vpp.commands.lisp.dom.NativeForwardPathDom;
11 import org.opendaylight.groupbasedpolicy.renderer.vpp.util.VppIidFactory;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.gpe.rev170801._native.forward.paths.tables._native.forward.paths.table.NativeForwardPath;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.gpe.rev170801._native.forward.paths.tables._native.forward.paths.table.NativeForwardPathKey;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16 public class ConfigureNativeForwardPathCommand extends AbstractLispCommand<NativeForwardPath> {
17 private NativeForwardPathDom nativeForwardPathDom;
19 public ConfigureNativeForwardPathCommand(NativeForwardPathDom nativeForwardPathDom) {
20 this.nativeForwardPathDom = nativeForwardPathDom;
24 public InstanceIdentifier<NativeForwardPath> getIid() {
25 return VppIidFactory.getNativeForwardPathIid(nativeForwardPathDom.getVrfId(),
26 new NativeForwardPathKey(nativeForwardPathDom.getNextHopIp()));
30 public NativeForwardPath getData() {
31 return nativeForwardPathDom.getSALObject();
34 @Override public String toString() {
35 return "Operation: " + getOperation() + ", Iid: " + this.getIid() + ", " + nativeForwardPathDom.toString();