mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ec2] deprecate snapshot/volume status for more consistent state
This commit is contained in:
parent
ff52820923
commit
6f6583e32a
2 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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 || {})
|
||||
|
|
Loading…
Add table
Reference in a new issue