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.
3528 3529 3530 |
# File 'lib/ovirtsdk4/services.rb', line 3528 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.
3562 3563 3564 |
# File 'lib/ovirtsdk4/services.rb', line 3562 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 |
# File 'lib/ovirtsdk4/services.rb', line 3584 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.
3573 3574 3575 |
# File 'lib/ovirtsdk4/services.rb', line 3573 def storage_domain_service(id) AttachedStorageDomainService.new(self, id) end |