Sha256: f94425c3a63c29f5d46b3445b414eea7712b90d8e99687fbace998db7d2d6197

Contents?: true

Size: 1.33 KB

Versions: 55

Compression:

Stored size: 1.33 KB

Contents

module Fog
  module Compute
    class Cloudstack
      class DiskOffering < Fog::Model
        identity  :id,              :aliases => 'id'
        attribute :created
        attribute :disk_size,       :aliases => 'disk_size'
        attribute :display_text,    :aliases => 'display_text'
        attribute :domain
        attribute :domain_id,       :aliases => 'domainid'
        attribute :is_customized,   :aliases => 'iscustomized'
        attribute :name
        attribute :storage_type,    :aliases => 'storagetype'
        attribute :tags


        def save
          requires :display_text, :name

          options = {
            'displaytext' => display_text,
            'name'        => name,
            'customized'  => is_customized,
            'disksize'    => disk_size,
            'domain_id'   => domain_id,
            'storagetype' => storage_type,
            'tags'        => tags
          }

          response = service.create_disk_offering(options)
          merge_attributes(response['creatediskofferingresponse'])
        end

        def destroy
          requires :id

          response = service.delete_disk_offering('id' => id )
          success_status = response['deletediskofferingresponse']['success']

          success_status == 'true'
        end

      end # DiskOffering
    end # Cloudstack
  end # Compute
end # Fog

Version data entries

55 entries across 55 versions & 3 rubygems

Version Path
fog-maestrodev-1.18.0.20131209090811 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131126122111 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131125111730 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131125083406 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131123105121 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131122203507 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131121075022 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131118164830 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131115184302 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131114200144 lib/fog/cloudstack/models/compute/disk_offering.rb
gapinc-fog-1.12.1.2.1 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131112185232 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-maestrodev-1.18.0.20131111203459 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-1.18.0 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-1.17.0 lib/fog/cloudstack/models/compute/disk_offering.rb
fog-1.16.0 lib/fog/cloudstack/models/compute/disk_offering.rb