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_domain
service.
Methods inherited from Service
Instance Method Details
#add(storage_domain, opts = {}) ⇒ StorageDomain
Attaches an existing storage domain to the data center.
3513 3514 3515 |
# File 'lib/ovirtsdk4/services.rb', line 3513 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.
3547 3548 3549 |
# File 'lib/ovirtsdk4/services.rb', line 3547 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 |
# File 'lib/ovirtsdk4/services.rb', line 3569 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.
3558 3559 3560 |
# File 'lib/ovirtsdk4/services.rb', line 3558 def storage_domain_service(id) AttachedStorageDomainService.new(self, id) end |