BUG:5021 ELan datapath code-changes and cleanUp some code.
[vpnservice.git] / interfacemgr / interfacemgr-api / src / main / java / org / opendaylight / vpnservice / interfacemgr / globals / LogicalGroupInterfaceInfo.java
1 /*
2  * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.vpnservice.interfacemgr.globals;
9
10 import java.math.BigInteger;
11 import java.util.List;
12 import java.util.ArrayList;
13
14 public class LogicalGroupInterfaceInfo extends InterfaceInfo {
15
16     /*
17          List of vxlan/GRE physical tunnel interfaces makes a logical tunnel interface
18          between a pair of DPNs
19
20      */
21
22     private List<String> parentInterfaceNames;
23
24     public LogicalGroupInterfaceInfo(String portName, BigInteger srcDpId,List<String> pInterfaces) {
25         super(srcDpId,portName);
26
27         parentInterfaceNames = new ArrayList(pInterfaces);
28     }
29
30     public List<String> getParentInterfaceNames() {
31         return parentInterfaceNames;
32     }
33
34     public void addParentInterfaceName(String parentIfname) {
35         parentInterfaceNames.add(parentIfname);
36     }
37
38     public int getTotalParentInterfaces() {
39         return parentInterfaceNames.size();
40     }
41
42     public void deleteParentInterfaceName(String parentIfname) {
43         parentInterfaceNames.remove(parentIfname);
44     }
45
46 }
47