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