

def __get_instance_info(self, instances, status, keyname):
    ' Filter out a list of instances by instance status and keyname.\n\n    Args:\n      instances: A list of instances as returned by describe_instances.\n      status: Status of the VMs (eg: running, terminated).\n      keyname: Keyname used to spawn instances.\n    Returns:\n      A tuple of the form (public ips, private ips, instance ids).\n    '
    instance_ids = []
    public_ips = []
    private_ips = []
    for i in instances:
        if ((i.state == status) and (i.key_name == keyname)):
            instance_ids.append(keyname.id)
            public_ips.append(i.public_dns_name)
            private_ips.append(i.private_dns_name)
    return (public_ips, private_ips, instance_ids)

dataset/ETHPy150Open AppScale/appscale-tools/lib/agents/ec2_agent.py EC2Agent.__get_instance_info/VarMisuse@65/207 `i`->`keyname`