[ec2] deprecate snapshot/volume status for more consistent state

This commit is contained in:
geemus 2010-04-23 15:21:17 -07:00
parent ff52820923
commit 6f6583e32a
2 changed files with 7 additions and 3 deletions

View File

@ -5,12 +5,14 @@ module Fog
module EC2
class Snapshot < Fog::Model
extend Fog::Deprecation
deprecate(:status, :state)
identity :id, 'snapshotId'
attribute :progress
attribute :created_at, 'startTime'
attribute :status
attribute :state, 'status'
attribute :volume_id, 'volumeId'
def destroy

View File

@ -5,6 +5,8 @@ module Fog
module EC2
class Volume < Fog::Model
extend Fog::Deprecation
deprecate(:status, :state)
identity :id, 'volumeId'
@ -15,8 +17,8 @@ module Fog
attribute :server_id, 'instanceId'
attribute :size
attribute :snapshot_id, 'snapshotId'
attribute :status
attribute :state, 'status'
def initialize(attributes = {})
if attributes['attachmentSet']
attributes.merge!(attributes.delete('attachmentSet').first || {})