summaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/HeatStatus.java30
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/MsoTenant.java66
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java177
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java139
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkStatus.java31
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Pool.java69
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java155
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java200
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfRollback.java152
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfStatus.java30
10 files changed, 1049 insertions, 0 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/HeatStatus.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/HeatStatus.java
new file mode 100644
index 0000000000..8c51c746ef
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/HeatStatus.java
@@ -0,0 +1,30 @@
+/*-
+ * ============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;
+
+
+/*
+ * Enum status values to mirror the Openstack Heat stack status values
+ */
+public enum HeatStatus {
+ INIT, CREATED, NOTFOUND, FAILED, BUILDING, DELETING, UNKNOWN, UPDATING, UPDATED
+}
+
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/MsoTenant.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/MsoTenant.java
new file mode 100644
index 0000000000..95a58f35dd
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/MsoTenant.java
@@ -0,0 +1,66 @@
+/*-
+ * ============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.Map;
+
+/**
+ * This bean class represents the Openstack tenant properties that are
+ * needed by MSO.
+ *
+ *
+ */
+public class MsoTenant {
+ private String tenantId;
+ private String tenantName;
+ private Map<String,String> metadata;
+
+ public MsoTenant() {}
+
+ public MsoTenant (String id, String name, Map<String,String> metadata) {
+ this.tenantId = id;
+ this.tenantName = name;
+ this.metadata = metadata;
+ }
+
+ public String getTenantId() {
+ return tenantId;
+ }
+ public void setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ }
+
+ public String getTenantName() {
+ return tenantName;
+ }
+ public void setTenantName(String tenantName) {
+ this.tenantName = tenantName;
+ }
+
+ public Map<String, String> getMetadata() {
+ return metadata;
+ }
+ public void setMetadata(Map<String, String> metadata) {
+ this.metadata = metadata;
+ }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java
new file mode 100644
index 0000000000..11bf63b5c1
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java
@@ -0,0 +1,177 @@
+/*-
+ * ============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.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+
+import com.woorea.openstack.quantum.model.Network;
+import com.woorea.openstack.quantum.model.Segment;
+
+/*
+ * This Java bean class relays Network details (including status) to ActiveVOS processes.
+ *
+ * This bean is returned by all Network-specific adapter operations (create, query, delete)
+ */
+
+public class NetworkInfo {
+ // Set defaults for everything
+ private String name = "";
+ private String id = "";
+ private NetworkStatus status = NetworkStatus.UNKNOWN;
+ private String provider = "";
+ private List<Integer> vlans = new ArrayList<Integer>();
+ private List<String> subnets = new ArrayList<String>();
+ private String shared = "";
+
+ static Map<String,NetworkStatus> NetworkStatusMap;
+ static {
+ NetworkStatusMap = new HashMap<String,NetworkStatus>();
+ NetworkStatusMap.put("ACTIVE", NetworkStatus.ACTIVE);
+ NetworkStatusMap.put("DOWN", NetworkStatus.DOWN);
+ NetworkStatusMap.put("BUILD", NetworkStatus.BUILD);
+ NetworkStatusMap.put("ERROR", NetworkStatus.ERROR);
+ }
+
+ public NetworkInfo () {
+ }
+
+ public NetworkInfo (String name, NetworkStatus status) {
+ this.name = name;
+ this.id = name; // Don't have an ID, so just use name
+ this.status = status;
+ }
+
+ /**
+ * Capture the data from a Neutron Network object.
+ *
+ * For MSO, there are assumptions regarding all networks.
+ * - Everything will be a provider network
+ * - All provider networks are VLANs
+ * - Multiple VLANs are supported, and indicated by multi-provider segments.
+ * Each will have the same physical network & network type "vlan".
+ *
+ * @param network
+ */
+ public NetworkInfo (Network network)
+ {
+ if (network == null) {
+ this.status = NetworkStatus.NOTFOUND;
+ return;
+ }
+
+ this.name = network.getName();
+ this.id = network.getId();
+
+ if (network.getStatus() == null) {
+ // Can this happen on a newly created network?
+ this.status = NetworkStatus.UNKNOWN;
+ } else if (NetworkStatusMap.containsKey(network.getStatus())) {
+ this.status = NetworkStatusMap.get(network.getStatus());
+ } else {
+ this.status = NetworkStatus.UNKNOWN;
+ }
+
+ if (network.getProviderPhysicalNetwork() != null) {
+ this.provider = network.getProviderPhysicalNetwork();
+ if (network.getProviderNetworkType().equals("vlan")) {
+ this.vlans.add(network.getProviderSegmentationId());
+ }
+ }
+ else if (network.getSegments() != null && network.getSegments().size() > 0) {
+ Segment s = network.getSegments().get(0);
+ this.provider = s.getProviderPhysicalNetwork();
+ if (s.getProviderNetworkType().equals("vlan")) {
+ for (Segment s1 : network.getSegments()) {
+ this.vlans.add(s1.getProviderSegmentationId());
+ }
+ }
+ }
+ this.subnets = network.getSubnets();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName (String name) {
+ this.name = name;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId (String id) {
+ this.id = id;
+ }
+
+ public NetworkStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus (NetworkStatus status) {
+ this.status = status;
+ }
+
+ public String getProvider() {
+ return provider;
+ }
+
+ public void setProvider (String provider) {
+ this.provider = provider;
+ }
+
+ public List<Integer> getVlans () {
+ return vlans;
+ }
+
+ public void setVlans (List<Integer> vlans) {
+ this.vlans = vlans;
+ }
+
+ public List<String> getSubnets () {
+ return subnets;
+ }
+
+ public void setSubnets (List<String> subnets) {
+ this.subnets = subnets;
+ }
+
+ public String getShared() {
+ return shared;
+ }
+
+ public void setShared(String shared) {
+ this.shared = shared;
+ }
+
+ @Override
+ public String toString () {
+ return "Network: name=" + name + ",id=" + id + ",status=" + status +
+ ",provider=" + provider + ",vlans=" + vlans + ",subnets=" + subnets + ",shared=" + shared;
+ }
+}
+
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java
new file mode 100644
index 0000000000..11a74d4494
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java
@@ -0,0 +1,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 + "]";
+ }
+
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkStatus.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkStatus.java
new file mode 100644
index 0000000000..f1a5dad615
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkStatus.java
@@ -0,0 +1,31 @@
+/*-
+ * ============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;
+
+
+/**
+ * Enum status values to mirror the Openstack Neutron
+ * network status values
+ */
+public enum NetworkStatus {
+ NOTFOUND, ACTIVE, DOWN, BUILD, ERROR, UNKNOWN
+}
+
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Pool.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Pool.java
new file mode 100644
index 0000000000..ae179c4354
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Pool.java
@@ -0,0 +1,69 @@
+/*-
+ * ============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 javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "start",
+ "end"
+})
+public class Pool {
+
+ private String start;
+ private String end;
+
+ /**
+ * @return the start
+ */
+ public String getStart() {
+ return start;
+ }
+ /**
+ * @param start the start to set
+ */
+ public void setStart(String start) {
+ this.start = start;
+ }
+ /**
+ * @return the end
+ */
+ public String getEnd() {
+ return end;
+ }
+ /**
+ * @param end the end to set
+ */
+ public void setEnd(String end) {
+ this.end = end;
+ }
+
+ @Override
+ public String toString() {
+ return "Allocation_pool [start=" + start + ", end=" + end + "]";
+ }
+
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java
new file mode 100644
index 0000000000..cdf4b2c34b
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java
@@ -0,0 +1,155 @@
+/*-
+ * ============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.Map;
+import java.util.HashMap;
+
+import com.woorea.openstack.heat.model.Stack;
+
+/*
+ * This Java bean class relays Heat stack status information to ActiveVOS processes.
+ *
+ * This bean is returned by all Heat-specific adapter operations (create, query, delete)
+ */
+
+public class StackInfo {
+ // Set defaults for everything
+ private String name = "";
+ private String canonicalName = "";
+ private HeatStatus status = HeatStatus.UNKNOWN;
+ private String statusMessage = "";
+ private Map<String,Object> outputs = new HashMap<String,Object>();
+ private Map<String,Object> parameters = new HashMap<String,Object>();
+
+ static Map<String,HeatStatus> HeatStatusMap;
+ static {
+ HeatStatusMap = new HashMap<String,HeatStatus>();
+ HeatStatusMap.put("CREATE_IN_PROGRESS", HeatStatus.BUILDING);
+ HeatStatusMap.put("CREATE_COMPLETE", HeatStatus.CREATED);
+ HeatStatusMap.put("CREATE_FAILED", HeatStatus.FAILED);
+ HeatStatusMap.put("DELETE_IN_PROGRESS", HeatStatus.DELETING);
+ HeatStatusMap.put("DELETE_COMPLETE", HeatStatus.NOTFOUND);
+ HeatStatusMap.put("DELETE_FAILED", HeatStatus.FAILED);
+ HeatStatusMap.put("UPDATE_IN_PROGRESS", HeatStatus.UPDATING);
+ HeatStatusMap.put("UPDATE_FAILED", HeatStatus.FAILED);
+ HeatStatusMap.put("UPDATE_COMPLETE", HeatStatus.UPDATED);
+ }
+
+ public StackInfo () {
+ }
+
+ public StackInfo (String name, HeatStatus status, String statusMessage, Map<String,Object> outputs) {
+ this.name = name;
+ this.canonicalName = name; // Don't have an ID, so just use name
+
+ this.status = status;
+ if (statusMessage != null) this.statusMessage = statusMessage;
+ if (outputs != null) this.outputs = outputs;
+ }
+
+ public StackInfo (String name, HeatStatus status) {
+ this.name = name;
+ this.canonicalName = name; // Don't have an ID, so just use name
+ this.status = status;
+ }
+
+ public StackInfo (Stack stack)
+ {
+ if (stack == null) {
+ this.status = HeatStatus.NOTFOUND;
+ return;
+ }
+
+ this.name = stack.getStackName();
+ this.canonicalName = stack.getStackName() + "/" + stack.getId();
+
+ if (stack.getStackStatus() == null) {
+ this.status = HeatStatus.INIT;
+ } else if (HeatStatusMap.containsKey(stack.getStackStatus())) {
+ this.status = HeatStatusMap.get(stack.getStackStatus());
+ } else {
+ this.status = HeatStatus.UNKNOWN;
+ }
+
+ this.statusMessage = stack.getStackStatusReason();
+
+ if (stack.getOutputs() != null) {
+ this.outputs = new HashMap<String,Object>();
+ for (Stack.Output output : stack.getOutputs()) {
+ this.outputs.put(output.getOutputKey(), output.getOutputValue());
+ }
+ }
+
+ this.parameters = stack.getParameters();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName (String name) {
+ this.name = name;
+ }
+
+ public String getCanonicalName() {
+ return canonicalName;
+ }
+
+ public void setCanonicalName (String name) {
+ this.canonicalName = name;
+ }
+
+ public HeatStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus (HeatStatus status) {
+ this.status = status;
+ }
+
+ public String getStatusMessage() {
+ return statusMessage;
+ }
+
+ public void setStatusMessage (String statusMessage) {
+ this.statusMessage = statusMessage;
+ }
+
+ public Map<String,Object> getOutputs () {
+ return outputs;
+ }
+
+ public void setOutputs (Map<String,Object> outputs) {
+ this.outputs = outputs;
+ }
+
+ public Map<String,Object> getParameters () {
+ return parameters;
+ }
+
+ public void setParameters (Map<String,Object> parameters) {
+ this.parameters = parameters;
+ }
+
+}
+
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java
new file mode 100644
index 0000000000..eb514cd565
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java
@@ -0,0 +1,200 @@
+/*-
+ * ============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 javax.xml.bind.annotation.XmlTransient;
+
+public class Subnet {
+
+ private String subnetName;
+
+ private String neutronId;
+
+ private String subnetId; // value from aai
+
+ private String cidr; //Only field required
+
+ private String gatewayIp="";
+
+ private String ipVersion="4";
+
+ private Boolean enableDHCP=false;
+
+ private List<String> hostRoutes;
+
+ private List<Pool> allocationPools;
+
+ private List<String> dnsNameServers;
+
+ public Subnet () {
+ }
+
+ public String getSubnetName() {
+ return subnetName;
+ }
+
+ public void setSubnetName(String subnetName) {
+ this.subnetName = subnetName;
+ }
+
+ public List<Pool> getAllocationPools() {
+ return allocationPools;
+ }
+
+ /**
+ * @return the cidr
+ */
+ public String getCidr() {
+ return cidr;
+ }
+
+ /**
+ * @return the dnsNames
+ */
+ public List<String> getDnsNameServers() {
+ return dnsNameServers;
+ }
+
+
+ public Boolean getEnableDHCP() {
+ return enableDHCP;
+ }
+
+ /**
+ * @return the gw
+ */
+ public String getGatewayIp() {
+ return gatewayIp;
+ }
+
+ /**
+ * @return the hostRoutes
+ */
+ public List<String> getHostRoutes() {
+ return hostRoutes;
+ }
+
+ /**
+ * @return the NeutronId
+ */
+ @XmlTransient
+ public String getNeutronId() {
+ return neutronId;
+ }
+
+ /**
+ * @return the ipversion
+ */
+ public String getIpVersion() {
+ return ipVersion;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getSubnetId() {
+ return subnetId;
+ }
+
+ public void setAllocationPools(List<Pool> allocationPools) {
+ this.allocationPools = allocationPools;
+ }
+
+ /**
+ * @param cidr
+ * the cidr to set
+ */
+ public void setCidr(String cidr) {
+ this.cidr = cidr;
+ }
+
+ /**
+ * @param dnsNames
+ * the dnsNames to set
+ */
+ public void setDnsNameServers(List<String> dnsNameServers) {
+ this.dnsNameServers = dnsNameServers;
+ }
+
+ /**
+ * @param enableDHCP
+ * the enableDHCP to set
+ */
+ public void setEnableDHCP(Boolean enableDHCP) {
+ this.enableDHCP = enableDHCP;
+ }
+
+ /**
+ * @param gw
+ * the gw to set
+ */
+ public void setGatewayIp(String gatewayIp) {
+ this.gatewayIp = gatewayIp;
+ }
+
+ /**
+ * @param hostRoutes
+ * the hostRoutes to set
+ */
+ public void setHostRoutes(List<String> hostRoutes) {
+ this.hostRoutes = hostRoutes;
+ }
+
+ /**
+ * @param neutronId
+ * the id to set
+ */
+ public void setNeutronId(String neutronId) {
+ this.neutronId = neutronId;
+ }
+
+ /**
+ * @param ipversion
+ * the ipversion to set
+ */
+ public void setIpVersion(String ipVersion) {
+ this.ipVersion = ipVersion;
+ }
+
+ /**
+ * @param name
+ * the name to set
+ */
+ public void setSubnetId(String subnetId) {
+ this.subnetId = subnetId;
+ }
+
+
+ @Override
+ public String toString() {
+ return "Subnet [subnetName=" + subnetName + ", neutronId=" + neutronId
+ + ", subnetId=" + subnetId + ", cidr=" + cidr + ", gatewayIp="
+ + gatewayIp + ", ipVersion=" + ipVersion + ", enableDHCP="
+ + enableDHCP + ", hostRoutes=" + hostRoutes
+ + ", allocationPools=" + allocationPools + ", dnsNameServers="
+ + dnsNameServers + "]";
+ }
+
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfRollback.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfRollback.java
new file mode 100644
index 0000000000..b6e4a6e855
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfRollback.java
@@ -0,0 +1,152 @@
+/*-
+ * ============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 org.openecomp.mso.entity.MsoRequest;
+/**
+ * Javabean representing the rollback criteria following a "Create VNF"
+ * operation. This structure can be passed back to the "Rollback VNF"
+ * operation to undo the effects of the create.
+ *
+ *
+ */
+public class VnfRollback {
+ private String vnfId;
+ private String tenantId;
+ private String cloudSiteId;
+ private boolean tenantCreated = false;
+ private boolean vnfCreated = false;
+ private MsoRequest msoRequest;
+ private String volumeGroupName;
+ private String volumeGroupId;
+ private String requestType;
+ private String volumeGroupHeatStackId;
+ private String baseGroupHeatStackId;
+ private boolean isBase = false;
+ private String vfModuleStackId;
+
+ public VnfRollback() {}
+
+ public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
+ boolean tenantCreated, boolean vnfCreated,
+ MsoRequest msoRequest,
+ String volumeGroupName, String volumeGroupId, String requestType) {
+ super();
+ this.vnfId = vnfId;
+ this.tenantId = tenantId;
+ this.cloudSiteId = cloudSiteId;
+ this.tenantCreated = tenantCreated;
+ this.vnfCreated = vnfCreated;
+ this.msoRequest = msoRequest;
+ this.volumeGroupName = volumeGroupName;
+ this.volumeGroupId = volumeGroupId;
+ this.requestType = requestType;
+ }
+
+ public String getVnfId() {
+ return vnfId;
+ }
+ public void setVnfId(String vnfId) {
+ this.vnfId = vnfId;
+ }
+ public String getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ }
+ public String getCloudSiteId() {
+ return cloudSiteId;
+ }
+ public void setCloudSiteId(String cloudId) {
+ this.cloudSiteId = cloudId;
+ }
+ public boolean getTenantCreated() {
+ return tenantCreated;
+ }
+ public void setTenantCreated(boolean tenantCreated) {
+ this.tenantCreated = tenantCreated;
+ }
+ public boolean getVnfCreated() {
+ return vnfCreated;
+ }
+ public void setVnfCreated(boolean vnfCreated) {
+ this.vnfCreated = vnfCreated;
+ }
+ public MsoRequest getMsoRequest() {
+ return msoRequest;
+ }
+ public void setMsoRequest (MsoRequest msoRequest) {
+ this.msoRequest = msoRequest;
+ }
+ public String getVolumeGroupName() {
+ return this.volumeGroupName;
+ }
+ public void setVolumeGroupName(String volumeGroupName) {
+ this.volumeGroupName = volumeGroupName;
+ }
+ public String getVolumeGroupId() {
+ return this.volumeGroupId;
+ }
+ public void setVolumeGroupId(String volumeGroupId) {
+ this.volumeGroupId = volumeGroupId;
+ }
+ public String getRequestType() {
+ return this.requestType;
+ }
+ public void setRequestType(String requestType) {
+ this.requestType = requestType;
+ }
+ public String getVolumeGroupHeatStackId() {
+ return this.volumeGroupHeatStackId;
+ }
+ public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
+ this.volumeGroupHeatStackId = volumeGroupHeatStackId;
+ }
+
+ public String getBaseGroupHeatStackId() {
+ return this.baseGroupHeatStackId;
+ }
+ public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
+ this.baseGroupHeatStackId = baseGroupHeatStackId;
+ }
+
+ public boolean isBase() {
+ return this.isBase;
+ }
+ public void setIsBase(boolean isBase) {
+ this.isBase = isBase;
+ }
+ public String getVfModuleStackId() {
+ return this.vfModuleStackId;
+ }
+ public void setVfModuleStackId(String vfModuleStackId) {
+ this.vfModuleStackId = vfModuleStackId;
+ }
+
+ @Override
+ public String toString() {
+ return "VnfRollback: cloud=" + cloudSiteId + ", tenant=" + tenantId +
+ ", vnf=" + vnfId + ", tenantCreated=" + tenantCreated +
+ ", vnfCreated=" + vnfCreated + ", requestType = " + requestType;
+ }
+}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfStatus.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfStatus.java
new file mode 100644
index 0000000000..40f46716fd
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfStatus.java
@@ -0,0 +1,30 @@
+/*-
+ * ============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;
+
+
+/*
+ * Enum status values to mirror the Openstack Heat stack status values
+ */
+public enum VnfStatus {
+ ACTIVE, FAILED, NOTFOUND, UNKNOWN
+}
+