Assign image keyname and pubkey at vnf level
[ccsdk/apps.git] / sdnr / wireless-transport / code-Carbon-SR1 / apps / devicemanager / impl / src / main / java / org / opendaylight / mwtn / base / internalTypes / InventoryInformation.java
1 package org.opendaylight.mwtn.base.internalTypes;
2
3 import java.util.ArrayList;
4 import java.util.List;
5
6 import javax.annotation.Nonnull;
7
8 public class InventoryInformation {
9
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;
18
19
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;}
26
27         public InventoryInformation(String type,String model,String vendor,String ipv4,String ipv6,List<String> ifInfos )
28         {
29                 this.type=type;
30                 this.model=model;
31                 this.vendor=vendor;
32                 this.deviceIpv4=ipv4;
33                 this.deviceIpv6=ipv6;
34                 this.interfaceUuidList=ifInfos;
35
36         }
37
38         public @Nonnull static InventoryInformation fromNeXML(String xmlRaw,String layerProtocolFilter)
39         {
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;
46
47                 //TODO: parse xml document
48
49                 return new InventoryInformation(type, model, vendor, ipv4, ipv6, uuids);
50         }
51 }