lib/fog/brightbox/models/compute/volume.rb in fog-brightbox-1.6.0 vs lib/fog/brightbox/models/compute/volume.rb in fog-brightbox-1.7.0
- old
+ new
@@ -3,37 +3,38 @@
class Compute
class Volume < Fog::Brightbox::Model
include Fog::Brightbox::Compute::ResourceLocking
identity :id
- attribute :url
attribute :resource_type
+ attribute :url
attribute :name
- attribute :state, :aliases => "status"
-
+ attribute :state, aliases: "status"
attribute :description
+
attribute :filesystem_label
attribute :filesystem_type
attribute :serial
- attribute :size
+ attribute :size, type: :integer
attribute :source
attribute :source_type
attribute :storage_type
- attribute :boot
- attribute :delete_with_server
- attribute :encrypted
+ # Boolean flags
+ attribute :boot, type: :boolean
+ attribute :delete_with_server, type: :boolean
+ attribute :encrypted, type: :boolean
- # Times
- attribute :created_at, :type => :time
- attribute :updated_at, :type => :time
- attribute :deleted_at, :type => :time
+ # Timestamps
+ attribute :created_at, type: :time
+ attribute :updated_at, type: :time
+ attribute :deleted_at, type: :time
# Links
- attribute :account_id, :aliases => "account", :squash => "id"
- attribute :image_id, :aliases => "image", :squash => "id"
- attribute :server_id, :aliases => "server", :squash => "id"
+ attribute :account_id, aliases: "account", squash: "id"
+ attribute :image_id, aliases: "image", squash: "id"
+ attribute :server_id, aliases: "server", squash: "id"
def attach(server)
requires :identity
data = service.attach_volume(identity, server: server.id)
merge_attributes(data)