aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java
blob: 11a74d449449a29029685fa325806f9f0c0535f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/*-
 * ============LICENSE_START=======================================================
 * OPENECOMP - MSO
 * ================================================================================
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */

package org.openecomp.mso.openstack.beans;


import java.util.List;

import org.openecomp.mso.entity.MsoRequest;

/**
 * Javabean representing the rollback criteria following a "Create Network"
 * or "Update Network" operation.  This structure can be passed back to the
 * "Rollback Network" operation to undo the effects of the create/update.
 *
 * Once a network is created, the only possible update through MSO is to
 * the set of VLANs supported by the network.  The vlans attribute of the
 * rollback object contains the previous VLANs before update.
 *
 *
 */
public class NetworkRollback {
	private String networkId;
	private String neutronNetworkId;
	private String networkStackId;
	private String tenantId;
	private String cloudId;
	private String networkType;
	private boolean networkCreated = false;
	// Previous values for updates
	private String networkName = null;
	private String physicalNetwork = null;
	private List<Integer> vlans = null;
	private MsoRequest msoRequest;

	public String getNetworkId() {
		return networkId;
	}
	public void setNetworkId(String networkId) {
		this.networkId = networkId;
	}

	public String getNeutronNetworkId() {
		return neutronNetworkId;
	}
	public void setNeutronNetworkId(String neutronNetworkId) {
		this.neutronNetworkId = neutronNetworkId;
	}
	
	public String getNetworkStackId() {
		return networkStackId;
	}
	public void setNetworkStackId(String networkStackId) {
		this.networkStackId = networkStackId;
	}
	public String getTenantId() {
		return tenantId;
	}
	public void setTenantId(String tenantId) {
		this.tenantId = tenantId;
	}

	public String getCloudId() {
		return cloudId;
	}
	public void setCloudId(String cloudId) {
		this.cloudId = cloudId;
	}

	public String getNetworkType() {
		return networkType;
	}
	public void setNetworkType(String networkType) {
		this.networkType = networkType;
	}

	public boolean getNetworkCreated() {
		return networkCreated;
	}
	public void setNetworkCreated(boolean networkCreated) {
		this.networkCreated = networkCreated;
	}

	public String getNetworkName() {
		return networkName;
	}
	public void setNetworkName(String networkName) {
		this.networkName = networkName;
	}

	public String getPhysicalNetwork() {
		return physicalNetwork;
	}
	public void setPhysicalNetwork(String physicalNetwork) {
		this.physicalNetwork = physicalNetwork;
	}

	public List<Integer> getVlans () {
		return vlans;
	}
	public void setVlans (List<Integer> vlans) {
		this.vlans = vlans;
	}

	public MsoRequest getMsoRequest() {
		return msoRequest;
	}
	public void setMsoRequest (MsoRequest msoRequest) {
		this.msoRequest = msoRequest;
	}
	
	@Override
	public String toString() {
		return "NetworkRollback [networkId=" + networkId
				+ ", neutronNetworkId=" + neutronNetworkId + ", networkStackId="
				+ networkStackId + ", tenantId=" + tenantId + ", cloudId="
				+ cloudId + ", networkType=" + networkType
				+ ", networkCreated=" + networkCreated + ", networkName=" + networkName
				+ ", physicalNetwork=" + physicalNetwork + "]";
	}
    
}