Class: OvirtSDK4::NicNetworkFilterParametersService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(parameter, opts = {}) ⇒ NetworkFilterParameter
Add a network filter parameter.
-
#list(opts = {}) ⇒ Array<NetworkFilterParameter>
Retrieves the representations of the network filter parameters.
-
#parameter_service(id) ⇒ NicNetworkFilterParameterService
Reference to the service that manages a specific network filter parameter.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(parameter, opts = {}) ⇒ NetworkFilterParameter
Add a network filter parameter.
For example, to add the parameter for the network filter on NIC 456 of
virtual machine 789 send a request like this:
POST /ovirt-engine/api/vms/789/nics/456/networkfilterparameters HTTP/1.1
With a request body like this:
<network_filter_parameter>
<name>IP</name>
<value>10.0.1.2</value>
</network_filter_parameter>
16704 16705 16706 |
# File 'lib/ovirtsdk4/services.rb', line 16704 def add(parameter, opts = {}) internal_add(parameter, NetworkFilterParameter, ADD, opts) end |
#list(opts = {}) ⇒ Array<NetworkFilterParameter>
Retrieves the representations of the network filter parameters.
The order of the returned list of network filters isn’t guaranteed.
16735 16736 16737 |
# File 'lib/ovirtsdk4/services.rb', line 16735 def list(opts = {}) internal_get(LIST, opts) end |
#parameter_service(id) ⇒ NicNetworkFilterParameterService
Reference to the service that manages a specific network filter parameter.
16746 16747 16748 |
# File 'lib/ovirtsdk4/services.rb', line 16746 def parameter_service(id) NicNetworkFilterParameterService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
16757 16758 16759 16760 16761 16762 16763 16764 16765 16766 |
# File 'lib/ovirtsdk4/services.rb', line 16757 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return parameter_service(path) end return parameter_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |