Sha256: c92527d5bc24bec07e7776b15573506e258b4cab782e7f0ac933dabd334d3121

Contents?: true

Size: 708 Bytes

Versions: 7

Compression:

Stored size: 708 Bytes

Contents

require 'fog/openstack/models/model'

module Fog
  module Volume
    class OpenStack
      class VolumeType < Fog::OpenStack::Model

        attribute :extra_specs

        def create
          requires :name

          response = service.create_volume_type(self.attributes)
          merge_attributes(response.body['volume_type'])

          self
        end

        def update
          requires :id

          response = service.update_volume_type(self.id, self.attributes)
          merge_attributes(response.body['volume_type'])

          self
        end

        def destroy
          requires :id
          service.delete_volume_type(self.id)
          true
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fog-openstack-0.1.5 lib/fog/openstack/models/volume/volume_type.rb
fog-openstack-0.1.4 lib/fog/openstack/models/volume/volume_type.rb
fog-openstack-0.1.3 lib/fog/openstack/models/volume/volume_type.rb
fog-openstack-0.1.2 lib/fog/openstack/models/volume/volume_type.rb
fog-openstack-0.1.1 lib/fog/openstack/models/volume/volume_type.rb
fog-openstack-0.1.0 lib/fog/openstack/models/volume/volume_type.rb
fog-1.37.0 lib/fog/openstack/models/volume/volume_type.rb