    # File lib/fog/libvirt/requests/compute/list_domains.rb, line 5
            def list_domains(filter = { })
              data=[]

              if filter.has_key?(:uuid)
                data << client.lookup_domain_by_uuid(filter[:uuid])
              elsif filter.has_key?(:name)
                data << client.lookup_domain_by_name(filter[:name])
              else
                client.list_defined_domains.each { |name| data << client.lookup_domain_by_name(name) } unless filter[:defined] == false
                client.list_domains.each { |id| data << client.lookup_domain_by_id(id) } unless filter[:active] == false
              end
              data.compact.map { |d| domain_to_attributes d }
            end