Method: OneviewSDK::API200::ServerProfile#remove_volume_attachment
- Defined in:
- lib/oneview-sdk/resource/api200/server_profile.rb
#remove_volume_attachment(id) ⇒ Object
Removes a volume attachment entry in the Server profile
268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/oneview-sdk/resource/api200/server_profile.rb', line 268 def (id) self['sanStorage'] ||= {} self['sanStorage']['volumeAttachments'] ||= [] return if self['sanStorage'].empty? || self['sanStorage']['volumeAttachments'].empty? = nil self['sanStorage']['volumeAttachments'].each do |entry| = self['sanStorage']['volumeAttachments'].delete(entry) if entry['id'] == id end end |