Class: OvirtSDK4::NetworkFiltersService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::NetworkFiltersService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (Array<NetworkFilter>) list(opts = {})
Retrieves the representations of the network filters.
-
- (NetworkFilterService) network_filter_service(id)
Locates the
network_filter
service. -
- (Service) service(path)
Locates the service corresponding to the given path.
-
- (String) to_s
Returns an string representation of this service.
Instance Method Details
- (Array<NetworkFilter>) list(opts = {})
Retrieves the representations of the network filters.
12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 |
# File 'lib/ovirtsdk4/services.rb', line 12809 def list(opts = {}) query = {} request = Request.new(:method => :GET, :path => @path, :query => query) response = @connection.send(request) case response.code when 200 begin reader = XmlReader.new(response.body) return NetworkFilterReader.read_many(reader) ensure reader.close end else check_fault(response) end end |
- (NetworkFilterService) network_filter_service(id)
Locates the network_filter
service.
12833 12834 12835 |
# File 'lib/ovirtsdk4/services.rb', line 12833 def network_filter_service(id) return NetworkFilterService.new(@connection, "#{@path}/#{id}") end |
- (Service) service(path)
Locates the service corresponding to the given path.
12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 |
# File 'lib/ovirtsdk4/services.rb', line 12844 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return network_filter_service(path) end return network_filter_service(path[0..(index - 1)]).service(path[(index +1)..-1]) end |
- (String) to_s
Returns an string representation of this service.
12860 12861 12862 |
# File 'lib/ovirtsdk4/services.rb', line 12860 def to_s return "#<#{NetworkFiltersService}:#{@path}>" end |