def instances(self, filter={}):

        # Parse filter argument
        if "id" in filter:
            return [self.instance(filter["id"])]

        instance_list_xml = self._request("/compute")
        instances_xml = instance_list_xml.getElementsByTagName("COMPUTE")
        instances = []
        for instance_xml in instances_xml:
            href = instance_xml.getAttribute("href")
            id = _id_from_url(href)
            instance = self.instance(id)
            if instance is not None and \
               ("state" not in filter or instance.state is filter["state"]):
                instances.append(instance)
        return instances
Internally strings are utf8 encoded.
dataset/ETHPy150Open bmbouter/Opus/opus/lib/prov/drivers/opennebula14.py/OpenNebula14Driver.instances--crossover with--dataset/ETHPy150Open google/grr/grr/lib/rdfvalues/structs.py/ProtoString.ConvertToWireFormat