diff options
Diffstat (limited to 'bpmn/so-bpmn-tasks/src')
23 files changed, 388 insertions, 189 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/AttributeNameValue.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/AttributeNameValue.java new file mode 100644 index 0000000000..e93e216ea3 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/AttributeNameValue.java @@ -0,0 +1,60 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2019 Intel Corp. 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.onap.so.client.adapter.vnf.mapper; + +import java.io.Serializable; + +public class AttributeNameValue implements Serializable { + private final static long serialVersionUID = -5215028275587848311L; + + private String attributeName; + private Object attributeValue; + + public AttributeNameValue(String attributeName, Object attributeValue) { + this.attributeName = attributeName; + this.attributeValue = attributeValue; + } + + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + public Object getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(Object attributeValue) { + this.attributeValue = attributeValue; + } + + @Override + public String toString() { + return new StringBuilder().append("{\"attribute_name\": \"") + .append(attributeName.toString()) + .append("\", \"attribute_value\": \"") + .append(attributeValue.toString()) + .append("\"}").toString(); + } +} diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java index 258bea9a01..dc113e5abc 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java @@ -7,9 +7,9 @@ * 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. @@ -36,6 +36,7 @@ import java.util.Optional; import javax.annotation.PostConstruct; +import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang3.StringUtils; import org.onap.sdnc.northbound.client.model.GenericResourceApiParam; import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam; @@ -78,6 +79,7 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; import org.onap.so.entity.MsoRequest; import org.onap.so.jsonpath.JsonPathUtil; +import org.onap.so.openstack.utils.MsoMulticloudUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -94,7 +96,7 @@ public class VnfAdapterVfModuleObjectMapper { @Autowired protected VnfAdapterObjectMapperUtils vnfAdapterObjectMapperUtils; private static List<String> sdncResponseParamsToSkip = asList("vnf_id", "vf_module_id", "vnf_name", "vf_module_name"); - + private ObjectMapper mapper = new ObjectMapper(); private static final JsonPathUtil jsonPath = JsonPathUtil.getInstance(); private static final String SUB_INT = "subint"; @@ -110,23 +112,23 @@ public class VnfAdapterVfModuleObjectMapper { private static final String FLOATING_IP = "_floating_ip"; private static final String FLOATING_V6_IP = "_floating_v6_ip"; private static final String UNDERSCORE = "_"; - + @PostConstruct public void init () { mapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); } - - public CreateVfModuleRequest createVfModuleRequestMapper(RequestContext requestContext, CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, GenericVnf genericVnf, + + public CreateVfModuleRequest createVfModuleRequestMapper(RequestContext requestContext, CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, GenericVnf genericVnf, VfModule vfModule, VolumeGroup volumeGroup, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException { CreateVfModuleRequest createVfModuleRequest = new CreateVfModuleRequest(); - + createVfModuleRequest.setCloudSiteId(cloudRegion.getLcpCloudRegionId()); createVfModuleRequest.setCloudOwner(cloudRegion.getCloudOwner()); createVfModuleRequest.setTenantId(cloudRegion.getTenantId()); createVfModuleRequest.setVfModuleId(vfModule.getVfModuleId()); createVfModuleRequest.setVfModuleName(vfModule.getVfModuleName()); createVfModuleRequest.setVnfId(genericVnf.getVnfId()); - createVfModuleRequest.setVnfType(genericVnf.getVnfType()); + createVfModuleRequest.setVnfType(genericVnf.getVnfType()); createVfModuleRequest.setVnfVersion(serviceInstance.getModelInfoServiceInstance().getModelVersion()); createVfModuleRequest.setVfModuleType(vfModule.getModelInfoVfModule().getModelName()); createVfModuleRequest.setModelCustomizationUuid(vfModule.getModelInfoVfModule().getModelCustomizationUUID()); @@ -134,38 +136,38 @@ public class VnfAdapterVfModuleObjectMapper { createVfModuleRequest.setVolumeGroupId(volumeGroup.getVolumeGroupId()); createVfModuleRequest.setVolumeGroupStackId(volumeGroup.getHeatStackId()); } - VfModule baseVfModule = getBaseVfModule(genericVnf); + VfModule baseVfModule = getBaseVfModule(genericVnf); if (baseVfModule != null) { createVfModuleRequest.setBaseVfModuleId(baseVfModule.getVfModuleId()); createVfModuleRequest.setBaseVfModuleStackId(baseVfModule.getHeatStackId()); } createVfModuleRequest.setVfModuleParams(buildVfModuleParamsMap(requestContext, serviceInstance, genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse)); - - createVfModuleRequest.setSkipAAI(true); + + createVfModuleRequest.setSkipAAI(true); createVfModuleRequest.setBackout(Boolean.TRUE.equals(orchestrationContext.getIsRollbackEnabled())); createVfModuleRequest.setFailIfExists(true); - - MsoRequest msoRequest = buildMsoRequest(requestContext, serviceInstance); + + MsoRequest msoRequest = buildMsoRequest(requestContext, serviceInstance); createVfModuleRequest.setMsoRequest(msoRequest); - + String messageId = vnfAdapterObjectMapperUtils.getRandomUuid(); createVfModuleRequest.setMessageId(messageId); createVfModuleRequest.setNotificationUrl(vnfAdapterObjectMapperUtils.createCallbackUrl("VNFAResponse", messageId)); - + return createVfModuleRequest; } - + private MsoRequest buildMsoRequest(RequestContext requestContext,ServiceInstance serviceInstance) { MsoRequest msoRequest = new MsoRequest(); msoRequest.setRequestId(requestContext.getMsoRequestId()); msoRequest.setServiceInstanceId(serviceInstance.getServiceInstanceId()); - return msoRequest; + return msoRequest; } - - private Map<String,Object> buildVfModuleParamsMap(RequestContext requestContext, ServiceInstance serviceInstance, GenericVnf genericVnf, + + private Map<String,Object> buildVfModuleParamsMap(RequestContext requestContext, ServiceInstance serviceInstance, GenericVnf genericVnf, VfModule vfModule, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException { - - + + GenericResourceApiVnfTopology vnfTop= mapper.readValue(sdncVnfQueryResponse, GenericResourceApiVnfTopology.class); GenericResourceApiVfModuleTopology vfModuleTop = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfModuleTopology.class); GenericResourceApiVnftopologyVnfTopology vnfTopology = vnfTop.getVnfTopology(); @@ -181,19 +183,41 @@ public class VnfAdapterVfModuleObjectMapper { buildParamsMapFromVfModuleSdncResponse(paramsMap, vfModuleTopology, false); buildParamsMapFromVnfSdncResponse(paramsMap, vnfTopology, networkRoleMap, false); } - + + // build the sdnc_directives from paramsMap + buildDirectivesParamFromMap(paramsMap, MsoMulticloudUtils.SDNC_DIRECTIVES, paramsMap); + buildDirectivesParamFromMap(paramsMap, MsoMulticloudUtils.USER_DIRECTIVES, requestContext.getUserParams()); + buildMandatoryParamsMap(paramsMap, serviceInstance, genericVnf, vfModule); - + // Parameters received from the request should overwrite any parameters received from SDNC paramsMap.putAll(requestContext.getUserParams()); - + if (vfModule.getCloudParams() != null) { paramsMap.putAll(vfModule.getCloudParams()); } return paramsMap; } - - private void buildMandatoryParamsMap(Map<String,Object> paramsMap, ServiceInstance serviceInstance, GenericVnf genericVnf, VfModule vfModule) { + + private void buildDirectivesParamFromMap(Map<String, Object> paramsMap, String directive, Map<String, Object> srcMap) { + StringBuilder directives = new StringBuilder(); + if (srcMap.size() > 0) { + directives.append("{ \"attributes\": [ "); + int i = 0; + for (String attributeName : srcMap.keySet()) { + directives.append(new AttributeNameValue(attributeName, srcMap.get(attributeName).toString())); + if (i < (srcMap.size()-1)) + directives.append(", "); + i++; + } + directives.append("] }"); + } else { + directives.append("{}"); + } + paramsMap.put(directive, directives.toString()); + } + + private void buildMandatoryParamsMap(Map<String,Object> paramsMap, ServiceInstance serviceInstance, GenericVnf genericVnf, VfModule vfModule) { paramsMap.put("vnf_id", genericVnf.getVnfId()); paramsMap.put("vnf_name", genericVnf.getVnfName()); paramsMap.put("vf_module_id", vfModule.getVfModuleId()); @@ -205,26 +229,26 @@ public class VnfAdapterVfModuleObjectMapper { Integer vfModuleIndex = vfModule.getModuleIndex(); if (vfModuleIndex != null) { paramsMap.put("vf_module_index", vfModuleIndex.toString()); - } + } } - - private void buildParamsMapFromVnfSdncResponse(Map<String,Object> paramsMap, GenericResourceApiVnftopologyVnfTopology vnfTopology, Map<String,String> networkRoleMap, boolean skipVnfResourceAssignments) throws JsonParseException, JsonMappingException, IOException { + + private void buildParamsMapFromVnfSdncResponse(Map<String,Object> paramsMap, GenericResourceApiVnftopologyVnfTopology vnfTopology, Map<String,String> networkRoleMap, boolean skipVnfResourceAssignments) throws JsonParseException, JsonMappingException, IOException { // Get VNF parameters from SDNC response GenericResourceApiParam vnfParametersData = vnfTopology.getVnfParametersData(); buildParamsMapFromSdncParams(paramsMap, vnfParametersData); - + if(!skipVnfResourceAssignments) { - GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments = vnfTopology.getVnfResourceAssignments(); + GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments = vnfTopology.getVnfResourceAssignments(); if (vnfResourceAssignments != null) { // Availability Zones buildAvailabilityZones(paramsMap, vnfResourceAssignments); // VNF Networks - buildVnfNetworks(paramsMap, vnfResourceAssignments, networkRoleMap); + buildVnfNetworks(paramsMap, vnfResourceAssignments, networkRoleMap); } } } - - private void buildAvailabilityZones (Map<String,Object> paramsMap, GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments) { + + private void buildAvailabilityZones (Map<String,Object> paramsMap, GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments) { GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsAvailabilityZones availabilityZones = vnfResourceAssignments.getAvailabilityZones(); if (availabilityZones != null) { List<String> availabilityZonesList = availabilityZones.getAvailabilityZone(); @@ -235,7 +259,7 @@ public class VnfAdapterVfModuleObjectMapper { } } } - + private void buildVnfNetworks (Map<String,Object> paramsMap, GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments, Map<String,String> networkRoleMap) { GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks vnfNetworks = vnfResourceAssignments.getVnfNetworks(); if (vnfNetworks != null) { @@ -247,41 +271,41 @@ public class VnfAdapterVfModuleObjectMapper { String vnfNetworkKey = networkRoleMap.get(networkRole); if (vnfNetworkKey == null || vnfNetworkKey.isEmpty()) { vnfNetworkKey = networkRole; - } - + } + String vnfNetworkNeutronIdValue = vnfNetwork.getNeutronId(); paramsMap.put(vnfNetworkKey + "_net_id", vnfNetworkNeutronIdValue); String vnfNetworkNetNameValue = vnfNetwork.getNetworkName(); paramsMap.put(vnfNetworkKey + "_net_name", vnfNetworkNetNameValue); String vnfNetworkNetFqdnValue = vnfNetwork.getContrailNetworkFqdn(); paramsMap.put(vnfNetworkKey + "_net_fqdn", vnfNetworkNetFqdnValue); - + buildVnfNetworkSubnets(paramsMap, vnfNetwork, vnfNetworkKey); - + } } } } - + private void buildVnfNetworkSubnets(Map<String,Object> paramsMap, GenericResourceApiVnfNetworkData vnfNetwork, String vnfNetworkKey) { String vnfNetworkString = convertToString(vnfNetwork); Optional<String> ipv4Ips = jsonPath.locateResult(vnfNetworkString, "$.subnets-data.subnet-data[*].[?(@.ip-version == 'ipv4' && @.dhcp-enabled == 'Y')].subnet-id"); if(ipv4Ips.isPresent()) addPairToMap(paramsMap, vnfNetworkKey, SUBNET_ID, ipv4Ips.get()); - + Optional<String> ipv6Ips = jsonPath.locateResult(vnfNetworkString, "$.subnets-data.subnet-data[*].[?(@.ip-version == 'ipv6' && @.dhcp-enabled == 'Y')].subnet-id"); if(ipv6Ips.isPresent()) addPairToMap(paramsMap, vnfNetworkKey, V6_SUBNET_ID, ipv6Ips.get()); - } + } - private void buildParamsMapFromVfModuleSdncResponse(Map<String,Object> paramsMap, GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology, boolean skipVfModuleAssignments) throws JsonParseException, JsonMappingException, IOException { + private void buildParamsMapFromVfModuleSdncResponse(Map<String,Object> paramsMap, GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology, boolean skipVfModuleAssignments) throws JsonParseException, JsonMappingException, IOException { // Get VF Module parameters from SDNC response GenericResourceApiParam vfModuleParametersData = vfModuleTopology.getVfModuleParameters(); buildParamsMapFromSdncParams(paramsMap, vfModuleParametersData); - - if(!skipVfModuleAssignments) { + + if(!skipVfModuleAssignments) { GenericResourceApiVfmoduleassignmentsVfModuleAssignments vfModuleAssignments = vfModuleTopology.getVfModuleAssignments(); - if (vfModuleAssignments != null) { + if (vfModuleAssignments != null) { // VNF-VMS GenericResourceApiVfmoduleassignmentsVfmoduleassignmentsVms vms = vfModuleAssignments.getVms(); if (vms != null) { @@ -289,7 +313,7 @@ public class VnfAdapterVfModuleObjectMapper { if (vmsList != null) { for (GenericResourceApiVmTopologyData vm : vmsList){ String key = vm.getVmType(); - buildVfModuleVmNames(paramsMap, vm, key); + buildVfModuleVmNames(paramsMap, vm, key); GenericResourceApiVmtopologydataVmNetworks vmNetworks = vm.getVmNetworks(); if (vmNetworks != null) { List<GenericResourceApiVmNetworkData> vmNetworksList = vmNetworks.getVmNetwork(); @@ -297,49 +321,49 @@ public class VnfAdapterVfModuleObjectMapper { for(int n = 0; n < vmNetworksList.size(); n++){ GenericResourceApiVmNetworkData network = vmNetworksList.get(n); network.getNetworkRoleTag(); - String networkKey = network.getNetworkRole(); + String networkKey = network.getNetworkRole(); // Floating IPs - buildVfModuleFloatingIps(paramsMap, network, key, networkKey); + buildVfModuleFloatingIps(paramsMap, network, key, networkKey); // Interface Route Prefixes - buildVfModuleInterfaceRoutePrefixes(paramsMap, network, key, networkKey); + buildVfModuleInterfaceRoutePrefixes(paramsMap, network, key, networkKey); // SRIOV Parameters - buildVfModuleSriovParameters(paramsMap, network, networkKey); + buildVfModuleSriovParameters(paramsMap, network, networkKey); // IPV4 and IPV6 Addresses buildVfModuleNetworkInformation(paramsMap, network, key, networkKey); - + buildVlanInformation(paramsMap, network, key, networkKey); - + } } } - + buildParamsMapFromVfModuleForHeatTemplate(paramsMap, vm); } - } - } + } + } } } } - + protected void buildVlanInformation(Map<String, Object> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) { - + String networkString = convertToString(network); String vlanFilterKey = key + UNDERSCORE + networkKey + UNDERSCORE + "vlan_filter"; String privateVlansKey = key + UNDERSCORE + networkKey + UNDERSCORE + "private_vlans"; String publicVlansKey = key + UNDERSCORE + networkKey + UNDERSCORE + "public_vlans"; String guestVlansKey = key + UNDERSCORE + networkKey + UNDERSCORE + "guest_vlans"; - + if (network.getSegmentationId() != null) { paramsMap.put(vlanFilterKey, network.getSegmentationId()); } - + List<String> privateVlans = jsonPath.locateResultList(networkString, "$.related-networks.related-network[?(@.vlan-tags.is-private == true)].vlan-tags.upper-tag-id"); List<String> publicVlans = jsonPath.locateResultList(networkString, "$.related-networks.related-network[?(@.vlan-tags.is-private == false)].vlan-tags.upper-tag-id"); List<String> concat = new ArrayList<>(privateVlans); concat.addAll(publicVlans); Collection<String> guestVlans = new HashSet<>(concat); - + if (!privateVlans.isEmpty()) { paramsMap.put(privateVlansKey, Joiner.on(",").join(privateVlans)); } @@ -358,7 +382,7 @@ public class VnfAdapterVfModuleObjectMapper { List<String> valueList = vmNames.getVmName(); if (valueList != null) { for(int i = 0; i < valueList.size(); i++){ - String value = valueList.get(i); + String value = valueList.get(i); if (i != valueList.size() - 1) { values += value + ","; } @@ -371,7 +395,7 @@ public class VnfAdapterVfModuleObjectMapper { } } } - + private void buildVfModuleFloatingIps(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) { GenericResourceApiVmnetworkdataFloatingIps floatingIps = network.getFloatingIps(); if (floatingIps != null) { @@ -395,7 +419,7 @@ public class VnfAdapterVfModuleObjectMapper { } } } - + private void buildVfModuleInterfaceRoutePrefixes(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) { GenericResourceApiVmnetworkdataInterfaceRoutePrefixes interfaceRoutePrefixes = network.getInterfaceRoutePrefixes(); if (interfaceRoutePrefixes != null) { @@ -404,14 +428,14 @@ public class VnfAdapterVfModuleObjectMapper { sbInterfaceRoutePrefixes.append("["); if (interfaceRoutePrefixesList != null) { for(int a = 0; a < interfaceRoutePrefixesList.size(); a++){ - String interfaceRoutePrefixValue = interfaceRoutePrefixesList.get(a); + String interfaceRoutePrefixValue = interfaceRoutePrefixesList.get(a); if (a != interfaceRoutePrefixesList.size() - 1) { sbInterfaceRoutePrefixes.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}" + ","); } else { - sbInterfaceRoutePrefixes.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}"); + sbInterfaceRoutePrefixes.append("{\"interface_route_table_routes_route_prefix\": \"" + interfaceRoutePrefixValue + "\"}"); } - } + } sbInterfaceRoutePrefixes.append("]"); if (interfaceRoutePrefixesList.size() > 0) { paramsMap.put(key + UNDERSCORE + networkKey + "_route_prefixes", sbInterfaceRoutePrefixes.toString()); @@ -419,7 +443,7 @@ public class VnfAdapterVfModuleObjectMapper { } } } - + private void buildVfModuleSriovParameters(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String networkKey) { // SRIOV Parameters GenericResourceApiVmnetworkdataSriovParameters sriovParameters = network.getSriovParameters(); @@ -430,14 +454,14 @@ public class VnfAdapterVfModuleObjectMapper { StringBuilder sriovFilterBuf = new StringBuilder(); if (heatVlanFiltersList != null) { for(int a = 0; a < heatVlanFiltersList.size(); a++){ - String heatVlanFilterValue = heatVlanFiltersList.get(a); + String heatVlanFilterValue = heatVlanFiltersList.get(a); if (a != heatVlanFiltersList.size() - 1) { sriovFilterBuf.append(heatVlanFilterValue).append(","); } else { - sriovFilterBuf.append(heatVlanFilterValue); + sriovFilterBuf.append(heatVlanFilterValue); } - } + } if (heatVlanFiltersList.size() > 0) { paramsMap.put(networkKey + "_ATT_VF_VLAN_FILTER", sriovFilterBuf.toString()); } @@ -445,13 +469,13 @@ public class VnfAdapterVfModuleObjectMapper { } } } - + private void buildVfModuleNetworkInformation(Map<String,Object> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) { - + GenericResourceApiVmnetworkdataNetworkInformationItems networkInformationItems = network.getNetworkInformationItems(); StringBuilder sbIpv4Ips = new StringBuilder(); StringBuilder sbIpv6Ips = new StringBuilder(); - + if (networkInformationItems != null) { List<GenericResourceApiVmnetworkdataNetworkinformationitemsNetworkInformationItem> networkInformationItemList = networkInformationItems.getNetworkInformationItem(); if (networkInformationItemList != null) { @@ -461,7 +485,7 @@ public class VnfAdapterVfModuleObjectMapper { GenericResourceApiVmnetworkdataNetworkinformationitemsNetworkinformationitemNetworkIps ips = ipAddress.getNetworkIps(); if (ips != null) { List<String> ipsList = ips.getNetworkIp(); - if (ipsList != null) { + if (ipsList != null) { String ipVersion = ipAddress.getIpVersion(); for (int b = 0; b < ipsList.size(); b++) { String ipAddressValue = ipsList.get(b); @@ -472,7 +496,7 @@ public class VnfAdapterVfModuleObjectMapper { else { sbIpv4Ips.append(ipAddressValue); } - paramsMap.put(key + UNDERSCORE + networkKey + IP + UNDERSCORE + b, ipAddressValue); + paramsMap.put(key + UNDERSCORE + networkKey + IP + UNDERSCORE + b, ipAddressValue); } else if (ipVersion.equals("ipv6")) { if (b != ipsList.size() - 1) { @@ -481,11 +505,11 @@ public class VnfAdapterVfModuleObjectMapper { else { sbIpv6Ips.append(ipAddressValue); } - paramsMap.put(key + UNDERSCORE + networkKey + V6_IP + UNDERSCORE + b, ipAddressValue); - } + paramsMap.put(key + UNDERSCORE + networkKey + V6_IP + UNDERSCORE + b, ipAddressValue); + } } paramsMap.put(key + UNDERSCORE + networkKey + "_ips", sbIpv4Ips.toString()); - paramsMap.put(key + UNDERSCORE + networkKey + "_v6_ips", sbIpv6Ips.toString()); + paramsMap.put(key + UNDERSCORE + networkKey + "_v6_ips", sbIpv6Ips.toString()); } } } @@ -493,43 +517,43 @@ public class VnfAdapterVfModuleObjectMapper { } } } - + /* * Build Mapping from GenericResourceApi SDNC for Heat Template so that AIC - PO gets accurate requests for vf module assignments. * Build Count of SubInterfaces, VLAN Tag, network_name, network_id, * ip_address (V4 and V6) and Floating IPs Addresses (V4 and V6) for Heat Template - */ + */ private void buildParamsMapFromVfModuleForHeatTemplate(Map<String,Object> paramsMap, GenericResourceApiVmTopologyData vm) { GenericResourceApiVmtopologydataVmNames vmNames = vm.getVmNames(); - + if (vmNames != null) { - + List<GenericResourceApiVmtopologydataVmnamesVnfcNames> vnfcNamesList = vmNames.getVnfcNames(); if (vnfcNamesList != null) { - + for(int i = 0; i < vnfcNamesList.size(); i++){ - + GenericResourceApiVmtopologydataVmnamesVnfcNames vnfcNames = vnfcNamesList.get(i); parseVnfcNamesData(paramsMap, vnfcNames); } } } } - + /* * Parse vnfcNames data to build Mapping from GenericResourceApi SDNC for Heat Template. - */ + */ private void parseVnfcNamesData(Map<String,Object> paramsMap, GenericResourceApiVmtopologydataVmnamesVnfcNames vnfcNames) { - + if (vnfcNames != null) { GenericResourceApiVnfcNetworkData vnfcNetworks = vnfcNames.getVnfcNetworks(); if (vnfcNetworks != null) { List<GenericResourceApiVnfcnetworkdataVnfcNetworkData> vnfcNetworkdataList = vnfcNetworks.getVnfcNetworkData(); - + if (vnfcNetworkdataList != null) { - + for(int networkDataIdx = 0; networkDataIdx < vnfcNetworkdataList.size(); networkDataIdx++){ - + GenericResourceApiVnfcnetworkdataVnfcNetworkData vnfcNetworkdata = vnfcNetworkdataList.get(networkDataIdx); parseVnfcNetworkData(paramsMap, vnfcNetworkdata, networkDataIdx); } @@ -537,72 +561,72 @@ public class VnfAdapterVfModuleObjectMapper { } } } - + /* * Parse VnfcNetworkData to build Mapping from GenericResourceApi SDNC for Heat Template. * Build Count of SubInterfaces, VLAN Tag, network_name, network_id, * ip_address (V4 and V6) and Floating IPs Addresses (V4 and V6) for Heat Template - */ + */ private void parseVnfcNetworkData(Map<String,Object> paramsMap, GenericResourceApiVnfcnetworkdataVnfcNetworkData vnfcNetworkdata, int networkDataIdx) { - + String vmTypeKey = vnfcNetworkdata.getVnfcType(); GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcPorts vnfcPorts = vnfcNetworkdata.getVnfcPorts(); if (vnfcPorts != null) { - List<GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort> vnfcPortList = vnfcPorts.getVnfcPort(); - if (vnfcPortList != null) { + List<GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort> vnfcPortList = vnfcPorts.getVnfcPort(); + if (vnfcPortList != null) { for(int portIdx = 0; portIdx < vnfcPortList.size(); portIdx++){ - + GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort vnfcPort = vnfcPortList.get(portIdx); GenericResourceApiSubInterfaceNetworkData vnicSubInterfaces = vnfcPort.getVnicSubInterfaces(); - + String vnicSubInterfacesString = convertToString(vnicSubInterfaces); - String networkRoleKey = vnfcPort.getCommonSubInterfaceRole(); + String networkRoleKey = vnfcPort.getCommonSubInterfaceRole(); String subInterfaceKey = createVnfcSubInterfaceKey(vmTypeKey, networkDataIdx, networkRoleKey, portIdx); String globalSubInterfaceKey = createGlobalVnfcSubInterfaceKey(vmTypeKey, networkRoleKey, portIdx); - + buildVfModuleSubInterfacesCount(paramsMap, globalSubInterfaceKey, vnicSubInterfaces); - + buildVfModuleVlanTag(paramsMap, subInterfaceKey, vnicSubInterfacesString); - + buildVfModuleNetworkName(paramsMap, subInterfaceKey, vnicSubInterfacesString); - + buildVfModuleNetworkId(paramsMap, subInterfaceKey, vnicSubInterfacesString); - + buildVfModuleIpV4AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString); - + buildVfModuleIpV6AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString); - + buildVfModuleFloatingIpV4HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString); - + buildVfModuleFloatingIpV6HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString); } } } } - + /* * Build "count" (calculating the total number of sub-interfaces) for Heat Template * Building Criteria : {vm-type}_subint_{network-role}_port_{index}_subintcount * vmTypeKey = vm-type, networkRoleKey = common-sub-interface-role * Example: fw_subint_ctrl_port_0_subintcount - * + * */ private void buildVfModuleSubInterfacesCount(Map<String,Object> paramsMap, String keyPrefix, GenericResourceApiSubInterfaceNetworkData vnicSubInterfaces) { List<GenericResourceApiSubinterfacenetworkdataSubInterfaceNetworkData> subInterfaceNetworkDataList = vnicSubInterfaces.getSubInterfaceNetworkData(); - + if ( (subInterfaceNetworkDataList != null) && !subInterfaceNetworkDataList.isEmpty() ) { addPairToMap(paramsMap, keyPrefix, SUB_INT_COUNT, String.valueOf(subInterfaceNetworkDataList.size())); } } - + protected String createVnfcSubInterfaceKey(String vmTypeKey, int networkDataIdx, String networkRoleKey, int portIdx) { - + return Joiner.on(UNDERSCORE).join(Arrays.asList(vmTypeKey, networkDataIdx, SUB_INT, networkRoleKey, PORT, portIdx)); } - + protected String createGlobalVnfcSubInterfaceKey(String vmTypeKey,String networkRoleKey, int portIdx) { - + return Joiner.on(UNDERSCORE).join(Arrays.asList(vmTypeKey, SUB_INT, networkRoleKey, PORT, portIdx)); } @@ -611,10 +635,10 @@ public class VnfAdapterVfModuleObjectMapper { * Building Criteria : {vm-type}_{index}_subint_{network-role}_port_{index}_vlan_ids * vmTypeKey = vm-type, networkRoleKey = common-sub-interface-role * Example: fw_0_subint_ctrl_port_0_vlan_ids - * + * */ protected void buildVfModuleVlanTag(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) { - + List<String> vlanTagIds = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].vlan-tag-id"); addPairToMap(paramsMap, keyPrefix, VLAN_IDS, vlanTagIds); @@ -624,12 +648,12 @@ public class VnfAdapterVfModuleObjectMapper { * Building Criteria : {vm-type}_{index}_subint_{network-role}_port_{index}_net_names * vmTypeKey = vm-type, networkRoleKey = common-sub-interface-role * Example: fw_0_subint_ctrl_port_0_net_names - * + * */ protected void buildVfModuleNetworkName(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) { - + List<String> neworkNames = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-name"); - + addPairToMap(paramsMap, keyPrefix, NET_NAMES, neworkNames); } @@ -638,25 +662,25 @@ public class VnfAdapterVfModuleObjectMapper { * Building Criteria : {vm-type}_{index}_subint_{network-role}_port_{index}_net_ids * vmTypeKey = vm-type, networkRoleKey = common-sub-interface-role * Example: fw_0_subint_ctrl_port_0_net_ids - * + * */ protected void buildVfModuleNetworkId(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) { - + List<String> neworkIds = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-id"); - + addPairToMap(paramsMap, keyPrefix, NET_IDS, neworkIds); } - + /* * Build ip_address for V4 for Heat Template - * Building Criteria : + * Building Criteria : * {vm-type}_{index}_subint_{network-role}_port_{index}_ip_{index} -- for ipV4 * key = vm-type, networkRoleKey = NetWork-Role */ protected void buildVfModuleIpV4AddressHeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) { - + List<String> ipv4Ips = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-information-items.network-information-item[?(@.ip-version == 'ipv4')].network-ips.network-ip[*]"); - + addPairToMap(paramsMap, keyPrefix, IP, ipv4Ips); for (int i = 0; i < ipv4Ips.size(); i++) { @@ -664,15 +688,15 @@ public class VnfAdapterVfModuleObjectMapper { } } - + /* * Build ip_address for Heat Template - * Building Criteria : + * Building Criteria : * {vm-type}_{index}_subint_{network-role}_port_{index}_v6_ip_{index} -- for ipV6 * key = vm-type, networkRoleKey = NetWork-Role */ protected void buildVfModuleIpV6AddressHeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) { - + List<String> ipv6Ips = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].network-information-items.network-information-item[?(@.ip-version == 'ipv6')].network-ips.network-ip[*]"); addPairToMap(paramsMap, keyPrefix, V6_IP, ipv6Ips); @@ -681,14 +705,14 @@ public class VnfAdapterVfModuleObjectMapper { addPairToMap(paramsMap, keyPrefix, V6_IP + UNDERSCORE + i, ipv6Ips.get(i)); } } - + /* * Build floatingip_address for Heat Template - * Building Criteria : + * Building Criteria : * {vm-type}_subint_{network-role}_port_{index}_floating_ip -- for ipV4 */ protected void buildVfModuleFloatingIpV4HeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) { - + List<String> floatingV4 = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].floating-ips.floating-ip-v4[*]"); if (!floatingV4.isEmpty()) { @@ -697,35 +721,35 @@ public class VnfAdapterVfModuleObjectMapper { addPairToMap(paramsMap, keyPrefix, FLOATING_IP, floatingV4); } - + /* * Build floatingip_address for Heat Template - * Building Criteria : + * Building Criteria : * {vm-type}_subint_{network-role}_port_{index}_floating_v6_ip -- for ipV6 */ protected void buildVfModuleFloatingIpV6HeatTemplate(Map<String,Object> paramsMap, String keyPrefix, String vnicSubInterfaces) { - + List<String> floatingV6 = jsonPath.locateResultList(vnicSubInterfaces, "$.sub-interface-network-data[*].floating-ips.floating-ip-v6[*]"); - + if (!floatingV6.isEmpty()) { floatingV6 = Collections.singletonList(floatingV6.get(0)); } addPairToMap(paramsMap, keyPrefix, FLOATING_V6_IP, floatingV6); } - + protected void addPairToMap(Map<String, Object> paramsMap, String keyPrefix, String key, String value) { - + addPairToMap(paramsMap, keyPrefix, key, Collections.singletonList(value)); } protected void addPairToMap(Map<String, Object> paramsMap, String keyPrefix, String key, List<String> value) { - + if (!value.isEmpty()) { paramsMap.put(keyPrefix + key, Joiner.on(",").join(value)); } } - - private void buildParamsMapFromSdncParams(Map<String,Object> paramsMap, GenericResourceApiParam parametersData) { + + private void buildParamsMapFromSdncParams(Map<String,Object> paramsMap, GenericResourceApiParam parametersData) { if (parametersData != null) { List<GenericResourceApiParamParam> paramsList = parametersData.getParam(); if (paramsList != null) { @@ -736,20 +760,20 @@ public class VnfAdapterVfModuleObjectMapper { String parameterValue = param.getValue(); paramsMap.put(parameterName, parameterValue); } - } + } } - } + } } - + private Map<String,String> buildNetworkRoleMap(GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology) throws JsonParseException, JsonMappingException, IOException { - Map<String, String> networkRoleMap = new HashMap<>(); + Map<String, String> networkRoleMap = new HashMap<>(); GenericResourceApiVfmoduleassignmentsVfModuleAssignments vfModuleAssignments = vfModuleTopology.getVfModuleAssignments(); - if (vfModuleAssignments != null) { + if (vfModuleAssignments != null) { GenericResourceApiVfmoduleassignmentsVfmoduleassignmentsVms vms = vfModuleAssignments.getVms(); if (vms != null) { List<GenericResourceApiVmTopologyData> vmsList = vms.getVm(); if (vmsList != null) { - for (GenericResourceApiVmTopologyData vm : vmsList){ + for (GenericResourceApiVmTopologyData vm : vmsList){ GenericResourceApiVmtopologydataVmNetworks vmNetworks = vm.getVmNetworks(); if (vmNetworks != null) { List<GenericResourceApiVmNetworkData> vmNetworksList = vmNetworks.getVmNetwork(); @@ -771,8 +795,8 @@ public class VnfAdapterVfModuleObjectMapper { } return networkRoleMap; } - - public DeleteVfModuleRequest deleteVfModuleRequestMapper(RequestContext requestContext,CloudRegion cloudRegion, + + public DeleteVfModuleRequest deleteVfModuleRequestMapper(RequestContext requestContext,CloudRegion cloudRegion, ServiceInstance serviceInstance, GenericVnf genericVnf, VfModule vfModule) throws IOException { DeleteVfModuleRequest deleteVfModuleRequest = new DeleteVfModuleRequest(); @@ -787,20 +811,20 @@ public class VnfAdapterVfModuleObjectMapper { { deleteVfModuleRequest.setVfModuleStackId(vfModule.getVfModuleName()); } - + deleteVfModuleRequest.setSkipAAI(true); setIdAndUrl(deleteVfModuleRequest); - MsoRequest msoRequest = buildMsoRequest(requestContext, serviceInstance); + MsoRequest msoRequest = buildMsoRequest(requestContext, serviceInstance); deleteVfModuleRequest.setMsoRequest(msoRequest); return deleteVfModuleRequest; } - + protected void setIdAndUrl(DeleteVfModuleRequest deleteVfModuleRequest) throws UnsupportedEncodingException{ String messageId = vnfAdapterObjectMapperUtils.getRandomUuid(); - deleteVfModuleRequest.setMessageId(messageId); + deleteVfModuleRequest.setMessageId(messageId); deleteVfModuleRequest.setNotificationUrl(vnfAdapterObjectMapperUtils.createCallbackUrl("VNFAResponse", messageId)); } - + private String convertToString(Object obj) { String json; try { @@ -808,10 +832,10 @@ public class VnfAdapterVfModuleObjectMapper { } catch (JsonProcessingException e) { json = "{}"; } - + return json; } - + private VfModule getBaseVfModule(GenericVnf genericVnf) { List<VfModule> vfModules = genericVnf.getVfModules(); VfModule baseVfModule = null; @@ -819,7 +843,7 @@ public class VnfAdapterVfModuleObjectMapper { for(int i = 0; i < vfModules.size(); i++) { if (vfModules.get(i).getModelInfoVfModule().getIsBaseBoolean()) { baseVfModule = vfModules.get(i); - break; + break; } } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java index b11e2caafa..7b86756afa 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapper.java @@ -21,6 +21,7 @@ package org.onap.so.client.sdnc.mapper; import java.net.URI; +import java.util.UUID; import org.onap.sdnc.northbound.client.model.GenericResourceApiConfigurationinformationConfigurationInformation; import org.onap.sdnc.northbound.client.model.GenericResourceApiGcTopologyOperationInformation; @@ -52,9 +53,13 @@ public class GCTopologyOperationRequestMapper { Configuration vnrConfiguration, GenericVnf voiceVnf, String sdncReqId,URI callbackUri) { + String msoRequestId = UUID.randomUUID().toString(); + if (requestContext != null && requestContext.getMsoRequestId() != null) { + msoRequestId = requestContext.getMsoRequestId(); + } GenericResourceApiGcTopologyOperationInformation req = new GenericResourceApiGcTopologyOperationInformation(); GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = generalTopologyObjectMapper.buildSdncRequestHeader(svcAction, sdncReqId,callbackUri.toString()); - GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(sdncReqId, reqAction); + GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, reqAction); GenericResourceApiServiceinformationServiceInformation serviceInformation = generalTopologyObjectMapper.buildServiceInformation(serviceInstance, requestContext, customer, false); GenericResourceApiConfigurationinformationConfigurationInformation configurationInformation = generalTopologyObjectMapper.buildConfigurationInformation(vnrConfiguration,true); GenericResourceApiGcrequestinputGcRequestInput gcRequestInput = generalTopologyObjectMapper.buildGcRequestInformation(voiceVnf,null); @@ -74,11 +79,15 @@ public class GCTopologyOperationRequestMapper { RequestContext requestContext, Configuration vnrConfiguration, String sdncReqId, URI callbackUri) { + String msoRequestId = null; + if (requestContext != null) { + msoRequestId = requestContext.getMsoRequestId(); + } GenericResourceApiGcTopologyOperationInformation req = new GenericResourceApiGcTopologyOperationInformation(); GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = generalTopologyObjectMapper.buildSdncRequestHeader(svcAction, sdncReqId,callbackUri.toString()); GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper - .buildGenericResourceApiRequestinformationRequestInformation(sdncReqId, + .buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, GenericResourceApiRequestActionEnumeration.DELETEGENERICCONFIGURATIONINSTANCE); GenericResourceApiServiceinformationServiceInformation serviceInformation = new GenericResourceApiServiceinformationServiceInformation(); serviceInformation.setServiceInstanceId(serviceInstance.getServiceInstanceId()); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java index b086b8a7ff..756e5b068e 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java @@ -60,10 +60,10 @@ public class GeneralTopologyObjectMapper { /* * Build GenericResourceApiRequestinformationRequestInformation */ - public GenericResourceApiRequestinformationRequestInformation buildGenericResourceApiRequestinformationRequestInformation(String sdncReqId, GenericResourceApiRequestActionEnumeration requestAction){ + public GenericResourceApiRequestinformationRequestInformation buildGenericResourceApiRequestinformationRequestInformation(String msoReqId, GenericResourceApiRequestActionEnumeration requestAction){ GenericResourceApiRequestinformationRequestInformation requestInformation = new GenericResourceApiRequestinformationRequestInformation(); - requestInformation.setRequestId(sdncReqId); + requestInformation.setRequestId(msoReqId); requestInformation.setRequestAction(requestAction); requestInformation.setSource("MSO"); return requestInformation; diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java index 188a228e5d..aef7e9e044 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapper.java @@ -57,8 +57,12 @@ public class NetworkTopologyOperationRequestMapper { Customer customer, RequestContext requestContext, CloudRegion cloudRegion) { GenericResourceApiNetworkOperationInformation req = new GenericResourceApiNetworkOperationInformation(); String sdncReqId = UUID.randomUUID().toString(); + String msoRequestId = UUID.randomUUID().toString(); + if (requestContext != null && requestContext.getMsoRequestId() != null) { + msoRequestId = requestContext.getMsoRequestId(); + } GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = generalTopologyObjectMapper.buildSdncRequestHeader(svcAction, sdncReqId); - GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(sdncReqId, reqAction); + GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, reqAction); GenericResourceApiServiceinformationServiceInformation serviceInformation = generalTopologyObjectMapper.buildServiceInformation(serviceInstance, requestContext, customer, true); GenericResourceApiNetworkinformationNetworkInformation networkInformation = generalTopologyObjectMapper.buildNetworkInformation(network); GenericResourceApiNetworkrequestinputNetworkRequestInput networkRequestInput = buildNetworkRequestInput(network, serviceInstance, cloudRegion); @@ -68,7 +72,7 @@ public class NetworkTopologyOperationRequestMapper { req.setServiceInformation(serviceInformation); req.setNetworkInformation(networkInformation); - if (requestContext.getUserParams() != null) { + if (requestContext != null && requestContext.getUserParams() != null) { for (Map.Entry<String, Object> entry : requestContext.getUserParams().entrySet()) { GenericResourceApiParam networkInputParameters = new GenericResourceApiParam(); GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam(); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java index 505466b22c..cdb4ab96aa 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java @@ -49,9 +49,13 @@ public class ServiceTopologyOperationMapper{ SDNCSvcAction svcAction, GenericResourceApiRequestActionEnumeration resourceAction,ServiceInstance serviceInstance, Customer customer, RequestContext requestContext) { String sdncReqId = UUID.randomUUID().toString(); + String msoRequestId = UUID.randomUUID().toString(); + if (requestContext != null && requestContext.getMsoRequestId() != null) { + msoRequestId = requestContext.getMsoRequestId(); + } GenericResourceApiServiceOperationInformation servOpInput = new GenericResourceApiServiceOperationInformation(); GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = generalTopologyObjectMapper.buildSdncRequestHeader(svcAction, sdncReqId); - GenericResourceApiRequestinformationRequestInformation reqInfo = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(sdncReqId, resourceAction); + GenericResourceApiRequestinformationRequestInformation reqInfo = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, resourceAction); GenericResourceApiServiceinformationServiceInformation servInfo = generalTopologyObjectMapper.buildServiceInformation(serviceInstance, requestContext, customer, true); GenericResourceApiServicerequestinputServiceRequestInput servReqInfo = new GenericResourceApiServicerequestinputServiceRequestInput(); @@ -62,7 +66,7 @@ public class ServiceTopologyOperationMapper{ servOpInput.setServiceInformation(servInfo); servOpInput.setServiceRequestInput(servReqInfo); - if(requestContext.getUserParams()!=null){ + if(requestContext != null && requestContext.getUserParams()!=null){ for (Map.Entry<String, Object> entry : requestContext.getUserParams().entrySet()) { GenericResourceApiServicerequestinputServiceRequestInput serviceRequestInput = new GenericResourceApiServicerequestinputServiceRequestInput(); serviceRequestInput.setServiceInstanceName(serviceInstance.getServiceInstanceName()); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java index b8c5fad41d..86c718d165 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java @@ -96,8 +96,12 @@ public class VfModuleTopologyOperationRequestMapper { } String sdncReqId = UUID.randomUUID().toString(); + String msoRequestId = UUID.randomUUID().toString(); + if (requestContext != null && requestContext.getMsoRequestId() != null) { + msoRequestId = requestContext.getMsoRequestId(); + } - GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(sdncReqId, + GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper.buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, requestAction); GenericResourceApiServiceinformationServiceInformation serviceInformation = generalTopologyObjectMapper.buildServiceInformation(serviceInstance, requestContext, customer, includeModelInformation); GenericResourceApiVnfinformationVnfInformation vnfInformation = generalTopologyObjectMapper.buildVnfInformation(vnf, serviceInstance, includeModelInformation); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java index 7de393bb2f..85e5b85529 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java @@ -59,11 +59,15 @@ public class VnfTopologyOperationRequestMapper { GenericResourceApiRequestActionEnumeration requestAction, GenericVnf vnf, ServiceInstance serviceInstance, Customer customer, CloudRegion cloudRegion, RequestContext requestContext, boolean homing) { String sdncReqId = UUID.randomUUID().toString(); + String msoRequestId = UUID.randomUUID().toString(); + if (requestContext != null && requestContext.getMsoRequestId() != null) { + msoRequestId = requestContext.getMsoRequestId(); + } GenericResourceApiVnfOperationInformation req = new GenericResourceApiVnfOperationInformation(); GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = generalTopologyObjectMapper .buildSdncRequestHeader(svcAction, sdncReqId); GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper - .buildGenericResourceApiRequestinformationRequestInformation(sdncReqId, requestAction); + .buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, requestAction); GenericResourceApiServiceinformationServiceInformation serviceInformation = generalTopologyObjectMapper .buildServiceInformation(serviceInstance, requestContext, customer, true); GenericResourceApiVnfinformationVnfInformation vnfInformation = generalTopologyObjectMapper @@ -84,7 +88,7 @@ public class VnfTopologyOperationRequestMapper { req.setVnfInformation(vnfInformation); GenericResourceApiParam vnfInputParameters = new GenericResourceApiParam(); - if (requestContext.getUserParams() != null) { + if (requestContext != null && requestContext.getUserParams() != null) { for (Map.Entry<String, Object> entry : requestContext.getUserParams().entrySet()) { GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam(); paramItem.setName(entry.getKey()); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java index 0ca80c75f7..302bb551c3 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/GCTopologyOperationRequestMapperTest.java @@ -75,6 +75,7 @@ public class GCTopologyOperationRequestMapperTest extends TestDataSetup { Assert.assertEquals("VLAN-NETWORK-RECEPTOR", genericInfo.getConfigurationInformation().getConfigurationType()); Assert.assertEquals("uuid",genericInfo.getSdncRequestHeader().getSvcRequestId()); Assert.assertEquals("http://localhost",genericInfo.getSdncRequestHeader().getSvcNotificationUrl()); + Assert.assertEquals("MsoRequestId",genericInfo.getRequestInformation().getRequestId()); } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java index 6a14f8b567..1bfa78ad6d 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/NetworkTopologyOperationRequestMapperTest.java @@ -23,6 +23,7 @@ package org.onap.so.client.sdnc.mapper; import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.io.IOException; @@ -109,6 +110,7 @@ public class NetworkTopologyOperationRequestMapperTest { userParams.put("key1", "value1"); requestContext.setUserParams(userParams); requestContext.setProductFamilyId("productFamilyId"); + requestContext.setMsoRequestId("MsoRequestId"); network = new L3Network(); network.setNetworkId("TEST_NETWORK_ID"); @@ -138,8 +140,24 @@ public class NetworkTopologyOperationRequestMapperTest { assertThat(networkSDNCrequest, sameBeanAs(reqMapper1).ignoring("sdncRequestHeader.svcRequestId") .ignoring("requestInformation.requestId")); + assertEquals("MsoRequestId", networkSDNCrequest.getRequestInformation().getRequestId()); } + + @Test + public void createGenericResourceApiNetworkOperationInformationReqContextNullTest() throws Exception { + RequestContext rc = new RequestContext(); + rc.setMsoRequestId(null); + GenericResourceApiNetworkOperationInformation networkSDNCrequest = mapper.reqMapper( + SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATENETWORKINSTANCE, network, serviceInstance, customer, + rc, cloudRegion); + assertNotNull(networkSDNCrequest.getRequestInformation().getRequestId()); + GenericResourceApiNetworkOperationInformation networkSDNCrequest2 = mapper.reqMapper( + SDNCSvcOperation.NETWORK_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATENETWORKINSTANCE, network, serviceInstance, customer, + null, cloudRegion); + assertNotNull(networkSDNCrequest2.getRequestInformation().getRequestId()); + } + @Test public void reqMapperTest() throws Exception { @@ -175,7 +193,8 @@ public class NetworkTopologyOperationRequestMapperTest { assertThat(reqMapperUnassign, sameBeanAs(networkSDNCrequestUnassign).ignoring("sdncRequestHeader.svcRequestId") .ignoring("requestInformation.requestId")); - + assertEquals("MsoRequestId", networkSDNCrequestUnassign.getRequestInformation().getRequestId()); + } @Test diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java index 0bf06a0bb0..1919ef437b 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapperTest.java @@ -22,6 +22,8 @@ package org.onap.so.client.sdnc.mapper; import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import java.nio.file.Files; import java.nio.file.Paths; @@ -80,10 +82,14 @@ public class ServiceTopologyOperationMapperTest { userParams.put("key1", "value1"); requestContext.setUserParams(userParams); requestContext.setProductFamilyId("productFamilyId"); + requestContext.setMsoRequestId("MsoRequestId"); GenericResourceApiServiceOperationInformation serviceOpInformation = mapper.reqMapper( SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATESERVICEINSTANCE, serviceInstance, customer, requestContext); + GenericResourceApiServiceOperationInformation serviceOpInformationNullReqContext = mapper.reqMapper( + SDNCSvcOperation.SERVICE_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, GenericResourceApiRequestActionEnumeration.CREATESERVICEINSTANCE, serviceInstance, customer, + null); String jsonToCompare = new String(Files.readAllBytes(Paths.get("src/test/resources/__files/BuildingBlocks/genericResourceApiEcompModelInformation.json"))); @@ -92,5 +98,7 @@ public class ServiceTopologyOperationMapperTest { GenericResourceApiOnapmodelinformationOnapModelInformation.class); assertThat(reqMapper1, sameBeanAs(serviceOpInformation.getServiceInformation().getOnapModelInformation())); + assertEquals("MsoRequestId", serviceOpInformation.getRequestInformation().getRequestId()); + assertNotNull(serviceOpInformationNullReqContext.getRequestInformation().getRequestId()); } } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java index 282f23caa7..7fce8c48c8 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java @@ -23,6 +23,7 @@ package org.onap.so.client.sdnc.mapper; import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.nio.file.Files; @@ -102,6 +103,7 @@ public class VfModuleTopologyOperationRequestMapperTest { RequestParameters requestParameters = new RequestParameters(); requestParameters.setUsePreload(true); requestContext.setRequestParameters(requestParameters); + requestContext.setMsoRequestId("MsoRequestId"); GenericVnf vnf = new GenericVnf(); vnf.setVnfId("testVnfId"); @@ -148,6 +150,7 @@ public class VfModuleTopologyOperationRequestMapperTest { assertThat(reqMapper1, sameBeanAs(vfModuleSDNCrequest).ignoring("sdncRequestHeader.svcRequestId") .ignoring("requestInformation.requestId")); + assertEquals("MsoRequestId", vfModuleSDNCrequest.getRequestInformation().getRequestId()); } @Test @@ -168,10 +171,13 @@ public class VfModuleTopologyOperationRequestMapperTest { VfModule vfModule = new VfModule(); vfModule.setVfModuleId("testVfModuleId"); vfModule.setVfModuleName("testVfModuleName"); + + RequestContext requestContext = new RequestContext(); + requestContext.setMsoRequestId("MsoRequestId"); GenericResourceApiVfModuleOperationInformation vfModuleSDNCrequest = mapper.reqMapper( SDNCSvcOperation.VF_MODULE_TOPOLOGY_OPERATION, SDNCSvcAction.UNASSIGN, vfModule, null, vnf, serviceInstance, null, - null, null, null); + null, requestContext, null); String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleOperationInformationUnassign.json"))); @@ -182,6 +188,35 @@ public class VfModuleTopologyOperationRequestMapperTest { assertThat(reqMapper1, sameBeanAs(vfModuleSDNCrequest).ignoring("sdncRequestHeader.svcRequestId") .ignoring("requestInformation.requestId")); + assertEquals("MsoRequestId", vfModuleSDNCrequest.getRequestInformation().getRequestId()); + } + + @Test + public void unassignGenericResourceApiVfModuleInformationNullMsoReqIdTest() throws Exception { + + // prepare and set service instance + ServiceInstance serviceInstance = new ServiceInstance(); + serviceInstance.setServiceInstanceId("serviceInstanceId"); + + // prepare and set vnf instance + + GenericVnf vnf = new GenericVnf(); + vnf.setVnfId("testVnfId"); + vnf.setVnfType("testVnfType"); + + // prepare and set vf module instance + + VfModule vfModule = new VfModule(); + vfModule.setVfModuleId("testVfModuleId"); + vfModule.setVfModuleName("testVfModuleName"); + + RequestContext requestContext = new RequestContext(); + + GenericResourceApiVfModuleOperationInformation vfModuleSDNCrequest = mapper.reqMapper( + SDNCSvcOperation.VF_MODULE_TOPOLOGY_OPERATION, SDNCSvcAction.UNASSIGN, vfModule, null, vnf, serviceInstance, null, + null, requestContext, null); + + assertNotNull(vfModuleSDNCrequest.getRequestInformation().getRequestId()); } @Test diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java index 229a8cf601..64b532fd07 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java @@ -21,6 +21,7 @@ package org.onap.so.client.sdnc.mapper; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.util.ArrayList; @@ -122,12 +123,16 @@ public class VnfTopologyOperationRequestMapperTest { userParams.put("key1", "value1"); requestContext.setUserParams(userParams); requestContext.setProductFamilyId("productFamilyId"); + requestContext.setMsoRequestId("MsoRequestId"); CloudRegion cloudRegion = new CloudRegion(); GenericResourceApiVnfOperationInformation vnfOpInformation = mapper.reqMapper( SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN,GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE, vnf, serviceInstance, customer, cloudRegion, requestContext,true); + GenericResourceApiVnfOperationInformation vnfOpInformationNullReqContext = mapper.reqMapper( + SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN,GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE, vnf, serviceInstance, customer, + cloudRegion, null,true); assertNull(vnfOpInformation.getServiceInformation().getOnapModelInformation().getModelCustomizationUuid()); assertEquals("vnfModelCustomizationUUID", vnfOpInformation.getVnfInformation().getOnapModelInformation().getModelCustomizationUuid()); @@ -136,5 +141,7 @@ public class VnfTopologyOperationRequestMapperTest { assertEquals("l3-network-ig-222", vnfOpInformation.getVnfRequestInput().getVnfNetworkInstanceGroupIds().get(1).getVnfNetworkInstanceGroupId()); assertEquals("entitlementPoolUuid", vnfOpInformation.getVnfRequestInput().getVnfInputParameters().getParam().get(1).getValue()); assertEquals("licenseKeyGroupUuid", vnfOpInformation.getVnfRequestInput().getVnfInputParameters().getParam().get(2).getValue()); + assertEquals("MsoRequestId", vnfOpInformation.getRequestInformation().getRequestId()); + assertNotNull(vnfOpInformationNullReqContext.getRequestInformation().getRequestId()); } } diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json index c4e7237511..f655e9aa13 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json @@ -64,6 +64,8 @@ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3", "paramOne": "paramOneValue", "paramTwo": "paramTwoValue", - "paramThree": "paramThreeValue" + "paramThree": "paramThreeValue", + "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }", + "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }" } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json index 0132068fe4..3387b6d87e 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json @@ -63,6 +63,8 @@ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3", "paramOne": "paramOneValue", "paramTwo": "paramTwoValue", - "paramThree": "paramThreeValue" + "paramThree": "paramThreeValue", + "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }", + "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }" } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json index 90326e33eb..8721bdc865 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json @@ -60,6 +60,8 @@ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3", "paramOne": "paramOneValue", "paramTwo": "paramTwoValue", - "paramThree": "paramThreeValue" + "paramThree": "paramThreeValue", + "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }", + "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}] }" } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json index 2f943a67bc..04f64790c4 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json @@ -62,6 +62,8 @@ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3", "paramOne": "paramOneValue", "paramTwo": "paramTwoValue", - "paramThree": "paramThreeValue" + "paramThree": "paramThreeValue", + "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId4\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }", + "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}] }" } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json index 4c50ad1187..1b57fcd33c 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json @@ -62,6 +62,8 @@ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3", "paramOne": "paramOneValue", "paramTwo": "paramTwoValue", - "paramThree": "paramThreeValue" + "paramThree": "paramThreeValue", + "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }", + "user_directives": "{}" } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json index bd06f5f86f..a13740cf80 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestTrueBackout.json @@ -63,6 +63,8 @@ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3", "paramOne": "paramOneValue", "paramTwo": "paramTwoValue", - "paramThree": "paramThreeValue" + "paramThree": "paramThreeValue", + "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }", + "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }" } } diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json index d80c739916..5468e21ee3 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json @@ -29,6 +29,8 @@ "vf_module_name": "vfModuleName", "vnf_id": "vnfId", "vnf_name": "vnfName", - "workload_context": "workloadContext" + "workload_context": "workloadContext", + "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}] }", + "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}] }" } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json index 293c6c21ed..dd8e62c0a0 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json @@ -60,6 +60,8 @@ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3", "paramOne": "paramOneValue", "paramTwo": "paramTwoValue", - "paramThree": "paramThreeValue" + "paramThree": "paramThreeValue", + "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }", + "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }" } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json index fd3b0a3d58..d44b1924cc 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json @@ -62,6 +62,8 @@ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3", "paramOne": "paramOneValue", "paramTwo": "paramTwoValue", - "paramThree": "paramThreeValue" + "paramThree": "paramThreeValue", + "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }", + "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }" } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json index dff1ccf7b0..0d103926b9 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json @@ -64,6 +64,8 @@ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3", "paramOne": "paramOneValue", "paramTwo": "paramTwoValue", - "paramThree": "paramThreeValue" + "paramThree": "paramThreeValue", + "sdnc_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_subintcount\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}, {\"attribute_name\": \"paramOne\", \"attribute_value\": \"paramOneValue\"}, {\"attribute_name\": \"vmType0_name_0\", \"attribute_value\": \"vmName0\"}, {\"attribute_name\": \"vnfNetworkRole0_v6_subnet_id\", \"attribute_value\": \"subnetId1\"}, {\"attribute_name\": \"vmType0_name_1\", \"attribute_value\": \"vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_name\", \"attribute_value\": \"netName0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_vlan_ids\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"vnfNetworkRole0_net_id\", \"attribute_value\": \"neutronId0\"}, {\"attribute_name\": \"availability_zone_0\", \"attribute_value\": \"zone0\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_1\", \"attribute_value\": \"ip3\"}, {\"attribute_name\": \"availability_zone_1\", \"attribute_value\": \"zone1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"availability_zone_2\", \"attribute_value\": \"zone2\"}, {\"attribute_name\": \"vmType0_names\", \"attribute_value\": \"vmName0,vmName1\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_route_prefixes\", \"attribute_value\": \"[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ip_0\", \"attribute_value\": \"ip2\"}, {\"attribute_name\": \"vnfNetworkRole0_subnet_id\", \"attribute_value\": \"subnetId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_1\", \"attribute_value\": \"ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vnfNetworkRole0_net_fqdn\", \"attribute_value\": \"netFqdnValue0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip_0\", \"attribute_value\": \"ip0\"}, {\"attribute_name\": \"vmNetworkRole0_ATT_VF_VLAN_FILTER\", \"attribute_value\": \"heatVlanFilter0,heatVlanFilter1\"}, {\"attribute_name\": \"paramTwo\", \"attribute_value\": \"paramTwoValue\"}, {\"attribute_name\": \"paramThree\", \"attribute_value\": \"paramThreeValue\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_v6_ips\", \"attribute_value\": \"ip2,ip3\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_floating_v6_ip\", \"attribute_value\": \"floatingIpV60\"}, {\"attribute_name\": \"vmType0_vmNetworkRole0_ips\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_names\", \"attribute_value\": \"1\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_net_ids\", \"attribute_value\": \"networkId0\"}, {\"attribute_name\": \"fw_0_subint_ctrl_port_0_v6_ip\", \"attribute_value\": \"ip0,ip1\"}, {\"attribute_name\": \"fw_subint_ctrl_port_0_floating_ip\", \"attribute_value\": \"floatingIpV40\"}] }", + "user_directives": "{ \"attributes\": [ {\"attribute_name\": \"key1\", \"attribute_value\": \"value2\"}] }" } -}
\ No newline at end of file +} |