Updated to use the logicalResourceId 42/89542/1
authorPlummer, Brittany <brittany.plummer@att.com>
Thu, 6 Jun 2019 19:51:46 +0000 (15:51 -0400)
committerBenjamin, Max (mb388a) <mb388a@us.att.com>
Thu, 6 Jun 2019 19:51:57 +0000 (15:51 -0400)
Updated to use the logicalResourceId instead of physicalResourceId

Change-Id: I2ebc800cf7ce4b5794bece7c304ebd7d1ac92088
Issue-ID: SO-1979
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java

index bf6374b..350f14c 100644 (file)
@@ -401,7 +401,7 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin {
                 .filter(p -> "OS::Nova::KeyPair".equalsIgnoreCase(p.getType())).collect(Collectors.toList());
         keyPairs.stream().forEach(keyPair -> {
             try {
-                novaClient.deleteKeyPair(cloudSiteId, tenantId, keyPair.getPhysicalResourceId());
+                novaClient.deleteKeyPair(cloudSiteId, tenantId, keyPair.getLogicalResourceId());
             } catch (MsoCloudSiteNotFound | NovaClientException e) {
                 logger.warn("Could not delete keypair", e);
             }
index 5a2515a..c2edd9c 100644 (file)
@@ -300,7 +300,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils {
         List<Resource> resources = new ArrayList<>();
         Resource resource = new Resource();
         resource.setName("KeypairName");
-        resource.setPhysicalResourceId("KeypairName");
+        resource.setLogicalResourceId("KeypairName");
         resource.setType("OS::Nova::KeyPair");
         resources.add(resource);