Sha256: 8b0c4969c340060fbb49bf1a70243a5b226d0d6e5cc153dd5b389e9d681bedb8

Contents?: true

Size: 650 Bytes

Versions: 34

Compression:

Stored size: 650 Bytes

Contents

module OVIRT
  class Client
    def storagedomain(sd_id)
      sd = http_get("/storagedomains/%s" % sd_id)
      OVIRT::StorageDomain::new(self, sd.root)
    end

    def storagedomains(opts={})
      path = "/storagedomains"
      path += search_url(opts) unless filtered_api
      http_get(path).xpath('/storage_domains/storage_domain').collect do |sd|
        storage_domain = OVIRT::StorageDomain::new(self, sd)
        #filter by role is not supported by the search language. The work around is to list all, then filter.
        (opts[:role].nil? || storage_domain.role == opts[:role]) ? storage_domain : nil
      end.compact
    end
  end
end

Version data entries

34 entries across 32 versions & 2 rubygems

Version Path
rbovirt-0.1.7 lib/client/storage_domain_api.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/rbovirt-0.1.6/lib/client/storage_domain_api.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/rbovirt-0.1.6/lib/client/storage_domain_api.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/rbovirt-0.1.6/lib/client/storage_domain_api.rb
rbovirt-0.1.6 lib/client/storage_domain_api.rb
rbovirt-0.1.5 lib/client/storage_domain_api.rb
rbovirt-0.1.4 lib/client/storage_domain_api.rb
rbovirt-0.1.3 lib/client/storage_domain_api.rb
rbovirt-0.1.2 lib/client/storage_domain_api.rb
rbovirt-0.0.38 lib/client/storage_domain_api.rb
rbovirt-0.1.1 lib/client/storage_domain_api.rb
rbovirt-0.0.37 lib/client/storage_domain_api.rb
rbovirt-0.0.36 lib/client/storage_domain_api.rb
rbovirt-0.1.0 lib/client/storage_domain_api.rb
rbovirt-0.0.35 lib/client/storage_domain_api.rb
rbovirt-0.0.34 lib/client/storage_domain_api.rb
rbovirt-0.0.33 lib/client/storage_domain_api.rb
rbovirt-0.0.32 lib/client/storage_domain_api.rb
rbovirt-0.0.31 lib/client/storage_domain_api.rb
rbovirt-0.0.30 lib/client/storage_domain_api.rb