Class: OMF::SFA::Resource::Ip
- Extended by:
- Base::ClassMethods
- Includes:
- Base::InstanceMethods
- Defined in:
- lib/omf-sfa/resource/ip.rb
Instance Method Summary collapse
-
#_to_sfa_property_xml(pname, value, res_el, pdef, obj2id, opts) ⇒ Object
override xml serialization of “ip_type” to “type”.
-
#to_hash(objs = {}, opts = {}) ⇒ Object
end.
- #to_hash_brief(opts = {}) ⇒ Object
Methods included from Base::ClassMethods
_sfa_add_ns, _sfa_prefix_for_namespace, _to_sfa_xml, default_component_manager_id, default_domain, descendants, from_sfa, sfa, sfa_add_namespace, sfa_add_namespaces_to_document, sfa_cast_property_value, sfa_class, sfa_def_for, sfa_defs, sfa_suppress_id, sfa_suppress_id?, sfa_suppress_uuid, sfa_suppress_uuid?, to_rspec
Methods included from Base::InstanceMethods
#_to_sfa_property_hash, #_to_sfa_xml, #_xml_name, #component_id, #component_manager_id, #default_domain, #from_sfa, #resource_type, #sfa_class, #sfa_id, #sfa_property, #to_sfa_hash, #to_sfa_hash_short, #to_sfa_short_xml, #to_sfa_xml
Methods inherited from OResource
#_dirty_self?, #_oprops_to_hash, #all_resources, #clone, #default_href_prefix, #destroy, #destroy!, #dirty_self?, #each_resource, #group?, #href, href_resolver, init, json_create, #oproperties_as_hash, #oproperty, oproperty, #oproperty_array_get, #oproperty_get, #oproperty_set, prop_all, #remove_from_all_groups, #resource_type, #status, #to_hash_long, #to_json, #uuid
Instance Method Details
#_to_sfa_property_xml(pname, value, res_el, pdef, obj2id, opts) ⇒ Object
override xml serialization of “ip_type” to “type”
22 23 24 25 26 27 28 |
# File 'lib/omf-sfa/resource/ip.rb', line 22 def _to_sfa_property_xml(pname, value, res_el, pdef, obj2id, opts) if pname == 'ip_type' res_el.set_attribute('type', value.to_s) else super end end |
#to_hash(objs = {}, opts = {}) ⇒ Object
end
34 35 36 37 38 39 40 |
# File 'lib/omf-sfa/resource/ip.rb', line 34 def to_hash(objs = {}, opts = {}) h = {} uuid = h[:uuid] = self.uuid.to_s objs[self] = true to_hash_long(h, objs.merge(brief: true), opts) h end |
#to_hash_brief(opts = {}) ⇒ Object
42 43 44 |
# File 'lib/omf-sfa/resource/ip.rb', line 42 def to_hash_brief(opts = {}) to_hash(opts) end |