summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java4
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/config/beans/PoConfig.java16
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java6
-rw-r--r--adapters/mso-adapter-utils/src/test/resources/application-test.yaml13
-rw-r--r--adapters/mso-openstack-adapters/src/main/resources/application-local.yaml15
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/application-nomigrate.yaml37
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/application-test.yaml37
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java16
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidation.java2
10 files changed, 81 insertions, 67 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java
index 14e5b80d2e..4479a7f6c2 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java
@@ -121,8 +121,8 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin{
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, MsoCloudifyUtils.class);
// Properties names and variables (with default values)
- protected String createPollIntervalProp = "ecomp.mso.adapters.po.pollInterval";
- private String deletePollIntervalProp = "ecomp.mso.adapters.po.pollInterval";
+ protected String createPollIntervalProp = "org.onap.so.adapters.po.pollInterval";
+ private String deletePollIntervalProp = "org.onap.so.adapters.po.pollInterval";
protected String createPollIntervalDefault = "15";
private String deletePollIntervalDefault = "15";
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/config/beans/PoConfig.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/config/beans/PoConfig.java
index 3098a5410a..9995a23668 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/config/beans/PoConfig.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/config/beans/PoConfig.java
@@ -24,12 +24,14 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Configuration
-@ConfigurationProperties(prefix="adapters.po")
+@ConfigurationProperties(prefix="org.onap.so.adapters.po")
public class PoConfig {
private String retryCodes;
private int retryDelay;
private int retryCount;
+ private int pollTimeout;
+ private int pollInterval;
public String getRetryCodes() {
return retryCodes;
@@ -49,5 +51,17 @@ public class PoConfig {
public void setRetryCount(int retryCount) {
this.retryCount = retryCount;
}
+ public int getPollTimeout() {
+ return pollTimeout;
+ }
+ public void setPollTimeout(int pollTimeout) {
+ this.pollTimeout = pollTimeout;
+ }
+ public int getPollInterval() {
+ return pollInterval;
+ }
+ public void setPollInterval(int pollInterval) {
+ this.pollInterval = pollInterval;
+ }
}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
index 1f9b6bd910..f132f10ebb 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
@@ -127,9 +127,9 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin{
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, MsoHeatUtils.class);
// Properties names and variables (with default values)
- protected String createPollIntervalProp = "onap.so.adapters.po.pollInterval";
- private String deletePollIntervalProp = "onap.so.adapters.po.pollInterval";
- private String deletePollTimeoutProp = "onap.so.adapters.po.pollTimeout";
+ protected String createPollIntervalProp = "org.onap.so.adapters.po.pollInterval";
+ private String deletePollIntervalProp = "org.onap.so.adapters.po.pollInterval";
+ private String deletePollTimeoutProp = "org.onap.so.adapters.po.pollTimeout";
protected static final String createPollIntervalDefault = "15";
private static final String deletePollIntervalDefault = "15";
diff --git a/adapters/mso-adapter-utils/src/test/resources/application-test.yaml b/adapters/mso-adapter-utils/src/test/resources/application-test.yaml
index 011bb1416b..368df847be 100644
--- a/adapters/mso-adapter-utils/src/test/resources/application-test.yaml
+++ b/adapters/mso-adapter-utils/src/test/resources/application-test.yaml
@@ -22,11 +22,14 @@ cloud_config:
clli: "MTN6"
aic_version: "3.0"
identity_service_id: "ORDM3"
-adapters:
- po:
- retryCodes: "504"
- retryDelay: "5"
- retryCount: "3"
+org:
+ onap:
+ so:
+ adapters:
+ po:
+ retryCodes: "504"
+ retryDelay: "5"
+ retryCount: "3"
tenant:
tenant_description: "ECOMP Tenant"
region_type: "single"
diff --git a/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml b/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml
index e07492e56c..67c4dd3c22 100644
--- a/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml
+++ b/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml
@@ -37,15 +37,12 @@ org:
default_orm_url_replace_with_this: 7080
default_quota_value: 10
set_default_quota: false
-ecomp:
- mso:
- adapters:
- po:
- retryCodes: 504
- retryDelay: 5
- retryCount: 3
- pollTimeout: 7500
- pollInterval: 15
+ po:
+ retryCodes: 504
+ retryDelay: 5
+ retryCount: 3
+ pollTimeout: 7500
+ pollInterval: 15
server-port: 8080
ssl-enable: false
diff --git a/adapters/mso-openstack-adapters/src/test/resources/application-nomigrate.yaml b/adapters/mso-openstack-adapters/src/test/resources/application-nomigrate.yaml
index 95b48cd8aa..d1a5bd9fa3 100644
--- a/adapters/mso-openstack-adapters/src/test/resources/application-nomigrate.yaml
+++ b/adapters/mso-openstack-adapters/src/test/resources/application-nomigrate.yaml
@@ -15,6 +15,12 @@ org:
retrycount: 5
retryinterval: -15
retrylist: 408,429,500,502,503,504,900
+ heat:
+ create:
+ pollInterval: 15
+ delete:
+ pollTimeout: 7500
+ pollInterval: 15
network:
bpelauth: 4771D91C24BB25366730561D630B131818CD9FF8D686AA8807F4CB30E1324C46ED16197C07
sockettimeout: 5
@@ -22,6 +28,12 @@ org:
retrycount: 5
retryinterval: -15
retrylist: 408,429,500,502,503,504,900
+ heat:
+ create:
+ pollInterval: 15
+ delete:
+ pollTimeout: 300
+ pollInterval: 15
tenant:
default_x_aic_orm_client_string: ONAP-SO
default_keystone_url_version: /v2.0
@@ -40,27 +52,10 @@ org:
base_url: http://localhost:${wiremock.server.port}
base_path: /api/valet/placement/v1/
valet_auth:
-ecomp:
- mso:
- adapters:
- po:
- retryCodes: 504
- retryDelay: 5
- retryCount: 3
- vnf:
- heat:
- create:
- pollInterval: 15
- delete:
- pollTimeout: 7500
- pollInterval: 15
- network:
- heat:
- create:
- pollInterval: 15
- delete:
- pollTimeout: 300
- pollInterval: 15
+ po:
+ retryCodes: 504
+ retryDelay: 5
+ retryCount: 3
server-port: 8080
ssl-enable: false
diff --git a/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml b/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml
index 58bde2ef14..175b08f747 100644
--- a/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml
+++ b/adapters/mso-openstack-adapters/src/test/resources/application-test.yaml
@@ -15,6 +15,12 @@ org:
retrycount: 5
retryinterval: -15
retrylist: 408,429,500,502,503,504,900
+ heat:
+ create:
+ pollInterval: 15
+ delete:
+ pollTimeout: 7500
+ pollInterval: 15
network:
bpelauth: 4771D91C24BB25366730561D630B131818CD9FF8D686AA8807F4CB30E1324C46ED16197C07
sockettimeout: 5
@@ -23,6 +29,12 @@ org:
retryinterval: -15
retrylist: 408,429,500,502,503,504,900
encryptionKey: aa3871669d893c7fb8abbcda31b88b4f
+ heat:
+ create:
+ pollInterval: 15
+ delete:
+ pollTimeout: 300
+ pollInterval: 15
tenant:
default_x_aic_orm_client_string: ONAP-SO
default_keystone_url_version: /v2.0
@@ -41,27 +53,10 @@ org:
base_url: http://localhost:${wiremock.server.port}
base_path: /api/valet/placement/v1/
valet_auth:
-ecomp:
- mso:
- adapters:
- po:
- retryCodes: 504
- retryDelay: 5
- retryCount: 3
- vnf:
- heat:
- create:
- pollInterval: 15
- delete:
- pollTimeout: 7500
- pollInterval: 15
- network:
- heat:
- create:
- pollInterval: 15
- delete:
- pollTimeout: 300
- pollInterval: 15
+ po:
+ retryCodes: 504
+ retryDelay: 5
+ retryCount: 3
server-port: 8080
ssl-enable: false
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index c8f7f05436..ac15fb974c 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -1152,7 +1152,7 @@ public class ToscaResourceInstaller {
}
protected VnfcInstanceGroupCustomization createVNFCInstanceGroup(NodeTemplate vnfcNodeTemplate, Group group,
- VnfResourceCustomization vnfResourceCustomization) {
+ VnfResourceCustomization vnfResourceCustomization, ToscaResourceStructure toscaResourceStructure) {
Metadata instanceMetadata = group.getMetadata();
// Populate InstanceGroup
@@ -1172,7 +1172,17 @@ public class ToscaResourceInstaller {
vfcInstanceGroupCustom.setModelCustomizationUUID(vnfResourceCustomization.getModelCustomizationUUID());
vfcInstanceGroupCustom.setModelUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
vfcInstanceGroupCustom.setDescription(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION));
- vfcInstanceGroupCustom.setFunction("FUNCTION");
+
+ String getInputName = null;
+ String groupProperty = toscaResourceStructure.getSdcCsarHelper().getGroupPropertyLeafValue(group, "vfc_instance_group_function");
+ if (groupProperty != null) {
+ int getInputIndex = groupProperty.indexOf("{get_input=");
+ if (getInputIndex > -1) {
+ getInputName = groupProperty.substring(getInputIndex+11, groupProperty.length()-1);
+ }
+ }
+ vfcInstanceGroupCustom.setFunction(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(vnfcNodeTemplate, getInputName));
+
vfcInstanceGroupCustom.setInstanceGroup(vfcInstanceGroup);
vfcInstanceGroupCustom.setVnfResourceCust(vnfResourceCustomization);
@@ -1595,7 +1605,7 @@ public class ToscaResourceInstaller {
for (Group group : groupList) {
- VnfcInstanceGroupCustomization vnfcInstanceGroupCustomization = createVNFCInstanceGroup(vfNodeTemplate, group, vnfResourceCustomization);
+ VnfcInstanceGroupCustomization vnfcInstanceGroupCustomization = createVNFCInstanceGroup(vfNodeTemplate, group, vnfResourceCustomization, toscaResourceStructure);
vnfcInstanceGroupCustomizationRepo.saveAndFlush(vnfcInstanceGroupCustomization);
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
index 0cd5d8dcb7..79d2a867e8 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
@@ -820,7 +820,7 @@ public class ServiceInstances {
.errorInfo(errorLoggerInfo).build();
}
- if(!requestScope.equalsIgnoreCase(ModelType.service.name())){
+ if(!requestScope.equalsIgnoreCase(ModelType.service.name()) && action != Action.recreateInstance){
aLaCarte = true;
}else if(aLaCarte == null){
aLaCarte = false;
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidation.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidation.java
index c4671aed3c..a6fdcc958d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidation.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidation.java
@@ -133,7 +133,7 @@ public class RelatedInstancesValidation implements ValidationRule{
if(InstanceDirection.source.equals(relatedInstance.getInstanceDirection()) && relatedInstanceModelInfo.getModelType().equals(ModelType.vnf)) {
isSourceVnfPresent = true;
} else if(InstanceDirection.destination.equals(relatedInstance.getInstanceDirection()) &&
- (relatedInstanceModelInfo.getModelType().equals(ModelType.vnf) || (relatedInstanceModelInfo.getModelType().equals(ModelType.pnf) && reqVersion == 6))) {
+ (relatedInstanceModelInfo.getModelType().equals(ModelType.vnf) || (relatedInstanceModelInfo.getModelType().equals(ModelType.pnf)))) {
isDestinationVnfPresent = true;
}
}