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
.
28000 28001 28002 |
# File 'lib/ovirtsdk4/services.rb', line 28000 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.
28034 28035 28036 |
# File 'lib/ovirtsdk4/services.rb', line 28034 def list(opts = {}) internal_get(LIST, opts) end |
#network_service(id) ⇒ VirtualFunctionAllowedNetworkService
Locates the network
service.
28045 28046 28047 |
# File 'lib/ovirtsdk4/services.rb', line 28045 def network_service(id) VirtualFunctionAllowedNetworkService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
28056 28057 28058 28059 28060 28061 28062 28063 28064 28065 |
# File 'lib/ovirtsdk4/services.rb', line 28056 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 |