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
.
30081 30082 30083 |
# File 'lib/ovirtsdk4/services.rb', line 30081 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.
30115 30116 30117 |
# File 'lib/ovirtsdk4/services.rb', line 30115 def list(opts = {}) internal_get(LIST, opts) end |
#network_service(id) ⇒ VirtualFunctionAllowedNetworkService
Locates the network
service.
30126 30127 30128 |
# File 'lib/ovirtsdk4/services.rb', line 30126 def network_service(id) VirtualFunctionAllowedNetworkService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
30137 30138 30139 30140 30141 30142 30143 30144 30145 30146 |
# File 'lib/ovirtsdk4/services.rb', line 30137 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 |