Sha256: bac7a326d8df42b10caf6aa6a3a605c1efa1ae41e2237c73416a39718e7eea2a

Contents?: true

Size: 1.56 KB

Versions: 29

Compression:

Stored size: 1.56 KB

Contents

module Fog
  module HP
    class BlockStorageV2
      class Real
        # List existing block storage volume backups
        #
        # ==== Parameters
        # * options<~Hash>: filter options
        #   * 'name'<~String> - Name of the volume
        #   * 'marker'<~String> - The ID of the last item in the previous list
        #   * 'limit'<~Integer> - Sets the page size
        #   * 'changes-since'<~DateTime> - Filters by the changes-since time. The list contains servers that have been deleted since the changes-since time.
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Array>:
        #     * backups<~Hash>:
        #       * 'id'<~String> - UUId for the volume backup
        #       * 'name'<~String> - Name of the volume backup
        #       * 'links'<~Array> - array of volume backup links
        def list_volume_backups(options = {})
          response = request(
            :expects  => 200,
            :method   => 'GET',
            :path     => 'backups',
            :query    => options
          )
          response
        end
      end

      class Mock # :nodoc:all
        def list_volume_backups(options = {})
          response = Excon::Response.new
          backups = []
          data = list_volume_backups_detail.body['backups']
          for backup in data
            backups << backup.reject { |key, _| !['id', 'name', 'links'].include?(key) }
          end

          response.status = 200
          response.body = { 'backups' => backups }
          response
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 4 rubygems

Version Path
fog-1.37.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.36.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.35.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-2.0.0.pre.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.34.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.33.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.32.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.31.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.30.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.29.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.28.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.27.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.26.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.25.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
nsidc-fog-1.24.1 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
fog-1.24.0 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
ns-fog-1.22.11 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb
ns-fog-1.22.10 lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb