Method: OneviewSDK::API200::StorageSystem#retrieve!
- Defined in:
- lib/oneview-sdk/resource/api200/storage_system.rb
#retrieve! ⇒ Boolean
Note:
one of the UNIQUE_IDENTIFIERS or credentials must be specified in the resource
Retrieves the resource details based on this resource’s name or URI.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/oneview-sdk/resource/api200/storage_system.rb', line 79 def retrieve! ip_hostname = self['credentials'][:ip_hostname] || self['credentials']['ip_hostname'] rescue nil if ip_hostname results = self.class.find_by(@client, credentials: { ip_hostname: ip_hostname }) if results.size == 1 set_all(results[0].data) return true end end super rescue IncompleteResource => e raise e unless ip_hostname false end |