mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
a few workarounds allowing aws plugin to work with Eucalyptus cloud
This commit is contained in:
parent
4935fc8703
commit
262fd7986b
1 changed files with 8 additions and 1 deletions
|
@ -9,7 +9,7 @@ module Fog
|
|||
@block_device_mapping = {}
|
||||
@network_interface = {}
|
||||
@context = []
|
||||
@contexts = ['blockDeviceMapping', 'groupSet', 'iamInstanceProfile', 'instancesSet', 'instanceState', 'networkInterfaceSet', 'placement', 'productCodes', 'stateReason', 'tagSet']
|
||||
@contexts = ['blockDevices', 'blockDeviceMapping', 'groupSet', 'iamInstanceProfile', 'instancesSet', 'instanceState', 'networkInterfaceSet', 'placement', 'productCodes', 'stateReason', 'tagSet']
|
||||
@instance = { 'blockDeviceMapping' => [], 'networkInterfaces' => [], 'iamInstanceProfile' => {}, 'instanceState' => {}, 'monitoring' => {}, 'placement' => {}, 'productCodes' => [], 'stateReason' => {}, 'tagSet' => {} }
|
||||
@reservation = { 'groupIds' => [], 'groupSet' => [], 'instancesSet' => [] }
|
||||
@response = { 'reservationSet' => [] }
|
||||
|
@ -81,6 +81,8 @@ module Fog
|
|||
when 'tagSet'
|
||||
@instance['tagSet'][@tag['key']] = @tag['value']
|
||||
@tag = {}
|
||||
when 'blockDevices'
|
||||
# Ignore this one (Eucalyptus specific)
|
||||
when nil
|
||||
@response['reservationSet'] << @reservation
|
||||
@reservation = { 'groupIds' => [], 'groupSet' => [], 'instancesSet' => [] }
|
||||
|
@ -101,6 +103,11 @@ module Fog
|
|||
@instance['monitoring'][name] = (value == 'enabled')
|
||||
when 'ebsOptimized'
|
||||
@instance['ebsOptimized'] = (value == 'true')
|
||||
# Eucalyptus passes status in schema non conforming way
|
||||
when 'stateCode'
|
||||
@instance['instanceState']['code'] = value
|
||||
when 'stateName'
|
||||
@instance['instanceState']['name'] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue