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.
4095 4096 4097 |
# File 'lib/ovirtsdk4/services.rb', line 4095 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.
4129 4130 4131 |
# File 'lib/ovirtsdk4/services.rb', line 4129 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 |
# File 'lib/ovirtsdk4/services.rb', line 4151 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.
4140 4141 4142 |
# File 'lib/ovirtsdk4/services.rb', line 4140 def storage_domain_service(id) AttachedStorageDomainService.new(self, id) end |