2 * ============LICENSE_START========================================================================
3 * ONAP : ccsdk feature sdnr wt
4 * =================================================================================================
5 * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
6 * =================================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8 * in compliance with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software distributed under the License
13 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14 * or implied. See the License for the specific language governing permissions and limitations under
16 * ============LICENSE_END==========================================================================
18 package org.onap.ccsdk.features.sdnr.wt.devicemanager.types;
20 import java.util.ArrayList;
21 import java.util.List;
24 * Inventory information of a device, used by DCAE
26 public class InventoryInformationDcae {
28 private static final String UNKNOWN = "unknown";
29 private static final List<String> EMPTY = new ArrayList<>();
30 private static final InventoryInformationDcae DEFAULT = new InventoryInformationDcae();
34 private String vendor;
35 private String deviceIpv4;
36 private String deviceIpv6;
37 private List<String> interfaceUuidList;
39 public InventoryInformationDcae() {
42 this.vendor = UNKNOWN;
43 this.deviceIpv4 = UNKNOWN;
44 this.deviceIpv6 = UNKNOWN;
45 this.interfaceUuidList = EMPTY;
48 public InventoryInformationDcae(InventoryInformationDcae inventoryInformation) {
49 this.type = inventoryInformation.type;
50 this.model = inventoryInformation.model;
51 this.vendor = inventoryInformation.vendor;
52 this.deviceIpv4 = inventoryInformation.deviceIpv4;
53 this.deviceIpv6 = inventoryInformation.deviceIpv6;
54 this.interfaceUuidList = new ArrayList<>(inventoryInformation.interfaceUuidList);
57 public InventoryInformationDcae(String type, String model, String vendor, String deviceIpv4, String deviceIpv6,
58 List<String> interfaceUuidList) {
62 setDeviceIpv4(deviceIpv4);
63 setDeviceIpv6(deviceIpv6);
64 setInterfaceUuidList(interfaceUuidList);
67 public String getType() {
71 public String getModel() {
75 public String getVendor() {
79 public String getDeviceIpv4() {
83 public String getDeviceIpv6() {
87 public List<String> getInterfaceUuidList() {
88 return interfaceUuidList;
91 public InventoryInformationDcae setType(String type) {
92 this.type = type != null ? type : UNKNOWN;
96 public InventoryInformationDcae setModel(String model) {
97 this.model = model != null ? model : UNKNOWN;
101 public InventoryInformationDcae setVendor(String vendor) {
102 this.vendor = vendor != null ? vendor : UNKNOWN;
106 public InventoryInformationDcae setDeviceIpv4(String deviceIpv4) {
107 this.deviceIpv4 = deviceIpv4 != null ? deviceIpv4 : UNKNOWN;
111 public InventoryInformationDcae setDeviceIpv6(String deviceIpv6) {
112 this.deviceIpv6 = deviceIpv6 != null ? deviceIpv6 : UNKNOWN;
116 public InventoryInformationDcae setInterfaceUuidList(List<String> interfaceUuidList) {
117 this.interfaceUuidList = interfaceUuidList != null ? interfaceUuidList : EMPTY;
121 public static InventoryInformationDcae getDefault() {
126 public String toString() {
127 return "InventoryInformation [type=" + type + ", model=" + model + ", vendor=" + vendor + ", deviceIpv4="
128 + deviceIpv4 + ", deviceIpv6=" + deviceIpv6 + ", interfaceUuidList=" + interfaceUuidList + "]";