Skip to content

Commit

Permalink
Merge pull request #3 from mikeyk/master
Browse files Browse the repository at this point in the history
domUUUU
  • Loading branch information
shayne committed Apr 25, 2012
2 parents 3894796 + 28d7ed6 commit 2088c94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions bin/ec2who
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ 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")]
pairs = [("ec2", ".compute-1.amazonaws.com"), ("ip", ".ec2.internal"), ("domU", ".ec2.internal")]
for sw, ew in pairs:
if dns.startswith(sw) and not dns.endswith(ew):
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
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@

setup(
name = "ec2-cli-tools",
version = "1.1",
author = "Shayne Sweeney & Tyler Smalley",
version = "1.2",
author = "Shayne Sweeney & Tyler Smalley & Mike Krieger",
author_email = "team@flippath.com",
description = "Helpful CLI utilities for querying and connecting to EC2 instances",
long_description = __doc__,
Expand Down

0 comments on commit 2088c94

Please sign in to comment.