Sha256: 1f821aa196322d4d1aa48bd792b4bb707c3a97c90995e1feec5268fef9fcbc91

Contents?: true

Size: 881 Bytes

Versions: 4

Compression:

Stored size: 881 Bytes

Contents

require 'fog/qingcloud/model'

module Fog
  module Compute
    class QingCloud

      class Image < Fog::QingCloud::Model

        identity :id,                     :aliases => 'image_id'

        attribute :state,                 :aliases => 'status'
        attribute :processor_type
        attribute :transition_status
        attribute :recommended_type
        attribute :name,                  :aliases => 'image_name'
        attribute :visibility
        attribute :platform
        attribute :created_at,            :aliases => 'create_time'
        attribute :os_family
        attribute :provider
        attribute :owner
        attribute :status_time
        attribute :size
        attribute :description

        def ready?
          state == 'available'
        end

        def is_public
          visibility == 'public'
        end

      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ns-fog-1.22.6 lib/fog/qingcloud/models/compute/image.rb
ns-fog-1.22.4 lib/fog/qingcloud/models/compute/image.rb
ns-fog-1.22.3 lib/fog/qingcloud/models/compute/image.rb
ns-fog-1.22.2 lib/fog/qingcloud/models/compute/image.rb