From 99ced673b794162e666b3ccf539b98263b756ea4 Mon Sep 17 00:00:00 2001 From: Andrew Stangl Date: Sat, 1 Mar 2014 15:31:02 +0000 Subject: [PATCH] more changes to ensure networkInterfaces is referenced as a plural, which is what the API is expecting --- lib/fog/aws/parsers/compute/run_instances.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/fog/aws/parsers/compute/run_instances.rb b/lib/fog/aws/parsers/compute/run_instances.rb index f62c12d33..7bce583c6 100644 --- a/lib/fog/aws/parsers/compute/run_instances.rb +++ b/lib/fog/aws/parsers/compute/run_instances.rb @@ -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)