Method: OneviewSDK::API200::StorageSystem#like?
- Defined in:
- lib/oneview-sdk/resource/api200/storage_system.rb
#like?(other) ⇒ Boolean
Note:
Does not check the client, logger, or api_version if another resource is passed in
Note:
Does not check the password in credentials
Check the equality of the data for the other resource with this resource.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/oneview-sdk/resource/api200/storage_system.rb', line 104 def like?(other) if other.is_a? Hash other_copy = Marshal.load(Marshal.dump(other)) else other_copy = other.dup other_copy.data = Marshal.load(Marshal.dump(other.data)) end if other_copy['credentials'] other_copy['credentials'].delete('password') rescue nil other_copy['credentials'].delete(:password) rescue nil elsif other_copy[:credentials] other_copy[:credentials].delete('password') rescue nil other_copy[:credentials].delete(:password) rescue nil end super(other_copy) end |