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.openstack.beans;
24 import java.util.List;
26 import org.openecomp.mso.entity.MsoRequest;
28 import com.fasterxml.jackson.annotation.JsonInclude;
29 import com.fasterxml.jackson.annotation.JsonInclude.Include;
32 * Javabean representing the rollback criteria following a "Create Network"
33 * or "Update Network" operation. This structure can be passed back to the
34 * "Rollback Network" operation to undo the effects of the create/update.
36 * Once a network is created, the only possible update through MSO is to
37 * the set of VLANs supported by the network. The vlans attribute of the
38 * rollback object contains the previous VLANs before update.
42 @JsonInclude(Include.NON_EMPTY)
43 public class NetworkRollback {
44 private String networkId;
45 private String neutronNetworkId;
46 private String networkStackId;
47 private String tenantId;
48 private String cloudId;
49 private String networkType;
50 private String modelCustomizationUuid;
51 private boolean networkCreated = false;
52 // Previous values for updates
53 private String networkName = null;
54 private String physicalNetwork = null;
55 private List<Integer> vlans = null;
56 private MsoRequest msoRequest;
58 public String getNetworkId() {
61 public void setNetworkId(String networkId) {
62 this.networkId = networkId;
65 public String getNeutronNetworkId() {
66 return neutronNetworkId;
68 public void setNeutronNetworkId(String neutronNetworkId) {
69 this.neutronNetworkId = neutronNetworkId;
72 public String getNetworkStackId() {
73 return networkStackId;
75 public void setNetworkStackId(String networkStackId) {
76 this.networkStackId = networkStackId;
78 public String getTenantId() {
81 public void setTenantId(String tenantId) {
82 this.tenantId = tenantId;
85 public String getCloudId() {
88 public void setCloudId(String cloudId) {
89 this.cloudId = cloudId;
92 public String getNetworkType() {
95 public void setNetworkType(String networkType) {
96 this.networkType = networkType;
99 public String getModelCustomizationUuid() {
100 return this.modelCustomizationUuid;
103 public void setModelCustomizationUuid(String modelCustomizationUuid) {
104 this.modelCustomizationUuid = modelCustomizationUuid;
107 public boolean getNetworkCreated() {
108 return networkCreated;
110 public void setNetworkCreated(boolean networkCreated) {
111 this.networkCreated = networkCreated;
114 public String getNetworkName() {
117 public void setNetworkName(String networkName) {
118 this.networkName = networkName;
121 public String getPhysicalNetwork() {
122 return physicalNetwork;
124 public void setPhysicalNetwork(String physicalNetwork) {
125 this.physicalNetwork = physicalNetwork;
128 public List<Integer> getVlans () {
131 public void setVlans (List<Integer> vlans) {
135 public MsoRequest getMsoRequest() {
138 public void setMsoRequest (MsoRequest msoRequest) {
139 this.msoRequest = msoRequest;
143 public String toString() {
144 return "NetworkRollback [networkId=" + networkId
145 + ", neutronNetworkId=" + neutronNetworkId + ", networkStackId="
146 + networkStackId + ", tenantId=" + tenantId + ", cloudId="
147 + cloudId + ", networkType=" + networkType
148 + ", networkCreated=" + networkCreated + ", networkName=" + networkName
149 + ", physicalNetwork=" + physicalNetwork + "]";