1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

properly parse availability zone in instance model

This commit is contained in:
Wesley Beary 2009-10-21 18:50:15 -07:00
parent 47ae71b296
commit 7a15c7be1d
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,7 @@ module Fog
end
def placement=(new_placement)
if placement.is_a?(Hash)
if new_placement.is_a?(Hash)
@availability_zone = new_placement['availabilityZone']
else
@availability_zone = new_placement

View file

@ -7,7 +7,6 @@ describe 'Fog::AWS::EC2::Instance' do
it "should remap attributes from parser" do
instance = Fog::AWS::EC2::Instance.new({
'amiLaunchIndex' => 'ami_launch_index',
'availabilityZone' => 'availability_zone',
'dnsName' => 'dns_name',
'groupId' => 'group_id',
'imageId' => 'image_id',
@ -17,6 +16,7 @@ describe 'Fog::AWS::EC2::Instance' do
'kernelId' => 'kernel_id',
'keyName' => 'key_name',
'launchTime' => 'launch_time',
'placement' => { 'availabilityZone' => 'availability_zone'},
'productCodes' => 'product_codes',
'privateDnsName' => 'private_dns_name',
'ramdiskId' => 'ramdisk_id'