fog-huaweicloud 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac6b75e7b93ab2ca21739f34fecf273ae4e47eae
4
- data.tar.gz: 918c0c29d91eb81c63f3dc2a365bec5d713e0555
3
+ metadata.gz: 30a0fea20eda46cb34760f2535e6647fc29a3da5
4
+ data.tar.gz: 0a287393066b8a9857f361fffd51c45cf6482fdf
5
5
  SHA512:
6
- metadata.gz: 28f8f4c46cf06cb07d6aa6bb85cd12848c87c9f3cbfcde37491b73c08d98700e91f9a4fcc21e0dbb5c59ce3bde29c702efd9ccbbe12ede415c130930e770ef4f
7
- data.tar.gz: 234cfcc9decb75551df8ed469adbbc141fb9fa3071db837eaa9d369bbff8a83140e95061588d165f684579be5299f26e8310bd9d874596d07c3304a010a8edfe
6
+ metadata.gz: b219778ca6cff3d7168cc465b7e1d394c9beb676b5f32cc9950e55f84aa5e21160b79bcbcf532bd96f497586cf85f2456134cdc8231a1f9a5859fdb3f4464966
7
+ data.tar.gz: 72e3e133d239b70ae13e02b8b673234da216db7f3d3cc99f0836dff03d53aa8ce4642cb079bca5178e9d2f0795a3aff90c96e5d7b343826f87464317ca60f67c
@@ -81,12 +81,13 @@ module Fog
81
81
  begin
82
82
  # NOTE: This is only for transition usage. It should be removed once we upgraded all
83
83
  # the APIs to non-OpenStack version.
84
+ real_path = @path.clone
84
85
  overwrite_version.each do |key, value|
85
- @path.sub!(key, value + "/" + @current_tenant['id'])
86
+ real_path.sub!(key, value)
86
87
  end
87
88
  response = @connection.request(params.merge(
88
89
  :headers => headers(params.delete(:headers)),
89
- :path => "#{@path}/#{params[:path]}"
90
+ :path => "#{real_path}/#{params[:path]}"
90
91
  ))
91
92
  rescue Excon::Errors::Unauthorized => error
92
93
  # token expiration and token renewal possible
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module HuaweiCloud
3
- VERSION = '0.0.2'.freeze
3
+ VERSION = '0.0.3'.freeze
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ module Fog
3
3
  class HuaweiCloud
4
4
  class Real
5
5
  def get_subnet(subnet_id,openstack_compatible = true)
6
- overwrite_version = openstack_compatible ? {} : {'v2.0' => 'v1'}
6
+ overwrite_version = openstack_compatible ? {} : {"v2.0" => "v1/#{@current_tenant['id']}"}
7
7
  request({:expects => [200], :method=> 'GET', :path => "subnets/#{subnet_id}"},
8
8
  true, overwrite_version
9
9
  )
@@ -3,7 +3,7 @@ module Fog
3
3
  class HuaweiCloud
4
4
  class Real
5
5
  def list_subnets(filters = {}, openstack_compatible = true)
6
- overwrite_version = openstack_compatible ? {} : {'v2.0' => 'v1'}
6
+ overwrite_version = openstack_compatible ? {} : {"v2.0" => "v1/#{@current_tenant['id']}"}
7
7
  request(
8
8
  {:expects => 200, :method => 'GET', :path => 'subnets', :query => filters},
9
9
  true, overwrite_version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-huaweicloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huawei
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-02 00:00:00.000000000 Z
11
+ date: 2018-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core