1 package org.opendaylight.mwtn.base.internalTypes;
3 import java.util.ArrayList;
6 import javax.annotation.Nonnull;
8 public class InventoryInformation {
10 public static final String UNKNOWN = "unknown";
11 public static final InventoryInformation DEFAULT = new InventoryInformation(InventoryInformation.UNKNOWN, InventoryInformation.UNKNOWN, InventoryInformation.UNKNOWN, InventoryInformation.UNKNOWN, InventoryInformation.UNKNOWN, new ArrayList<String>());
12 private final String type;
13 private final String model;
14 private final String vendor;
15 private final String deviceIpv4;
16 private final String deviceIpv6;
17 private final List<String> interfaceUuidList;
20 public String getType() {return this.type;}
21 public String getModel() {return this.model;}
22 public String getVendor() {return this.vendor;}
23 public String getDeviceIpv4() {return this.deviceIpv4;}
24 public String getDeviceIpv6() {return this.deviceIpv6;}
25 public List<String> getInterfaceUuidList(){return this.interfaceUuidList;}
27 public InventoryInformation(String type,String model,String vendor,String ipv4,String ipv6,List<String> ifInfos )
34 this.interfaceUuidList=ifInfos;
38 public @Nonnull static InventoryInformation fromNeXML(String xmlRaw,String layerProtocolFilter)
40 List<String> uuids = new ArrayList<String>();
41 String type=InventoryInformation.UNKNOWN;
42 String model=InventoryInformation.UNKNOWN;
43 String vendor=InventoryInformation.UNKNOWN;
44 String ipv4=InventoryInformation.UNKNOWN;
45 String ipv6=InventoryInformation.UNKNOWN;
47 //TODO: parse xml document
49 return new InventoryInformation(type, model, vendor, ipv4, ipv6, uuids);