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:
parent
c430e980f5
commit
62a39a8eca
3 changed files with 3 additions and 0 deletions
|
@ -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 }
|
||||
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue