'Attempt to retrieve node UUID from the metadata in a config drive or
from the metadata service.
Fall back to finging the ``ACTIVE`` Nova API server with an
intersection of the IPv4 and IPv6 addresses on this node.'

def compute_instance_id(self):

    metadata_checkers = [(lambda : metadata_from_config_drive(config_drive_label=self._config_drive_label)), (lambda : metadata_from_service(metadata_service_endpoint=self._metadata_service_endpoint))]
    for checker in metadata_checkers:
        metadata = checker()
        if metadata:
            return metadata['uuid']
    try:
        result = self._compute_instance_id_by_ipaddress_match()
    except:
        writeTraceback()
    else:
        return result
    raise UnknownInstanceID(self)
