Sha256: a2c69febec37962078e19c687b792986d67721f8c3dc04f01cad29c4f47d5f8c

Contents?: true

Size: 633 Bytes

Versions: 4

Compression:

Stored size: 633 Bytes

Contents

require 'fog/huaweicloud/models/collection'

module Fog
  module Volume
    class HuaweiCloud
      module Snapshots
        def all(options = {})
          load_response(service.list_snapshots_detailed(options), 'snapshots')
        end

        def summary(options = {})
          load_response(service.list_snapshots(options), 'snapshots')
        end

        def get(snapshots_id)
          snapshot = service.get_snapshot_details(snapshots_id).body['snapshot']
          if snapshot
            new(snapshot)
          end
        rescue Fog::Volume::HuaweiCloud::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-huaweicloud-0.0.3 lib/fog/volume/huaweicloud/models/snapshots.rb
fog-huaweicloud-0.0.2 lib/fog/volume/huaweicloud/models/snapshots.rb
fog-huaweicloud-0.1.3 lib/fog/volume/huaweicloud/models/snapshots.rb
fog-huaweicloud-0.1.2 lib/fog/volume/huaweicloud/models/snapshots.rb