Skip to content

Commit

Permalink
support domU dns names
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Krieger committed Apr 25, 2012
1 parent 3894796 commit 9a0c32b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/ec2who
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_instances_for_query(ec2_conn, query):
filters["ip-address"] = args.query

# dns
if re.match(r"^(ip|ec2)-", args.query):
if re.match(r"^(ip|ec2|domU)-", args.query):
dns = args.query

pairs = [("ec2", ".compute-1.amazonaws.com"), ("ip", ".ec2.internal")]
Expand All @@ -32,7 +32,7 @@ def get_instances_for_query(ec2_conn, query):
dns += ".*"
break

key = "private-dns-name" if dns.startswith("ip") else "dns-name"
key = "private-dns-name" if (dns.startswith("ip") or dns.startswith("domU")) else "dns-name"
filters[key] = dns

# instance name
Expand Down

0 comments on commit 9a0c32b

Please sign in to comment.