diff options
author | 2018-03-14 02:07:32 -0400 | |
---|---|---|
committer | 2018-03-14 04:08:41 -0400 | |
commit | 38f720752af4d4aad8c4e467a288d9048659f688 (patch) | |
tree | e81066a8b5c77272e30fb57a64999573c4db4d86 /asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ToscaResourceStructure.java | |
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 'asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ToscaResourceStructure.java')
-rw-r--r-- | asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ToscaResourceStructure.java | 145 |
1 files changed, 135 insertions, 10 deletions
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ToscaResourceStructure.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ToscaResourceStructure.java index 2c5d6d4a6d..98b6b6d539 100644 --- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ToscaResourceStructure.java +++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ToscaResourceStructure.java @@ -45,7 +45,7 @@ import org.openecomp.sdc.tosca.parser.impl.SdcToscaParserFactory; import org.openecomp.sdc.toscaparser.api.NodeTemplate;
import org.openecomp.sdc.toscaparser.api.elements.Metadata;
-
+import org.openecomp.mso.asdc.client.exceptions.ASDCDownloadException;
import org.openecomp.mso.db.catalog.beans.AllottedResource;
import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization;
import org.openecomp.mso.db.catalog.beans.NetworkResource;
@@ -76,13 +76,16 @@ public class ToscaResourceStructure { String volHeatEnvTemplateUUID;
String envHeatTemplateUUID;
String heatFilesUUID;
+ String workloadPerformance;
boolean isVnfAlreadyInstalled = false;
String serviceVersion;
+ private boolean isDeployedSuccessfully=false;
+
private NetworkResourceCustomization catalogNetworkResourceCustomization;
private NetworkResource catalogNetworkResource;
-
+
private AllottedResourceCustomization catalogResourceCustomization;
private VfModule vfModule;
@@ -121,19 +124,18 @@ public class ToscaResourceStructure { public ToscaResourceStructure(){
}
- public void updateResourceStructure(IArtifactInfo artifact){
+ public void updateResourceStructure(IArtifactInfo artifact) throws ASDCDownloadException {
try {
SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance();//Autoclosable
+ LOGGER.debug("MSO config path is: " + System.getProperty("mso.config.path"));
File spoolFile = new File(System.getProperty("mso.config.path") + "ASDC/" + artifact.getArtifactName());
-
-
-
- System.out.println("PATH IS " + spoolFile.getAbsolutePath());
+
+ LOGGER.debug("ASDC File path is: " + spoolFile.getAbsolutePath());
LOGGER.info(MessageEnum.ASDC_RECEIVE_SERVICE_NOTIF, "***PATH", "ASDC", spoolFile.getAbsolutePath());
@@ -143,12 +145,12 @@ public class ToscaResourceStructure { System.out.println("System out " + e.getMessage());
LOGGER.error(MessageEnum.ASDC_GENERAL_EXCEPTION_ARG,
"Exception caught during parser *****LOOK********* " + artifact.getArtifactName(), "ASDC", "processResourceNotification", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in processResourceNotification", e);
- }
+ throw new ASDCDownloadException ("Exception caught when passing the csar file to the parser ", e);
+ }
serviceMetadata = sdcCsarHelper.getServiceMetadata();
-
-
+
}
public String getHeatTemplateUUID() {
@@ -409,4 +411,127 @@ public class ToscaResourceStructure { this.serviceVersion = serviceVersion;
}
+ public String getWorkloadPerformance() {
+ return workloadPerformance;
+ }
+
+ public void setWorkloadPerformance(String workloadPerformance) {
+ this.workloadPerformance = workloadPerformance;
+ }
+
+ public VfModule getVfModule() {
+ return vfModule;
+ }
+
+ public void setVfModule(VfModule vfModule) {
+ this.vfModule = vfModule;
+ }
+
+ public VfModuleCustomization getVfModuleCustomization() {
+ return vfModuleCustomization;
+ }
+
+ public void setVfModuleCustomization(VfModuleCustomization vfModuleCustomization) {
+ this.vfModuleCustomization = vfModuleCustomization;
+ }
+
+ public VnfResource getVnfResource() {
+ return vnfResource;
+ }
+
+ public void setVnfResource(VnfResource vnfResource) {
+ this.vnfResource = vnfResource;
+ }
+
+ public VnfResourceCustomization getVnfResourceCustomization() {
+ return vnfResourceCustomization;
+ }
+
+ public void setVnfResourceCustomization(
+ VnfResourceCustomization vnfResourceCustomization) {
+ this.vnfResourceCustomization = vnfResourceCustomization;
+ }
+
+ public AllottedResourceCustomization getAllottedResourceCustomization() {
+ return allottedResourceCustomization;
+ }
+
+ public void setAllottedResourceCustomization(
+ AllottedResourceCustomization allottedResourceCustomization) {
+ this.allottedResourceCustomization = allottedResourceCustomization;
+ }
+
+ public VnfResCustomToVfModuleCustom getVnfResCustomToVfModuleCustom() {
+ return vnfResCustomToVfModuleCustom;
+ }
+
+ public void setVnfResCustomToVfModuleCustom(
+ VnfResCustomToVfModuleCustom vnfResCustomToVfModuleCustom) {
+ this.vnfResCustomToVfModuleCustom = vnfResCustomToVfModuleCustom;
+ }
+
+ public TempNetworkHeatTemplateLookup getTempNetworkHeatTemplateLookup() {
+ return tempNetworkHeatTemplateLookup;
+ }
+
+ public void setTempNetworkHeatTemplateLookup(
+ TempNetworkHeatTemplateLookup tempNetworkHeatTemplateLookup) {
+ this.tempNetworkHeatTemplateLookup = tempNetworkHeatTemplateLookup;
+ }
+
+ public VfModuleToHeatFiles getVfModuleToHeatFiles() {
+ return vfModuleToHeatFiles;
+ }
+
+ public void setVfModuleToHeatFiles(VfModuleToHeatFiles vfModuleToHeatFiles) {
+ this.vfModuleToHeatFiles = vfModuleToHeatFiles;
+ }
+
+ public ToscaCsar getToscaCsar() {
+ return toscaCsar;
+ }
+
+ public void setToscaCsar(ToscaCsar toscaCsar) {
+ this.toscaCsar = toscaCsar;
+ }
+
+ public ServiceToResourceCustomization getVfServiceToResourceCustomization() {
+ return vfServiceToResourceCustomization;
+ }
+
+ public void setVfServiceToResourceCustomization(
+ ServiceToResourceCustomization vfServiceToResourceCustomization) {
+ this.vfServiceToResourceCustomization = vfServiceToResourceCustomization;
+ }
+
+ public ServiceToResourceCustomization getAllottedServiceToResourceCustomization() {
+ return allottedServiceToResourceCustomization;
+ }
+
+ public void setAllottedServiceToResourceCustomization(
+ ServiceToResourceCustomization allottedServiceToResourceCustomization) {
+ this.allottedServiceToResourceCustomization = allottedServiceToResourceCustomization;
+ }
+
+ public ServiceToResourceCustomization getVlServiceToResourceCustomization() {
+ return vlServiceToResourceCustomization;
+ }
+
+ public void setVlServiceToResourceCustomization(
+ ServiceToResourceCustomization vlServiceToResourceCustomization) {
+ this.vlServiceToResourceCustomization = vlServiceToResourceCustomization;
+ }
+
+ public static MsoLogger getLogger() {
+ return LOGGER;
+ }
+
+ public boolean isDeployedSuccessfully() {
+ return isDeployedSuccessfully;
+ }
+
+ public void setSuccessfulDeployment() {
+ isDeployedSuccessfully = true;
+ }
+
}
|