diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-04-02 22:54:57 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-04-02 22:54:57 -0400 |
commit | 86f04e1d55b54a1a23bb274d211c6fca85980fef (patch) | |
tree | e8fb0a8c1d5e64761068df56faa8a8e509fa2f48 /adapters/mso-openstack-adapters/src/main/java/org | |
parent | d59fc0ad5db7b7cacf5996f86db34f41090061fa (diff) |
fix catalogdb cvfnc customization
Hibernate entities were all wrong and needed
a complete rewrite.
The scope kept growing and ended up touching a
lot more of the code than originally planned.
These changes make the db interactions much easier
and more straightforward from java.
The flyway script order had to change to make this
migration possible.
Change-Id: I6ce363a385661300eddb11923ac6a80538edaddc
Issue-ID: SO-1710
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main/java/org')
4 files changed, 4 insertions, 5 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 2e8c7990db..73e7143ae3 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 @@ -1315,7 +1315,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { networkResource = nrc.getNetworkResource(); } } - String mode = ""; if (networkResource != null) { logger.debug("Got Network definition from Catalog: {}", networkResource.toString()); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java index b99e34eb9d..6e9656a213 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java @@ -876,7 +876,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { logger.debug("version: {}", vfVersion); if (useMCUuid) { // 1707 - db refactoring - vfmc = vfModuleCustomRepo.findByModelCustomizationUUID(mcu); + vfmc = vfModuleCustomRepo.findFirstByModelCustomizationUUIDOrderByCreatedDesc(mcu); if(vfmc != null) vf=vfmc.getVfModule(); else @@ -1638,7 +1638,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { VfModule vf = null; VfModuleCustomization vfmc = null; if (useMCUuid){ - vfmc = vfModuleCustomRepo.findByModelCustomizationUUID(modelCustomizationUuid); + vfmc = vfModuleCustomRepo.findFirstByModelCustomizationUUIDOrderByCreatedDesc(modelCustomizationUuid); vf = vfmc != null ? vfmc.getVfModule() : null; if (vf == null) { logger.debug("Unable to find a vfModule matching modelCustomizationUuid={}", mcu); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java index a07fff024b..dc695615cb 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java @@ -640,7 +640,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter { VfModuleCustomization vfmc = null; try { - vfmc = vfModuleCustomRepo.findByModelCustomizationUUID(modelCustomizationUuid); + vfmc = vfModuleCustomRepo.findFirstByModelCustomizationUUIDOrderByCreatedDesc(modelCustomizationUuid); if (vfmc == null) { String error = "Create vfModule error: Unable to find vfModuleCust with modelCustomizationUuid=" diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java index 0dad10b5cc..584c934843 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java @@ -681,7 +681,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter { VfModuleCustomization vfModuleCust = null; try { - vfModuleCust = vfModuleCustomRepo.findByModelCustomizationUUID(modelCustomizationUuid); + vfModuleCust = vfModuleCustomRepo.findFirstByModelCustomizationUUIDOrderByCreatedDesc(modelCustomizationUuid); if (vfModuleCust == null) { String error = "Create vfModule error: Unable to find vfModuleCust with modelCustomizationUuid=" |