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

convert the ids to integer

This commit is contained in:
Edward Muller 2010-04-29 07:04:04 +08:00 committed by Wesley Beary
parent c430e980f5
commit 62a39a8eca
3 changed files with 3 additions and 0 deletions

View file

@ -26,6 +26,7 @@ module Fog
module Mock
def get_network(network_id)
network_id = network_id.to_i
response = Excon::Response.new
if network = @data[:organizations].map { |org| org[:vdcs].map { |vdc| vdc[:networks] } }.flatten.detect { |network| network[:id] == network_id }

View file

@ -33,6 +33,7 @@ module Fog
module Mock
def get_organization(organization_id)
organization_id = organization_id.to_i
response = Excon::Response.new
if org = @data[:organizations].detect { |org| org[:info][:id] == organization_id }

View file

@ -34,6 +34,7 @@ module Fog
module Mock
def get_vdc(vdc_id)
vdc_id = vdc_id.to_i
response = Excon::Response.new
if vdc = @data[:organizations].map { |org| org[:vdcs] }.flatten.detect { |vdc| vdc[:id] == vdc_id }