mirror of
https://github.com/krkn-chaos/krkn.git
synced 2026-02-14 18:10:00 +00:00
Adding aws bare metal (#695)
* adding aws bare metal rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED * no found reservations rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED --------- Co-authored-by: Auto User <auto@users.noreply.github.com>
This commit is contained in:
@@ -13,7 +13,11 @@ class AWS:
|
||||
|
||||
# Get the instance ID of the node
|
||||
def get_instance_id(self, node):
|
||||
return self.boto_client.describe_instances(Filters=[{"Name": "private-dns-name", "Values": [node]}])[
|
||||
instance = self.boto_client.describe_instances(Filters=[{"Name": "private-dns-name", "Values": [node]}])
|
||||
if len(instance['Reservations']) == 0:
|
||||
node = node[3:].replace('-','.')
|
||||
instance = self.boto_client.describe_instances(Filters=[{"Name": "private-ip-address", "Values": [node]}])
|
||||
return instance[
|
||||
"Reservations"
|
||||
][0]["Instances"][0]["InstanceId"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user