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>
.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);
}
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);