def validate_networks(self, context, networks):
        LOG.debug('Validate networks')
        if networks is None or len(networks) == 0:
            return

        for network_uuid, address in networks:
            # check if the fixed IP address is valid and
            # it actually belongs to the network
            if address is not None:
                if not netutils.is_valid_ip(address):
                    raise exception.FixedIpInvalid(address=address)

                fixed_ip_ref = objects.FixedIP.get_by_address(
                    context, address, expected_attrs=['network'])
                network = fixed_ip_ref.network
                if network.uuid != network_uuid:
                    raise exception.FixedIpNotFoundForNetwork(
                        address=address, network_uuid=network_uuid)
                if fixed_ip_ref.instance_uuid is not None:
                    raise exception.FixedIpAlreadyInUse(
                        address=address,
                        instance_uuid=fixed_ip_ref.instance_uuid)
Gather options which take a value.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/network/manager.py/NetworkManager.validate_networks--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/python/usage.py/Options._gather_parameters