Class: OvirtSDK4::AttachedStorageDomainsService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(storage_domain, opts = {}) ⇒ StorageDomain
Attaches an existing storage domain to the data center.
-
#list(opts = {}) ⇒ Array<StorageDomain>
Returns the list of storage domains attached to the data center.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#storage_domain_service(id) ⇒ AttachedStorageDomainService
Locates the
storage_domainservice.
Methods inherited from Service
Instance Method Details
#add(storage_domain, opts = {}) ⇒ StorageDomain
Attaches an existing storage domain to the data center.
4072 4073 4074 |
# File 'lib/ovirtsdk4/services.rb', line 4072 def add(storage_domain, opts = {}) internal_add(storage_domain, StorageDomain, ADD, opts) end |
#list(opts = {}) ⇒ Array<StorageDomain>
Returns the list of storage domains attached to the data center.
The order of the returned storage domains isn’t guaranteed.
4106 4107 4108 |
# File 'lib/ovirtsdk4/services.rb', line 4106 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 |
# File 'lib/ovirtsdk4/services.rb', line 4128 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return storage_domain_service(path) end return storage_domain_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |
#storage_domain_service(id) ⇒ AttachedStorageDomainService
Locates the storage_domain service.
4117 4118 4119 |
# File 'lib/ovirtsdk4/services.rb', line 4117 def storage_domain_service(id) AttachedStorageDomainService.new(self, id) end |