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;
24 import java.io.Serializable;
25 import java.util.List;
27 import org.onap.so.entity.MsoRequest;
29 import com.fasterxml.jackson.annotation.JsonInclude;
30 import com.fasterxml.jackson.annotation.JsonInclude.Include;
33 * Javabean representing the rollback criteria following a "Create Network"
34 * or "Update Network" operation. This structure can be passed back to the
35 * "Rollback Network" operation to undo the effects of the create/update.
37 * Once a network is created, the only possible update through MSO is to
38 * the set of VLANs supported by the network. The vlans attribute of the
39 * rollback object contains the previous VLANs before update.
43 @JsonInclude(Include.NON_EMPTY)
44 public class NetworkRollback implements Serializable{
48 private static final long serialVersionUID = 11949663223019185L;
49 private String networkId;
50 private String neutronNetworkId;
51 private String networkStackId;
52 private String tenantId;
53 private String cloudId;
54 private String networkType;
55 private String modelCustomizationUuid;
56 private boolean networkCreated = false;
57 // Previous values for updates
58 private String networkName = null;
59 private String physicalNetwork = null;
60 private List<Integer> vlans = null;
61 private MsoRequest msoRequest;
63 public String getNetworkId() {
66 public void setNetworkId(String networkId) {
67 this.networkId = networkId;
70 public String getNeutronNetworkId() {
71 return neutronNetworkId;
73 public void setNeutronNetworkId(String neutronNetworkId) {
74 this.neutronNetworkId = neutronNetworkId;
77 public String getNetworkStackId() {
78 return networkStackId;
80 public void setNetworkStackId(String networkStackId) {
81 this.networkStackId = networkStackId;
83 public String getTenantId() {
86 public void setTenantId(String tenantId) {
87 this.tenantId = tenantId;
90 public String getCloudId() {
93 public void setCloudId(String cloudId) {
94 this.cloudId = cloudId;
97 public String getNetworkType() {
100 public void setNetworkType(String networkType) {
101 this.networkType = networkType;
104 public String getModelCustomizationUuid() {
105 return this.modelCustomizationUuid;
108 public void setModelCustomizationUuid(String modelCustomizationUuid) {
109 this.modelCustomizationUuid = modelCustomizationUuid;
112 public boolean getNetworkCreated() {
113 return networkCreated;
115 public void setNetworkCreated(boolean networkCreated) {
116 this.networkCreated = networkCreated;
119 public String getNetworkName() {
122 public void setNetworkName(String networkName) {
123 this.networkName = networkName;
126 public String getPhysicalNetwork() {
127 return physicalNetwork;
129 public void setPhysicalNetwork(String physicalNetwork) {
130 this.physicalNetwork = physicalNetwork;
133 public List<Integer> getVlans () {
136 public void setVlans (List<Integer> vlans) {
140 public MsoRequest getMsoRequest() {
143 public void setMsoRequest (MsoRequest msoRequest) {
144 this.msoRequest = msoRequest;
148 public String toString() {
149 return "NetworkRollback [networkId=" + networkId
150 + ", neutronNetworkId=" + neutronNetworkId + ", networkStackId="
151 + networkStackId + ", tenantId=" + tenantId + ", cloudId="
152 + cloudId + ", networkType=" + networkType
153 + ", networkCreated=" + networkCreated + ", networkName=" + networkName
154 + ", physicalNetwork=" + physicalNetwork + "]";