Skip to content
Snippets Groups Projects
Commit 869c3ea1 authored by baldwinlouie's avatar baldwinlouie Committed by Yas Naoi
Browse files

Issue #3283856 by baldwinlouie, yas: Fix an issue that AWS Cloud key pair name...

Issue #3283856 by baldwinlouie, yas: Fix an issue that AWS Cloud key pair name is not set during instance import
parent bdb36473
No related branches found
No related tags found
No related merge requests found
......@@ -205,6 +205,9 @@ class Ec2BatchOperations {
$entity->setPrivateDns($instance['PrivateDnsName']);
}
if (!empty($instance['KeyName'])) {
$entity->setKeyPairName($instance['KeyName']);
}
$entity->setPublicIp($public_ip);
$entity->setSecurityGroups(implode(', ', $security_groups));
$entity->setInstanceType($instance['InstanceType']);
......@@ -266,6 +269,7 @@ class Ec2BatchOperations {
'cost' => $cost,
'block_devices' => implode(', ', $block_devices),
'low_utilization' => $low_utilization,
'key_pair_name' => !empty($instance['KeyName']) ? $instance['KeyName'] : NULL,
]);
if ($private_ips !== FALSE) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment