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.
4077 4078 4079 |
# File 'lib/ovirtsdk4/services.rb', line 4077 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.
4111 4112 4113 |
# File 'lib/ovirtsdk4/services.rb', line 4111 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 |
# File 'lib/ovirtsdk4/services.rb', line 4133 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.
4122 4123 4124 |
# File 'lib/ovirtsdk4/services.rb', line 4122 def storage_domain_service(id) AttachedStorageDomainService.new(self, id) end |