From 4bfb522020d86474902a4e137cfc50e30c62cb85 Mon Sep 17 00:00:00 2001 From: igartley Date: Tue, 22 Mar 2016 18:11:20 -0400 Subject: [PATCH] Add ip-address and private-ip-address to the list of filters for instance filtering. These are described in http://boto3.readthedocs.org/en/latest/reference/services/ec2.html#EC2.Client.describe_instances and map to the instance methods of public_ip() and private_ip() respectively --- moto/ec2/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/moto/ec2/utils.py b/moto/ec2/utils.py index 5b05cafa0..7ee924bb3 100644 --- a/moto/ec2/utils.py +++ b/moto/ec2/utils.py @@ -360,7 +360,9 @@ filter_dict_attribute_mapping = { 'vpc-id': 'vpc_id', 'group-id': 'security_groups', 'instance.group-id': 'security_groups', - 'instance-type': 'instance_type' + 'instance-type': 'instance_type', + 'private-ip-address' : 'private_ip', + 'ip-address' : 'public_ip' }