lib/fog/network/huaweicloud/requests/get_subnet.rb in fog-huaweicloud-0.1.2 vs lib/fog/network/huaweicloud/requests/get_subnet.rb in fog-huaweicloud-0.1.3

- old
+ new

@@ -1,19 +1,18 @@ module Fog module Network class HuaweiCloud class Real - def get_subnet(subnet_id) - request( - :expects => [200], - :method => 'GET', - :path => "subnets/#{subnet_id}" + def get_subnet(subnet_id,openstack_compatible = true) + overwrite_version = openstack_compatible ? {} : {'v2.0' => 'v1'} + request({:expects => [200], :method=> 'GET', :path => "subnets/#{subnet_id}"}, + true, overwrite_version ) end end class Mock - def get_subnet(subnet_id) + def get_subnet(subnet_id, openstack_compatible = true) response = Excon::Response.new if data = self.data[:subnets][subnet_id] response.status = 200 response.body = { "subnet" => {