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.openecomp.mso.adapters.nwrest;
25 import org.openecomp.mso.openstack.beans.NetworkStatus;
27 import java.util.List;
30 import javax.xml.bind.annotation.XmlRootElement;
32 import org.codehaus.jackson.map.ObjectMapper;
33 import org.jboss.resteasy.annotations.providers.NoJackson;
35 @XmlRootElement(name = "queryNetworkResponse")
37 public class QueryNetworkResponse {
38 private String networkId;
39 private String neutronNetworkId;
40 private String networkStackId;
41 private Boolean networkExists;
42 private NetworkStatus networkStatus;
43 private List<Integer> vlans;
44 private List<String> routeTargets;
45 private Map<String, String> subnetIdMap;
46 private Map<String, String> networkOutputs;
48 public QueryNetworkResponse() {
52 public QueryNetworkResponse(String networkId, String neutronNetworkId,
53 String networkStackId, NetworkStatus networkStatus,
54 Map<String, String> networkOutputs) {
56 this.networkId = networkId;
57 this.neutronNetworkId = neutronNetworkId;
58 this.networkStackId = networkStackId;
59 this.networkStatus = networkStatus;
60 this.networkOutputs = networkOutputs;
63 public String getNetworkId() {
67 public void setNetworkId(String networkId) {
68 this.networkId = networkId;
71 public String getNeutronNetworkId() {
72 return neutronNetworkId;
75 public void setNeutronNetworkId(String neutronNetworkId) {
76 this.neutronNetworkId = neutronNetworkId;
79 public String getNetworkStackId() {
80 return networkStackId;
83 public void setNetworkStackId(String networkStackId) {
84 this.networkStackId = networkStackId;
87 public NetworkStatus getNetworkStatus() {
91 public void setNetworkStatus(NetworkStatus networkStatus) {
92 this.networkStatus = networkStatus;
95 public Boolean getNetworkExists() {
99 public void setNetworkExists(Boolean networkExists) {
100 this.networkExists = networkExists;
103 public List<Integer> getVlans() {
107 public void setVlans(List<Integer> vlans) {
111 public List<String> getRouteTargets() {
115 public void setRouteTargets(List<String> routeTargets) {
116 this.routeTargets = routeTargets;
119 public Map<String, String> getSubnetIdMap() {
123 public void setSubnetIdMap(Map<String, String> subnetIdMap) {
124 this.subnetIdMap = subnetIdMap;
127 public Map<String, String> getNetworkOutputs() {
128 return networkOutputs;
131 public void setNetworkOutputs(Map<String, String> networkOutputs) {
132 this.networkOutputs = networkOutputs;
135 public String toJsonString() {
136 String jsonString = null;
138 ObjectMapper mapper = new ObjectMapper();
139 jsonString = mapper.writeValueAsString(this);
141 catch (Exception e) {}