aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java6
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java54
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/JsonVfModuleMetaData.java8
3 files changed, 35 insertions, 33 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java b/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java
index 87008f1d8f..43eb277d21 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java
@@ -91,7 +91,7 @@ public class DeployActivitySpecs {
if (activitySpecActivitySpecCategories == null || activitySpecActivitySpecCategories.size() == 0) {
return;
}
- List<String> categoryList = new ArrayList<String>();
+ List<String> categoryList = new ArrayList<>();
for (ActivitySpecActivitySpecCategories activitySpecCat : activitySpecActivitySpecCategories) {
if (activitySpecCat != null) {
if (activitySpecCat.getActivitySpecCategories() != null) {
@@ -107,8 +107,8 @@ public class DeployActivitySpecs {
if (activitySpecActivitySpecParameters == null || activitySpecActivitySpecParameters.size() == 0) {
return;
}
- List<Input> inputs = new ArrayList<Input>();
- List<Output> outputs = new ArrayList<Output>();
+ List<Input> inputs = new ArrayList<>();
+ List<Output> outputs = new ArrayList<>();
for (ActivitySpecActivitySpecParameters activitySpecParam : activitySpecActivitySpecParameters) {
if (activitySpecParam != null) {
if (activitySpecParam.getActivitySpecParameters() != null) {
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
index 9b838c4d98..fc0197dc52 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
@@ -77,6 +77,8 @@ public class ASDCController {
protected static final Logger logger = LoggerFactory.getLogger(ASDCController.class);
+ private static final String UNKNOWN = "Unknown";
+
protected boolean isAsdcClientAutoManaged = false;
protected String controllerName;
@@ -110,6 +112,25 @@ public class ASDCController {
@Autowired
DeployActivitySpecs deployActivitySpecs;
+ public ASDCController() {
+ this("");
+ }
+
+ public ASDCController(String controllerConfigName) {
+ isAsdcClientAutoManaged = true;
+ this.controllerName = controllerConfigName;
+ }
+
+ public ASDCController(String controllerConfigName, IDistributionClient asdcClient,
+ IVfResourceInstaller resourceinstaller) {
+ distributionClient = asdcClient;
+ }
+
+ public ASDCController(String controllerConfigName, IDistributionClient asdcClient) {
+ distributionClient = asdcClient;
+ this.controllerName = controllerConfigName;
+ }
+
public int getNbOfNotificationsOngoing() {
return nbOfNotificationsOngoing;
}
@@ -150,25 +171,6 @@ public class ASDCController {
return this.controllerStatus;
}
- public ASDCController() {
- this("");
- }
-
- public ASDCController(String controllerConfigName) {
- isAsdcClientAutoManaged = true;
- this.controllerName = controllerConfigName;
- }
-
- public ASDCController(String controllerConfigName, IDistributionClient asdcClient,
- IVfResourceInstaller resourceinstaller) {
- distributionClient = asdcClient;
- }
-
- public ASDCController(String controllerConfigName, IDistributionClient asdcClient) {
- distributionClient = asdcClient;
- this.controllerName = controllerConfigName;
- }
-
public String getControllerName() {
return controllerName;
}
@@ -356,7 +358,7 @@ public class ASDCController {
for (IArtifactInfo artifactInfo : resourceStructure.getResourceInstance().getArtifacts()) {
if ((DistributionStatusEnum.DEPLOY_OK.equals(distribStatus)
- && !artifactInfo.getArtifactType().equalsIgnoreCase("OTHER")
+ && !("OTHER").equalsIgnoreCase(artifactInfo.getArtifactType())
&& !resourceStructure.isAlreadyDeployed())
// This could be NULL if the artifact is a VF module artifact, this won't be present in the MAP
&& resourceStructure.getArtifactsMapByUUID().get(artifactInfo.getArtifactUUID()) != null
@@ -442,7 +444,7 @@ public class ASDCController {
status.name(), artifactURL, "ASDC", "sendASDCNotification");
logger.debug(event);
- String action = "";
+
try {
IDistributionStatusMessage message =
new DistributionStatusMessage(artifactURL, consumerID, distributionID, status, timestamp);
@@ -454,7 +456,7 @@ public class ASDCController {
} else {
this.distributionClient.sendDownloadStatus(message);
}
- action = "sendDownloadStatus";
+
break;
case DEPLOY:
if (errorReason != null) {
@@ -462,7 +464,7 @@ public class ASDCController {
} else {
this.distributionClient.sendDeploymentStatus(message);
}
- action = "sendDeploymentdStatus";
+
break;
default:
break;
@@ -667,12 +669,12 @@ public class ASDCController {
String filePath =
msoConfigPath + "/ASDC/" + iArtifact.getArtifactVersion() + "/" + iArtifact.getArtifactName();
File csarFile = new File(filePath);
- String csarFilePath = csarFile.getAbsolutePath();
+
for (IResourceInstance resource : iNotif.getResources()) {
String resourceType = resource.getResourceType();
- String category = resource.getCategory();
+
logger.info("Processing Resource Type: {}, Model UUID: {}", resourceType, resource.getResourceUUID());
@@ -832,7 +834,7 @@ public class ASDCController {
}
}
- private static final String UNKNOWN = "Unknown";
+
/**
* @return the address of the ASDC we are connected to.
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/JsonVfModuleMetaData.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/JsonVfModuleMetaData.java
index f4d3e5ce48..20cd9801e9 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/JsonVfModuleMetaData.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/JsonVfModuleMetaData.java
@@ -33,16 +33,16 @@ public class JsonVfModuleMetaData implements IVfModuleData {
@JsonProperty("artifacts")
private List<String> artifacts;
@JsonProperty("properties")
- // private List<Map<String, Object>> properties = new ArrayList<>();
+
private Map<String, String> properties = new HashMap<>();
+ @JsonIgnore
+ private Map<String, Object> attributesMap = new HashMap<>();
+
public Map<String, String> getProperties() {
return properties;
}
- @JsonIgnore
- private Map<String, Object> attributesMap = new HashMap<>();
-
@Override
public List<String> getArtifacts() {
return artifacts;