aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans')
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HeatStatus.java30
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HostRoute.java69
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/MsoTenant.java66
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkInfo.java120
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkRollback.java157
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkStatus.java31
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java62
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/RouteTarget.java62
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/StackInfo.java109
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java213
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfRollback.java213
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfStatus.java30
12 files changed, 1162 insertions, 0 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HeatStatus.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HeatStatus.java
new file mode 100644
index 0000000000..dd68d37736
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HeatStatus.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.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-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HostRoute.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HostRoute.java
new file mode 100644
index 0000000000..228bb2c03d
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HostRoute.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.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 = {
+ "prefix",
+ "nextHop"
+})
+public class HostRoute {
+
+ private String prefix;
+ private String nextHop;
+
+ /**
+ * @return the prefix
+ */
+ public String getPrefix() {
+ return prefix;
+ }
+ /**
+ * @param prefix the prefix to set
+ */
+ public void setPrefix(String prefix) {
+ this.prefix = prefix;
+ }
+ /**
+ * @return the nextHop
+ */
+ public String getNextHop() {
+ return nextHop;
+ }
+ /**
+ * @param nextHop the nextHop to set
+ */
+ public void setNextHop(String nextHop) {
+ this.nextHop = nextHop;
+ }
+
+ @Override
+ public String toString() {
+ return "Host_route [prefix=" + prefix + ", nextHop=" + nextHop + "]";
+ }
+
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/MsoTenant.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/MsoTenant.java
new file mode 100644
index 0000000000..b06ea0e59f
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/MsoTenant.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.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-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkInfo.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkInfo.java
new file mode 100644
index 0000000000..6110fa5073
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkInfo.java
@@ -0,0 +1,120 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.openstack.beans;
+
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+/*
+ * 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<>();
+ private List<String> subnets = new ArrayList<>();
+ private String shared = "";
+
+ 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;
+ }
+
+ 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 "NetworkInfo{" + "name='" + name + '\'' +
+ ", id='" + id + '\'' +
+ ", status=" + status +
+ ", provider='" + provider + '\'' +
+ ", vlans=" + vlans +
+ ", subnets=" + subnets +
+ '}';
+ }
+}
+
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkRollback.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkRollback.java
new file mode 100644
index 0000000000..e95c564f27
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkRollback.java
@@ -0,0 +1,157 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.openstack.beans;
+
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.onap.so.entity.MsoRequest;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+/**
+ * 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.
+ *
+ *
+ */
+@JsonInclude(Include.NON_EMPTY)
+public class NetworkRollback implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 11949663223019185L;
+ private String networkId;
+ private String neutronNetworkId;
+ private String networkStackId;
+ private String tenantId;
+ private String cloudId;
+ private String networkType;
+ private String modelCustomizationUuid;
+ 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 String getModelCustomizationUuid() {
+ return this.modelCustomizationUuid;
+ }
+
+ public void setModelCustomizationUuid(String modelCustomizationUuid) {
+ this.modelCustomizationUuid = modelCustomizationUuid;
+ }
+
+ 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-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkStatus.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkStatus.java
new file mode 100644
index 0000000000..b7b1366562
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkStatus.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.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-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java
new file mode 100644
index 0000000000..1c82907f80
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.openstack.beans;
+
+
+
+
+
+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-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/RouteTarget.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/RouteTarget.java
new file mode 100644
index 0000000000..fcea8796c2
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/RouteTarget.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.openstack.beans;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "routeTarget",
+ "routeTargetRole"
+})
+public class RouteTarget implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5425083030715789604L;
+ private String routeTarget;
+ private String routeTargetRole;
+
+ public String getRouteTarget() {
+ return routeTarget;
+ }
+ public void setRouteTarget(String routeTarget) {
+ this.routeTarget = routeTarget;
+ }
+ public String getRouteTargetRole() {
+ return routeTargetRole;
+ }
+ public void setRouteTargetRole(String routeTargetRole) {
+ this.routeTargetRole = routeTargetRole;
+ }
+
+
+ @Override
+ public String toString() {
+ return "RouteTarget [routeTarget=" + routeTarget + ", routeTargetRole=" + routeTargetRole + "]";
+ }
+
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/StackInfo.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/StackInfo.java
new file mode 100644
index 0000000000..028ec9ec8d
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/StackInfo.java
@@ -0,0 +1,109 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.openstack.beans;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+/*
+ * 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<>();
+ private Map<String,Object> parameters = new HashMap<>();
+
+ 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 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-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java
new file mode 100644
index 0000000000..3213323101
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java
@@ -0,0 +1,213 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.openstack.beans;
+
+
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlTransient;
+
+public class Subnet implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -530027355187604839L;
+
+ 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 Boolean addrFromStart=true;
+
+ private List<HostRoute> 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;
+ }
+
+ public Boolean getAddrFromStart() {
+ return addrFromStart;
+ }
+
+ public void setAddrFromStart(Boolean addrFromStart) {
+ this.addrFromStart = addrFromStart;
+ }
+
+ /**
+ * @return the gw
+ */
+ public String getGatewayIp() {
+ return gatewayIp;
+ }
+
+ /**
+ * @return the hostRoutes
+ */
+ public List<HostRoute> 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<HostRoute> 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
+ + ", addrFromStart=" + addrFromStart + ", hostRoutes=" + hostRoutes + ", allocationPools="
+ + allocationPools + ", dnsNameServers=" + dnsNameServers + "]";
+ }
+
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfRollback.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfRollback.java
new file mode 100644
index 0000000000..ba7f6532e1
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfRollback.java
@@ -0,0 +1,213 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.openstack.beans;
+
+import org.onap.so.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;
+ private String modelCustomizationUuid; //NOTE: this is the vfModule's modelCustomizationUuid
+ private String mode = "HEAT";
+
+ public VnfRollback() {}
+
+ /**
+ * For backwards compatibility... orchestration mode defaults to HEAT
+ *
+ * @param vnfId
+ * @param tenantId
+ * @param cloudSiteId
+ * @param tenantCreated
+ * @param vnfCreated
+ * @param msoRequest
+ * @param volumeGroupName
+ * @param volumeGroupId
+ * @param requestType
+ * @param modelCustomizationUuid
+ */
+ public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
+ boolean tenantCreated, boolean vnfCreated,
+ MsoRequest msoRequest,
+ String volumeGroupName, String volumeGroupId, String requestType, String modelCustomizationUuid) {
+ 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;
+ this.modelCustomizationUuid = modelCustomizationUuid;
+ }
+
+ /**
+ *
+ * @param vnfId
+ * @param tenantId
+ * @param cloudSiteId
+ * @param tenantCreated
+ * @param vnfCreated
+ * @param msoRequest
+ * @param volumeGroupName
+ * @param volumeGroupId
+ * @param requestType
+ * @param modelCustomizationUuid
+ */
+ public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
+ boolean tenantCreated, boolean vnfCreated,
+ MsoRequest msoRequest, String volumeGroupName, String volumeGroupId,
+ String requestType, String modelCustomizationUuid, String orchestrationMode) {
+ 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;
+ this.modelCustomizationUuid = modelCustomizationUuid;
+ this.mode = orchestrationMode;
+ }
+
+ 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;
+ }
+ public String getModelCustomizationUuid() {
+ return this.modelCustomizationUuid;
+ }
+ public void setModelCustomizationUuid(String modelCustomizationUuid) {
+ this.modelCustomizationUuid = modelCustomizationUuid;
+ }
+ public String getMode() {
+ return this.mode;
+ }
+ public void setMode(String mode) {
+ this.mode = mode;
+ }
+ @Override
+ public String toString() {
+ return "VnfRollback: cloud=" + cloudSiteId + ", tenant=" + tenantId +
+ ", vnf=" + vnfId + ", tenantCreated=" + tenantCreated +
+ ", vnfCreated=" + vnfCreated + ", requestType = " + requestType
+ + ", modelCustomizationUuid=" + this.modelCustomizationUuid
+ + ", mode=" + mode;
+ }
+} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfStatus.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfStatus.java
new file mode 100644
index 0000000000..9f1ae8813d
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfStatus.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.onap.so.openstack.beans;
+
+
+/*
+ * Enum status values to mirror the Openstack Heat stack status values
+ */
+public enum VnfStatus {
+ ACTIVE, FAILED, NOTFOUND, UNKNOWN
+}
+