2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.so.openstack.beans;
25 import java.util.ArrayList;
26 import java.util.List;
29 * This Java bean class relays Network details (including status) to ActiveVOS processes.
31 * This bean is returned by all Network-specific adapter operations (create, query, delete)
34 public class NetworkInfo {
35 // Set defaults for everything
36 private String name = "";
37 private String id = "";
38 private NetworkStatus status = NetworkStatus.UNKNOWN;
39 private String provider = "";
40 private List<Integer> vlans = new ArrayList<>();
41 private List<String> subnets = new ArrayList<>();
42 private String shared = "";
44 public NetworkInfo() {}
46 public NetworkInfo(String name, NetworkStatus status) {
48 this.id = name; // Don't have an ID, so just use name
52 public String getName() {
56 public void setName(String name) {
60 public String getId() {
64 public void setId(String id) {
68 public NetworkStatus getStatus() {
72 public void setStatus(NetworkStatus status) {
76 public String getProvider() {
80 public void setProvider(String provider) {
81 this.provider = provider;
84 public List<Integer> getVlans() {
88 public void setVlans(List<Integer> vlans) {
92 public List<String> getSubnets() {
96 public void setSubnets(List<String> subnets) {
97 this.subnets = subnets;
100 public String getShared() {
104 public void setShared(String shared) {
105 this.shared = shared;
109 public String toString() {
110 return "NetworkInfo{" + "name='" + name + '\'' + ", id='" + id + '\'' + ", status=" + status + ", provider='"
111 + provider + '\'' + ", vlans=" + vlans + ", subnets=" + subnets + '}';