Class: OvirtSDK4::VirtualFunctionAllowedNetworksService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(network, opts = {}) ⇒ Network
Adds a new
network
. -
#list(opts = {}) ⇒ Array<Network>
Returns the list of networks.
-
#network_service(id) ⇒ VirtualFunctionAllowedNetworkService
Locates the
network
service. -
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(network, opts = {}) ⇒ Network
Adds a new network
.
27631 27632 27633 |
# File 'lib/ovirtsdk4/services.rb', line 27631 def add(network, opts = {}) internal_add(network, Network, ADD, opts) end |
#list(opts = {}) ⇒ Array<Network>
Returns the list of networks.
The order of the returned list of networks isn’t guaranteed.
27665 27666 27667 |
# File 'lib/ovirtsdk4/services.rb', line 27665 def list(opts = {}) internal_get(LIST, opts) end |
#network_service(id) ⇒ VirtualFunctionAllowedNetworkService
Locates the network
service.
27676 27677 27678 |
# File 'lib/ovirtsdk4/services.rb', line 27676 def network_service(id) VirtualFunctionAllowedNetworkService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
27687 27688 27689 27690 27691 27692 27693 27694 27695 27696 |
# File 'lib/ovirtsdk4/services.rb', line 27687 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return network_service(path) end return network_service(path[0..(index - 1)]).service(path[(index +1)..-1]) end |