diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-09-17 11:14:35 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-09-17 12:01:30 -0400 |
commit | 08c27a288e961c1ffd4151384ef0f609bb855e10 (patch) | |
tree | 5a139d4624226dcf543e14afeef284dec352be70 /adapters/mso-openstack-adapters/src/main | |
parent | 184e1ed3e83effc39b6f7f92c9f4b9d874c4cfe7 (diff) |
more stability fixes
Remove conditional to not check VNF topology
add empty string verification for serviceName field
Add junits for CNRCR and NtwkAdptr changes.
Add search in new CollNtwkResCust tbl to get NtwkResource.
- Updated test data files to include 'pre-load' flag in both
VfModuleOperation and NetworkOperation json test data files.
- MSO to not to send <preload>boolean</from-preload> to SDNC in
network-topology-opertion and vf-module-topology-operation. Updated
GeneralTopologyObjectMapper to set 'from-preload' to null so that
elements with Nulls are not sent to SDNC. Updated
buildNetworkInformation() and buildVfModuleInformation() methods.
update flow stats to not cause bpmn flow to crash
Fix headers so SDNC does not return XML
Add implementation of deleteVolumeGroupResponse parsing; fix JUnits
that worked by accident.
Change-Id: Ia96d552d731e112505fcf739029a6fd4d0134546
Issue-ID: SO-1061
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main')
-rw-r--r-- | adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java index ac33a5269e..4b6bd09144 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java @@ -42,6 +42,8 @@ import org.onap.so.db.catalog.beans.CloudSite; import org.onap.so.db.catalog.beans.HeatTemplate; import org.onap.so.db.catalog.beans.NetworkResource; import org.onap.so.db.catalog.beans.NetworkResourceCustomization; +import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization; +import org.onap.so.db.catalog.data.repository.CollectionNetworkResourceCustomizationRepository; import org.onap.so.db.catalog.data.repository.NetworkResourceCustomizationRepository; import org.onap.so.db.catalog.data.repository.NetworkResourceRepository; import org.onap.so.db.catalog.utils.MavenLikeVersioning; @@ -108,6 +110,9 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { private NetworkResourceCustomizationRepository networkCustomRepo; @Autowired + private CollectionNetworkResourceCustomizationRepository collectionNetworkCustomRepo; + + @Autowired private NetworkResourceRepository networkResourceRepo; /** * Health Check web method. Does nothing but return to show the adapter is deployed. @@ -1124,18 +1129,26 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { // Retrieve the Network Resource definition NetworkResource networkResource = null; NetworkResourceCustomization networkCust = null; + CollectionNetworkResourceCustomization collectionNetworkCust = null; if (commonUtils.isNullOrEmpty(modelCustomizationUuid)) { if (!commonUtils.isNullOrEmpty(networkType)) { - networkResource = networkResourceRepo.findOneByModelName(networkType); + networkResource = networkResourceRepo.findFirstByModelNameOrderByModelVersionDesc(networkType); } } else { networkCust = networkCustomRepo.findOneByModelCustomizationUUID(modelCustomizationUuid); + if (networkCust == null) { + collectionNetworkCust = collectionNetworkCustomRepo.findOneByModelCustomizationUUID(modelCustomizationUuid); + } } if(networkCust != null){ LOGGER.debug("Got Network Customization definition from Catalog: " + networkCust.toString()); networkResource = networkCust.getNetworkResource(); + } else if (collectionNetworkCust != null) { + LOGGER.debug("Retrieved Collection Network Resource Customization from Catalog: " + + collectionNetworkCust.toString()); + networkResource = collectionNetworkCust.getNetworkResource(); } if (networkResource == null) { String error = "Create/UpdateNetwork: Unable to get network resource with NetworkType:" |