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

more changes to ensure networkInterfaces is referenced as a plural, which is what the API is expecting

This commit is contained in:
Andrew Stangl 2014-03-01 15:31:02 +00:00
parent e55bf986f6
commit 99ced673b7

View file

@ -9,8 +9,8 @@ module Fog
@block_device_mapping = {}
@network_interfaces = {}
@context = []
@contexts = ['networkInterface', 'blockDeviceMapping', 'groupSet', 'placement', 'productCodes']
@instance = { 'networkInterface' => [], 'blockDeviceMapping' => [], 'instanceState' => {}, 'monitoring' => {}, 'placement' => {}, 'productCodes' => [] }
@contexts = ['networkInterfaces', 'blockDeviceMapping', 'groupSet', 'placement', 'productCodes']
@instance = { 'networkInterfaces' => [], 'blockDeviceMapping' => [], 'instanceState' => {}, 'monitoring' => {}, 'placement' => {}, 'productCodes' => [] }
@response = { 'groupSet' => [], 'instancesSet' => [] }
end
@ -60,12 +60,12 @@ module Fog
when 'blockDeviceMapping'
@instance['blockDeviceMapping'] << @block_device_mapping
@block_device_mapping = {}
when 'networkInterface'
@instance['networkInterface'] << @network_interfaces
when 'networkInterfaces'
@instance['networkInterfaces'] << @network_interfaces
@network_interfaces = {}
when nil
@response['instancesSet'] << @instance
@instance = { 'networkInterface' => [], 'blockDeviceMapping' => [], 'instanceState' => {}, 'monitoring' => {}, 'placement' => {}, 'productCodes' => [] }
@instance = { 'networkInterfaces' => [], 'blockDeviceMapping' => [], 'instanceState' => {}, 'monitoring' => {}, 'placement' => {}, 'productCodes' => [] }
end
when 'launchTime'
@instance[name] = Time.parse(value)