зеркало из https://github.com/microsoft/fog.git
more consistent naming for timestamp attributes
This commit is contained in:
Родитель
466e077c02
Коммит
e60446bcbf
|
@ -15,7 +15,7 @@ module Fog
|
|||
attribute :type, 'instanceType'
|
||||
attribute :kernel_id, 'kernelId'
|
||||
attribute :key_name, 'keyName'
|
||||
attribute :launch_time, 'launchTime'
|
||||
attribute :created_at, 'launchTime'
|
||||
attribute :monitoring
|
||||
attribute :product_codes, 'productCodes'
|
||||
attribute :private_dns_name, 'privateDnsName'
|
||||
|
|
|
@ -7,9 +7,9 @@ module Fog
|
|||
identity :id, 'snapshotId'
|
||||
|
||||
attribute :progress
|
||||
attribute :start_time, 'startTime'
|
||||
attribute :created_at, 'startTime'
|
||||
attribute :status
|
||||
attribute :volume_id, 'volumeId'
|
||||
attribute :volume_id, 'volumeId'
|
||||
|
||||
def destroy
|
||||
requires :id
|
||||
|
|
|
@ -6,9 +6,9 @@ module Fog
|
|||
|
||||
identity :id, 'volumeId'
|
||||
|
||||
attribute :attach_time, 'attachTime'
|
||||
attribute :attached_at, 'attachTime'
|
||||
attribute :availability_zone, 'availabilityZone'
|
||||
attribute :create_time, 'createTime'
|
||||
attribute :created_at, 'createTime'
|
||||
attribute :device
|
||||
attribute :server_id, 'instanceId'
|
||||
attribute :size
|
||||
|
|
|
@ -7,8 +7,8 @@ module Fog
|
|||
identity :id
|
||||
|
||||
attribute :name
|
||||
attribute :created
|
||||
attribute :updated
|
||||
attribute :created_at, 'created'
|
||||
attribute :updated_at, 'updated'
|
||||
attribute :status
|
||||
attribute :server_id, 'serverId'
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ describe 'Fog::AWS::EC2::Server' do
|
|||
server.type.should == 'instance_type'
|
||||
server.kernel_id.should == 'kernel_id'
|
||||
server.key_name.should == 'key_name'
|
||||
server.launch_time.should == 'launch_time'
|
||||
server.created_at.should == 'launch_time'
|
||||
server.product_codes.should == 'product_codes'
|
||||
server.private_dns_name.should == 'private_dns_name'
|
||||
server.ramdisk_id.should == 'ramdisk_id'
|
||||
|
|
|
@ -11,7 +11,7 @@ describe 'Fog::AWS::EC2::Snapshots' do
|
|||
'volumeId' => 'vol-00000000'
|
||||
)
|
||||
snapshot.id.should == 'snap-00000000'
|
||||
snapshot.start_time.should == 'now'
|
||||
snapshot.created_at.should == 'now'
|
||||
snapshot.volume_id.should == 'vol-00000000'
|
||||
end
|
||||
|
||||
|
@ -35,6 +35,7 @@ describe 'Fog::AWS::EC2::Snapshots' do
|
|||
it "should return true if the snapshot is deleted" do
|
||||
volume = ec2.volumes.create(:availability_zone => 'us-east-1a', :size => 1, :device => 'dev/sdz1')
|
||||
snapshot = volume.snapshots.create
|
||||
snapshot.wait_for { status == "completed" }
|
||||
snapshot.destroy.should be_true
|
||||
volume.destroy
|
||||
end
|
||||
|
|
|
@ -13,9 +13,9 @@ describe 'Fog::AWS::EC2::Volume' do
|
|||
'snapshotId' => 'snap-00000000',
|
||||
'volumeId' => 'vol-00000000'
|
||||
)
|
||||
volume.attach_time.should == 'now'
|
||||
volume.attached_at.should == 'now'
|
||||
volume.availability_zone.should == 'us-east-1a'
|
||||
volume.create_time.should == 'recently'
|
||||
volume.created_at.should == 'recently'
|
||||
volume.server_id.should == 'i-00000000'
|
||||
volume.snapshot_id.should == 'snap-00000000'
|
||||
volume.id.should == 'vol-00000000'
|
||||
|
|
Загрузка…
Ссылка в новой задаче