summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-validation-lib
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidator.java68
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidatorTest.java41
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/hot-nimbus-psm_v1.0.yaml62
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/MANIFEST.json17
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/hot-nimbus-psm_v1.0.env10
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/hot-nimbus-psm_v1.0.yaml86
8 files changed, 274 insertions, 37 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidator.java
index bb749079f5..f0e7ceccd3 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidator.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidator.java
@@ -2,6 +2,7 @@ package org.openecomp.sdc.validation.impl.validators.heatresource;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
+import org.openecomp.core.validation.ErrorMessageCode;
import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
import org.openecomp.core.validation.types.GlobalValidationContext;
import org.openecomp.sdc.common.errors.Messages;
@@ -29,13 +30,16 @@ import java.util.Set;
*/
public class NeutronPortResourceValidator implements ResourceValidator {
private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
+ private static ErrorMessageCode ERROR_HPRODE_HPR1 = new ErrorMessageCode("HPR1");
+ private static ErrorMessageCode ERROR_HPRODE_HPR2 = new ErrorMessageCode("HPR2");
+ private static ErrorMessageCode ERROR_HPRODE_HPR3 = new ErrorMessageCode("HPR3");
@Override
public void validate(String fileName, Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext, ValidationContext validationContext) {
validateNovaServerPortBinding
- (fileName, resourceEntry, (HeatResourceValidationContext) validationContext, globalContext);
+ (fileName, resourceEntry, (HeatResourceValidationContext) validationContext, globalContext);
}
@@ -48,26 +52,26 @@ public class NeutronPortResourceValidator implements ResourceValidator {
mdcDataDebugMessage.debugEntryMessage("file", fileName);
Map<String, Map<String, List<String>>> portIdToPointingResources =
- heatResourceValidationContext.getFileLevelResourceDependencies()
- .get(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource());
+ heatResourceValidationContext.getFileLevelResourceDependencies()
+ .get(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource());
String portResourceId = resourceEntry.getKey();
if (MapUtils.isEmpty(portIdToPointingResources)) {
globalContext
- .addMessage(fileName, ErrorLevel.WARNING,
- ErrorMessagesFormatBuilder
- .getErrorWithParameters(
- Messages.PORT_NO_BIND_TO_ANY_NOVA_SERVER.getErrorMessage(),
- portResourceId), LoggerTragetServiceName.CHECK_FOR_ORPHAN_PORTS,
- LoggerErrorDescription.NO_BIND_FROM_PORT_TO_NOVA);
+ .addMessage(fileName, ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ ERROR_HPRODE_HPR1, Messages.PORT_NO_BIND_TO_ANY_NOVA_SERVER.getErrorMessage(),
+ portResourceId), LoggerTragetServiceName.CHECK_FOR_ORPHAN_PORTS,
+ LoggerErrorDescription.NO_BIND_FROM_PORT_TO_NOVA);
return;
}
Map<String, List<String>> pointingResourcesToCurrPort =
- portIdToPointingResources.get(portResourceId);
+ portIdToPointingResources.get(portResourceId);
checkPortBindingFromMap(
- fileName, portResourceId, pointingResourcesToCurrPort, globalContext);
+ fileName, portResourceId, pointingResourcesToCurrPort, globalContext);
mdcDataDebugMessage.debugExitMessage("file", fileName);
}
@@ -77,11 +81,11 @@ public class NeutronPortResourceValidator implements ResourceValidator {
Map<String, List<String>> resourcesPointingToCurrPort,
GlobalValidationContext globalContext) {
List<String> pointingNovaServers =
- MapUtils.isEmpty(resourcesPointingToCurrPort) ? new ArrayList<>()
- : resourcesPointingToCurrPort.get(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource());
+ MapUtils.isEmpty(resourcesPointingToCurrPort) ? new ArrayList<>()
+ : resourcesPointingToCurrPort.get(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource());
handleErrorEventsForPortBinding(
- fileName, portResourceId, globalContext, pointingNovaServers);
+ fileName, portResourceId, globalContext, pointingNovaServers);
}
@@ -92,23 +96,23 @@ public class NeutronPortResourceValidator implements ResourceValidator {
List<String> pointingNovaServers) {
if (isThereMoreThanOneBindFromNovaToPort(pointingNovaServers)) {
globalContext
- .addMessage(fileName, ErrorLevel.ERROR,
- ErrorMessagesFormatBuilder
- .getErrorWithParameters(
- Messages.MORE_THAN_ONE_BIND_FROM_NOVA_TO_PORT.getErrorMessage(),
- portResourceId),
- LoggerTragetServiceName.VALIDATE_NOVA_SERVER_PORT_BINDING,
- LoggerErrorDescription.PORT_BINDS_MORE_THAN_ONE_NOVA);
+ .addMessage(fileName, ErrorLevel.ERROR,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ ERROR_HPRODE_HPR2, Messages.MORE_THAN_ONE_BIND_FROM_NOVA_TO_PORT.getErrorMessage(),
+ portResourceId),
+ LoggerTragetServiceName.VALIDATE_NOVA_SERVER_PORT_BINDING,
+ LoggerErrorDescription.PORT_BINDS_MORE_THAN_ONE_NOVA);
}
if (isNoNovaPointingToPort(pointingNovaServers)) {
globalContext
- .addMessage(fileName, ErrorLevel.WARNING,
- ErrorMessagesFormatBuilder
- .getErrorWithParameters(
- Messages.PORT_NO_BIND_TO_ANY_NOVA_SERVER.getErrorMessage(),
- portResourceId), LoggerTragetServiceName.CHECK_FOR_ORPHAN_PORTS,
- LoggerErrorDescription.NO_BIND_FROM_PORT_TO_NOVA);
+ .addMessage(fileName, ErrorLevel.WARNING,
+ ErrorMessagesFormatBuilder
+ .getErrorWithParameters(
+ ERROR_HPRODE_HPR3, Messages.PORT_NO_BIND_TO_ANY_NOVA_SERVER.getErrorMessage(),
+ portResourceId), LoggerTragetServiceName.CHECK_FOR_ORPHAN_PORTS,
+ LoggerErrorDescription.NO_BIND_FROM_PORT_TO_NOVA);
}
}
@@ -143,11 +147,11 @@ public class NeutronPortResourceValidator implements ResourceValidator {
if (securityGroupsValue instanceof List) {
List<Object> securityGroupsListFromCurrResource =
- (List<Object>) propertiesMap.get("security_groups");
+ (List<Object>) propertiesMap.get("security_groups");
for (Object securityGroup : securityGroupsListFromCurrResource) {
removeSecurityGroupNamesFromListByGivenFunction(filename,
- ResourceReferenceFunctions.GET_RESOURCE.getFunction(), securityGroup,
- securityGroupResourceNameList, globalContext);
+ ResourceReferenceFunctions.GET_RESOURCE.getFunction(), securityGroup,
+ securityGroupResourceNameList, globalContext);
}
}
@@ -158,10 +162,10 @@ public class NeutronPortResourceValidator implements ResourceValidator {
String functionName,
Object securityGroup,
Collection<String>
- securityGroupResourceNameList,
+ securityGroupResourceNameList,
GlobalValidationContext globalContext) {
Set<String> securityGroupsNamesFromFunction = HeatStructureUtil
- .getReferencedValuesByFunctionName(filename, functionName, securityGroup, globalContext);
+ .getReferencedValuesByFunctionName(filename, functionName, securityGroup, globalContext);
securityGroupsNamesFromFunction.forEach(securityGroupResourceNameList::remove);
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidatorTest.java
index 359803f473..83e06ee5b7 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidatorTest.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/heatresource/NeutronPortResourceValidatorTest.java
@@ -18,18 +18,49 @@ public class NeutronPortResourceValidatorTest {
HeatResourceValidator baseValidator = new HeatResourceValidator();
NeutronPortResourceValidator resourceValidator = new NeutronPortResourceValidator();
+ private static final String PATH = "/org/openecomp/validation/validators/heat_validator/";
@Test
- public void testOnlyOneNovaPointsToOnePort() throws IOException {
+ public void testMoreThanOneBindFromNovaToPort() throws IOException {
Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
- resourceValidator, HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource(),
- "/org/openecomp/validation/validators/heat_validator/one_nova_points_to_one_port/negative_test/input");
+ resourceValidator, HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource(),
+ PATH + "one_nova_points_to_one_port/negative_test/input");
Assert.assertNotNull(messages);
Assert.assertEquals(messages.size(), 1);
Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1);
Assert.assertEquals(
- messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(),
- "ERROR: Resource Port oam1_int_port exceed allowed relations from NovaServer");
+ messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(),
+ "ERROR: [HPR2]: Resource Port oam1_int_port exceed allowed relations from NovaServer");
+ }
+
+ @Test
+ public void testPortNotBindToAnyNovaServerHPR1() throws IOException {
+ Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
+ resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+ PATH + "no_neutron_port/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(
+ messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(),
+ "WARNING: [HPR1]: Port not bind to any NOVA Server, Resource Id [nova_server_1]");
+ }
+
+ @Test
+ public void testPortNotBindToAnyNovaServerHPR3() throws IOException {
+ Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
+ resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+ PATH + "port_no_bind_to_any_nova_server/input");
+
+ Assert.assertNotNull(messages);
+ Assert.assertEquals(messages.size(), 1);
+
+ Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1);
+ Assert.assertEquals(
+ messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(),
+ "WARNING: [HPR3]: Port not bind to any NOVA Server, Resource Id [nova_server_1]");
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/MANIFEST.json
new file mode 100644
index 0000000000..dd26e5ac45
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..e5298fe389
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/no_neutron_port/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,62 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ vnf_id:
+ type: string
+
+resources:
+ nova_server_1:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: oam1_int_port }
+ fixed_ip: 10.0.0.0
+ floating_ip: 10.0.0.1
+ network: 100_1000_0011
+ port_extra_properties: {admin_state_up: true , allowed_address_pairs: 10}
+ subnet: 10.0.0.2
+ - port: { get_resource: oam1_mgmt_port }
+ metadata:
+ vnf_id: { get_param: vnf_id } \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/MANIFEST.json
new file mode 100644
index 0000000000..dd26e5ac45
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/MANIFEST.json
@@ -0,0 +1,17 @@
+{
+ "name": "hot-mog",
+ "description": "HOT template to create hot mog server",
+ "version": "2013-05-23",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.yaml",
+ "type": "HEAT",
+ "data": [
+ {
+ "file": "hot-nimbus-psm_v1.0.env",
+ "type": "HEAT_ENV"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/hot-nimbus-psm_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/hot-nimbus-psm_v1.0.env
new file mode 100644
index 0000000000..f24e4763c6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/hot-nimbus-psm_v1.0.env
@@ -0,0 +1,10 @@
+parameters:
+ pcrf_psm_server_names: ZRDM1PCRF01PSM001,ZRDM1PCRF01PSM002,ZRDM1PCRF01PSM003,ZRDM1PCRF01PSM004,ZRDM1PCRF01PSM005,ZRDM1PCRF01PSM006,ZRDM1PCRF01PSM007,ZRDM1PCRF01PSM008,ZRDM1PCRF01PSM009,ZRDM1PCRF01PSM010,ZRDM1PCRF01PSM011,ZRDM1PCRF01PSM012
+ pcrf_psm_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+ pcrf_psm_flavor_name: lc.4xlarge4
+ availabilityzone_name: nova
+ pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0
+ pcrf_cps_net_ips: 172.26.16.63,172.26.16.64,172.26.16.65,172.26.16.66,172.26.16.67,172.26.16.68,172.26.16.69,172.26.16.70,172.26.16.71,172.26.16.72,172.26.16.73,172.26.16.74
+ pcrf_cps_net_mask: 255.255.255.0
+ pcrf_security_group_name: nimbus_security_group
+ pcrf_vnf_id: 730797234b4a40aa99335157b02871cd
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/hot-nimbus-psm_v1.0.yaml
new file mode 100644
index 0000000000..d412ebbce6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/port_no_bind_to_any_nova_server/input/hot-nimbus-psm_v1.0.yaml
@@ -0,0 +1,86 @@
+heat_template_version: 2013-05-23
+
+description: heat template that creates PCRF Session Manager stack
+
+parameters:
+ pcrf_psm_server_names:
+ type: comma_delimited_list
+ label: PCRF SM server names
+ description: name of the PCRF SM instance
+ pcrf_psm_image_name:
+ type: string
+ label: PCRF SM image name
+ description: PCRF SM image name
+ pcrf_psm_flavor_name:
+ type: string
+ label: PCRF SM flavor name
+ description: flavor name of PCRF SM instance
+ availabilityzone_name:
+ type: string
+ label: availabilityzone name
+ description: availabilityzone name
+ pcrf_cps_net_name:
+ type: string
+ label: CPS network name
+ description: CPS network name
+ pcrf_cps_net_ips:
+ type: comma_delimited_list
+ label: CPS network ips
+ description: CPS network ips
+ pcrf_cps_net_mask:
+ type: string
+ label: CPS network mask
+ description: CPS network mask
+ pcrf_security_group_name:
+ type: string
+ label: security group name
+ description: the name of security group
+ pcrf_vnf_id:
+ type: string
+ label: PCRF VNF Id
+ description: PCRF VNF Id
+ vnf_id:
+ type: string
+
+resources:
+ nova_server_1:
+ type: OS::Nova::Server
+ properties:
+ pcrf_psm_server_name: { get_param: [pcrf_psm_server_names, 0] }
+ image: { get_param: pcrf_psm_image_name }
+ flavor: { get_param: pcrf_psm_flavor_name }
+ availabilityzone_name: { get_param: availabilityzone_name }
+ networks:
+ - port: { get_resource: oam1_int_port }
+ fixed_ip: 10.0.0.0
+ floating_ip: 10.0.0.1
+ network: 100_1000_0011
+ port_extra_properties: {admin_state_up: true , allowed_address_pairs: 10}
+ subnet: 10.0.0.2
+ - port: { get_resource: oam1_mgmt_port }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+
+ oam1_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: pcrf_psm_server_names}
+ fixed_ips: [{"ip_address": {get_param: [pcrf_psm_image_name, 0]}}]
+ security_groups: [{get_param: pcrf_psm_image_name}]
+ replacement_policy: AUTO
+
+ oam2_int_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: pcrf_psm_server_names}
+ fixed_ips: [{"ip_address": {get_param: [pcrf_psm_image_name, 0]}}]
+ security_groups: [{get_param: pcrf_psm_image_name}]
+ replacement_policy: AUTO
+
+ oam1_mgmt_port:
+ type: OS::Neutron::Port
+ properties:
+ network: {get_param: pcrf_psm_server_names}
+ fixed_ips: [{"ip_address": {get_param: [pcrf_psm_image_name, 0]}}]
+ security_groups: [{get_param: pcrf_psm_image_name}]
+ replacement_policy: AUTO \ No newline at end of file