

@staticmethod
def check_ip_address(address, must_exist=True):
    ip_to_check = getattr(address, 'ip', address)

    def _check_addr(resource):
        for (network, addr_list) in resource.addresses.items():
            for addr in addr_list:
                if (ip_to_check == addr['addr']):
                    return must_exist
        return (not must_exist)
    return _check_addr

dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/scenarios/nova/utils.py NovaScenario.check_ip_address/original