Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions hyperpod_public_subnet/hyperpod_public_subnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ def _describe_network_interfaces_all(ec2_client):

eni_table = {}
enis = _describe_network_interfaces_all(ec2_client)
# ENIs description contain the cluster ID, so check for the value
# current format is accountid_clusterid_<unique-code>
for eni in enis:
if eni["Description"].startswith(Config.hyperpod_cluster_arn):
if Config.cluster_id in eni["Description"]:

num_secondary_addr = 0
for private_addr in eni["PrivateIpAddresses"]:
Expand All @@ -85,7 +87,7 @@ def list_eips(ec2_client):
if "Tags" in eip:
tags = tags_as_dict(eip["Tags"])
if "HyperPodEni" in tags:
if tags["HyperPodEni"].startswith(Config.hyperpod_cluster_arn):
if Config.cluster_id in eni["Description"]:
eip_table[ tags["HyperPodEni"] ] = eip

return eip_table
Expand Down