2 * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. 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
8 package org.opendaylight.netvirt.elan.l2gw.ha.commands;
10 import java.util.List;
11 import java.util.Objects;
12 import org.eclipse.jdt.annotation.Nullable;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentationBuilder;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical._switch.attributes.TunnelIps;
16 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
17 import org.opendaylight.yangtools.yang.binding.Identifier;
18 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
20 public class TunnelIpCmd extends
21 MergeCommand<TunnelIps, PhysicalSwitchAugmentationBuilder, PhysicalSwitchAugmentation> {
23 public TunnelIpCmd() {
28 public List<TunnelIps> getData(PhysicalSwitchAugmentation node) {
30 return node.getTunnelIps();
36 public void setData(PhysicalSwitchAugmentationBuilder builder, List<TunnelIps> data) {
37 builder.setTunnelIps(data);
41 public InstanceIdentifier<TunnelIps> generateId(InstanceIdentifier<Node> id, TunnelIps src) {
42 return id.augmentation(PhysicalSwitchAugmentation.class).child(TunnelIps.class, src.key());
46 public TunnelIps transform(InstanceIdentifier<Node> nodePath, TunnelIps src) {
51 public Identifier getKey(TunnelIps data) {
56 public String getDescription() {
61 public boolean areEqual(TunnelIps updated, TunnelIps orig) {
62 return Objects.equals(updated, orig);
66 public TunnelIps withoutUuid(TunnelIps data) {