libraries/resource_providers/api200/volume_provider.rb
# Loads the Volume with all the external resources (if needed)
Loads the Volume with all the external resources (if needed)
Loads the Volume with all the external resources ( if needed )
def delete_snapshot
        raise "UnspecifiedProperty: 'snapshot_data'. Please set it before attempting this action." unless @new_resource.snapshot_data
        temp = convert_keys(Marshal.load(Marshal.dump(@new_resource.snapshot_data)), :to_s)
        @item.retrieve! || raise("#{@resource_name} '#{@name}' not found!")
        snapshot = @item.get_snapshot(temp['name'])
        return Chef::Log.info "Volume snapshot '#{temp['name']}' already exists" if snapshot.empty?
        Chef::Log.info "Deleting oneview_volume_snapshot '#{@name}'"
        @context.converge_by "Deleted oneview_volume_snapshot '#{@name}'" do
          @item.delete_snapshot(temp['name'])
        end
      end
def delete_snapshot raise "UnspecifiedProperty: 'snapshot_data'. Please set it before attempting this action." unless @new_resource . snapshot_data temp = convert_keys ( Marshal . load ( Marshal . dump ( @new_resource . snapshot_data ) ) , :to_s ) @item . retrieve! || raise ( "#{@resource_name} '#{@name}' not found!" ) snapshot = @item . get_snapshot ( temp [ 'name' ] ) return Chef :: Log . info "Volume snapshot '#{temp['name']}' already exists" if snapshot . empty? Chef :: Log . info "Deleting oneview_volume_snapshot '#{@name}'" @context . converge_by "Deleted oneview_volume_snapshot '#{@name}'" do @item . delete_snapshot ( temp [ 'name' ] ) end end
Loads the Volume with all the external resources (if needed)
Loads the Volume with all the external resources ( if needed )