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 () {
47 public NetworkInfo (String name, NetworkStatus status) {
49 this.id = name; // Don't have an ID, so just use name
53 public String getName() {
57 public void setName (String name) {
61 public String getId() {
65 public void setId (String id) {
69 public NetworkStatus getStatus() {
73 public void setStatus (NetworkStatus status) {
77 public String getProvider() {
81 public void setProvider (String provider) {
82 this.provider = provider;
85 public List<Integer> getVlans () {
89 public void setVlans (List<Integer> vlans) {
93 public List<String> getSubnets () {
97 public void setSubnets (List<String> subnets) {
98 this.subnets = subnets;
101 public String getShared() {
105 public void setShared(String shared) {
106 this.shared = shared;
110 public String toString() {
111 return "NetworkInfo{" + "name='" + name + '\'' +
112 ", id='" + id + '\'' +
113 ", status=" + status +
114 ", provider='" + provider + '\'' +
116 ", subnets=" + subnets +