diff options
author | Rob Daugherty <rd472p@att.com> | 2018-03-14 02:07:32 -0400 |
---|---|---|
committer | Rob Daugherty <rd472p@att.com> | 2018-03-14 04:08:41 -0400 |
commit | 38f720752af4d4aad8c4e467a288d9048659f688 (patch) | |
tree | e81066a8b5c77272e30fb57a64999573c4db4d86 /adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans | |
parent | aee3d223f92a6f250f43e17558a2dfd576ff7294 (diff) |
AT&T 1712 and 1802 release code
This is code from AT&T's 1712 and 1802 releases.
Change-Id: Ie1e85851e94bc66c4d9514a0226c221939531a04
Issue-ID: SO-425
Signed-off-by: Rob Daugherty <rd472p@att.com>
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans')
10 files changed, 55 insertions, 831 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 deleted file mode 100644 index 3e4ea27d5f..0000000000 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/HeatStatus.java +++ /dev/null @@ -1,29 +0,0 @@ -/*- - * ============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.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 deleted file mode 100644 index 5e037096df..0000000000 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/MsoTenant.java +++ /dev/null @@ -1,66 +0,0 @@ -/*- - * ============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.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 deleted file mode 100644 index 64460b20bb..0000000000 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java +++ /dev/null @@ -1,151 +0,0 @@ -/*- - * ============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.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<>(); - private List<String> subnets = new ArrayList<>(); - - static Map<String,NetworkStatus> NetworkStatusMap; - static { - NetworkStatusMap = new HashMap<>(); - NetworkStatusMap.put("ACTIVE", NetworkStatus.ACTIVE); - NetworkStatusMap.put("DOWN", NetworkStatus.DOWN); - NetworkStatusMap.put("BUILD", NetworkStatus.BUILD); - NetworkStatusMap.put("ERROR", NetworkStatus.ERROR); - } - - /** - * 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) { - initFieldsWithDataFromNetwork(network); - } else { - status = NetworkStatus.NOTFOUND; - } - } - - private void initFieldsWithDataFromNetwork(Network network){ - name = network.getName(); - id = network.getId(); - - if (network.getStatus() != null && NetworkStatusMap.containsKey(network.getStatus())) { - status = NetworkStatusMap.get(network.getStatus()); - } - if (network.getProviderPhysicalNetwork() != null) { - provider = network.getProviderPhysicalNetwork(); - if ("vlan".equals(network.getProviderNetworkType())) { - vlans.add(network.getProviderSegmentationId()); - } - } - else if (network.getSegments() != null && !network.getSegments().isEmpty()) { - Segment s = network.getSegments().get(0); - provider = s.getProviderPhysicalNetwork(); - if ("vlan".equals(s.getProviderNetworkType())) { - network.getSegments().forEach(segment -> vlans.add(segment.getProviderSegmentationId())); - } - } - 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; - } - - @Override - public String toString() { - return "NetworkInfo{" + "name='" + name + '\'' + - ", id='" + id + '\'' + - ", status=" + status + - ", provider='" + provider + '\'' + - ", vlans=" + vlans + - ", subnets=" + subnets + - '}'; - } -} - 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 deleted file mode 100644 index 6878e5f6b4..0000000000 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java +++ /dev/null @@ -1,148 +0,0 @@ -/*- - * ============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.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 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-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 deleted file mode 100644 index 199028e56c..0000000000 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkStatus.java +++ /dev/null @@ -1,31 +0,0 @@ -/*- - * ============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.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 deleted file mode 100644 index a3a04abc60..0000000000 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Pool.java +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * ============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.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 deleted file mode 100644 index 506b62994d..0000000000 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java +++ /dev/null @@ -1,106 +0,0 @@ -/*- - * ============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.openecomp.mso.openstack.beans; - -import com.woorea.openstack.heat.model.Stack; -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 { - private String name = ""; - private String canonicalName = ""; - private HeatStatus status; - private Map<String, Object> outputs = new HashMap<>(); - private Map<String,Object> parameters = new HashMap<>(); - static private Map<String, HeatStatus> heatStatusMap; - - static { - heatStatusMap = new HashMap<>(); - 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 (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 { - this.status = heatStatusMap.getOrDefault(stack.getStackStatus(), HeatStatus.UNKNOWN); - } - if (stack.getOutputs() != null) { - this.outputs = new HashMap<>(); - stack.getOutputs().forEach(output -> 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 HeatStatus getStatus() { - return status; - } - - public Map<String, Object> getOutputs() { - return outputs; - } - - public Map<String,Object> getParameters () { - return 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 deleted file mode 100644 index eea47413e4..0000000000 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java +++ /dev/null @@ -1,200 +0,0 @@ -/*- - * ============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.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 index 8cb41deba5..43b742f326 100644 --- 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 @@ -43,9 +43,24 @@ public class VnfRollback { 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, @@ -63,6 +78,38 @@ public class VnfRollback { this.modelCustomizationUuid = modelCustomizationUuid; } + /** + * 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, 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; } @@ -150,11 +197,18 @@ public class VnfRollback { 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; + + ", modelCustomizationUuid=" + this.modelCustomizationUuid + + ", mode=" + mode; } } 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 deleted file mode 100644 index cc7e66eecb..0000000000 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/VnfStatus.java +++ /dev/null @@ -1,30 +0,0 @@ -/*- - * ============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.openecomp.mso.openstack.beans; - - -/* - * Enum status values to mirror the Openstack Heat stack status values - */ -public enum VnfStatus { - ACTIVE, FAILED, NOTFOUND, UNKNOWN -} - |