Class: OvirtSDK4::InstanceTypeNicsService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(nic, opts = {}) ⇒ Nic
Add new network interface to the instance type.
-
#list(opts = {}) ⇒ Array<Nic>
Lists all the configured network interface of the instance type.
-
#nic_service(id) ⇒ InstanceTypeNicService
Locates the
nic
service. -
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(nic, opts = {}) ⇒ Nic
Add new network interface to the instance type.
14068 14069 14070 |
# File 'lib/ovirtsdk4/services.rb', line 14068 def add(nic, opts = {}) internal_add(nic, Nic, ADD, opts) end |
#list(opts = {}) ⇒ Array<Nic>
Lists all the configured network interface of the instance type.
The order of the returned list of network interfaces isn’t guaranteed.
14105 14106 14107 |
# File 'lib/ovirtsdk4/services.rb', line 14105 def list(opts = {}) internal_get(LIST, opts) end |
#nic_service(id) ⇒ InstanceTypeNicService
Locates the nic
service.
14116 14117 14118 |
# File 'lib/ovirtsdk4/services.rb', line 14116 def nic_service(id) InstanceTypeNicService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 |
# File 'lib/ovirtsdk4/services.rb', line 14127 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return nic_service(path) end return nic_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |