Skip to content

Commit

Permalink
support overlay IP
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Shortway committed Oct 24, 2013
1 parent 43f7938 commit e1c6734
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions bin/ec2who
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/Users/nshortway/pyenv/bin/python

import argparse
import sys
Expand All @@ -19,6 +19,8 @@ def get_instances_for_query(ec2_conn, query):
if re.match(r"^[\d.]+", args.query):
if re.match(r"^10\.", args.query):
filters["private-ip-address"] = args.query
elif re.match(r"^192\.", args.query):
filters["tag:overlay_ip"] = args.query
else:
filters["ip-address"] = args.query

Expand Down Expand Up @@ -53,7 +55,8 @@ def print_instance_info(instance):
instance.id,
instance.placement,
instance.private_ip_address,
public_interface.strip()])
public_interface.strip(),
instance.tags.get("overlay_ip", "(None)")])


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -86,7 +86,7 @@

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

0 comments on commit e1c6734

Please sign in to comment.