Class: Infoblox::Search
- Defined in:
- lib/infoblox/resource/search.rb
Instance Attribute Summary
Attributes inherited from Resource
Class Method Summary collapse
-
.find(connection, params) ⇒ Object
does not return objects not implemented in this library.
Methods inherited from Resource
_return_fields, all, default_params, #delete, #get, #initialize, #post, #put, remote_attr_accessor, remote_attr_reader, remote_attr_writer, #remote_attribute_hash, remote_attrs, remote_post_accessor, remote_post_attrs, remote_read_only_attrs, remote_write_only_attrs, resource_map, resource_uri, #resource_uri, wapi_object
Constructor Details
This class inherits a constructor from Infoblox::Resource
Class Method Details
.find(connection, params) ⇒ Object
does not return objects not implemented in this library
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/infoblox/resource/search.rb', line 6 def self.find(connection, params) JSON.parse(connection.get(resource_uri,params).body).map do |jobj| klass = resource_map[jobj["_ref"].split("/").first] if klass.nil? puts jobj['_ref'] warn "umapped resource: #{jobj["_ref"]}" else klass.new(jobj.merge({:connection => connection})) end end.compact end |