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
|
module EC2
|
||||||
|
|
||||||
class Snapshot < Fog::Model
|
class Snapshot < Fog::Model
|
||||||
|
extend Fog::Deprecation
|
||||||
|
deprecate(:status, :state)
|
||||||
|
|
||||||
identity :id, 'snapshotId'
|
identity :id, 'snapshotId'
|
||||||
|
|
||||||
attribute :progress
|
attribute :progress
|
||||||
attribute :created_at, 'startTime'
|
attribute :created_at, 'startTime'
|
||||||
attribute :status
|
attribute :state, 'status'
|
||||||
attribute :volume_id, 'volumeId'
|
attribute :volume_id, 'volumeId'
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
|
|
@ -5,6 +5,8 @@ module Fog
|
||||||
module EC2
|
module EC2
|
||||||
|
|
||||||
class Volume < Fog::Model
|
class Volume < Fog::Model
|
||||||
|
extend Fog::Deprecation
|
||||||
|
deprecate(:status, :state)
|
||||||
|
|
||||||
identity :id, 'volumeId'
|
identity :id, 'volumeId'
|
||||||
|
|
||||||
|
@ -15,7 +17,7 @@ module Fog
|
||||||
attribute :server_id, 'instanceId'
|
attribute :server_id, 'instanceId'
|
||||||
attribute :size
|
attribute :size
|
||||||
attribute :snapshot_id, 'snapshotId'
|
attribute :snapshot_id, 'snapshotId'
|
||||||
attribute :status
|
attribute :state, 'status'
|
||||||
|
|
||||||
def initialize(attributes = {})
|
def initialize(attributes = {})
|
||||||
if attributes['attachmentSet']
|
if attributes['attachmentSet']
|
||||||
|
|
Loading…
Add table
Reference in a new issue