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
.
29700 29701 29702 |
# File 'lib/ovirtsdk4/services.rb', line 29700 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.
29734 29735 29736 |
# File 'lib/ovirtsdk4/services.rb', line 29734 def list(opts = {}) internal_get(LIST, opts) end |
#network_service(id) ⇒ VirtualFunctionAllowedNetworkService
Locates the network
service.
29745 29746 29747 |
# File 'lib/ovirtsdk4/services.rb', line 29745 def network_service(id) VirtualFunctionAllowedNetworkService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
29756 29757 29758 29759 29760 29761 29762 29763 29764 29765 |
# File 'lib/ovirtsdk4/services.rb', line 29756 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 |