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 = {}
|
@block_device_mapping = {}
|
||||||
@network_interface = {}
|
@network_interface = {}
|
||||||
@context = []
|
@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' => {} }
|
@instance = { 'blockDeviceMapping' => [], 'networkInterfaces' => [], 'iamInstanceProfile' => {}, 'instanceState' => {}, 'monitoring' => {}, 'placement' => {}, 'productCodes' => [], 'stateReason' => {}, 'tagSet' => {} }
|
||||||
@reservation = { 'groupIds' => [], 'groupSet' => [], 'instancesSet' => [] }
|
@reservation = { 'groupIds' => [], 'groupSet' => [], 'instancesSet' => [] }
|
||||||
@response = { 'reservationSet' => [] }
|
@response = { 'reservationSet' => [] }
|
||||||
|
@ -81,6 +81,8 @@ module Fog
|
||||||
when 'tagSet'
|
when 'tagSet'
|
||||||
@instance['tagSet'][@tag['key']] = @tag['value']
|
@instance['tagSet'][@tag['key']] = @tag['value']
|
||||||
@tag = {}
|
@tag = {}
|
||||||
|
when 'blockDevices'
|
||||||
|
# Ignore this one (Eucalyptus specific)
|
||||||
when nil
|
when nil
|
||||||
@response['reservationSet'] << @reservation
|
@response['reservationSet'] << @reservation
|
||||||
@reservation = { 'groupIds' => [], 'groupSet' => [], 'instancesSet' => [] }
|
@reservation = { 'groupIds' => [], 'groupSet' => [], 'instancesSet' => [] }
|
||||||
|
@ -101,6 +103,11 @@ module Fog
|
||||||
@instance['monitoring'][name] = (value == 'enabled')
|
@instance['monitoring'][name] = (value == 'enabled')
|
||||||
when 'ebsOptimized'
|
when 'ebsOptimized'
|
||||||
@instance['ebsOptimized'] = (value == 'true')
|
@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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue