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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30a0fea20eda46cb34760f2535e6647fc29a3da5
|
4
|
+
data.tar.gz: 0a287393066b8a9857f361fffd51c45cf6482fdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b219778ca6cff3d7168cc465b7e1d394c9beb676b5f32cc9950e55f84aa5e21160b79bcbcf532bd96f497586cf85f2456134cdc8231a1f9a5859fdb3f4464966
|
7
|
+
data.tar.gz: 72e3e133d239b70ae13e02b8b673234da216db7f3d3cc99f0836dff03d53aa8ce4642cb079bca5178e9d2f0795a3aff90c96e5d7b343826f87464317ca60f67c
|
data/lib/fog/huaweicloud/core.rb
CHANGED
@@ -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
|
-
|
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 => "#{
|
90
|
+
:path => "#{real_path}/#{params[:path]}"
|
90
91
|
))
|
91
92
|
rescue Excon::Errors::Unauthorized => error
|
92
93
|
# token expiration and token renewal possible
|
@@ -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 ? {} : {
|
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 ? {} : {
|
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.
|
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-
|
11
|
+
date: 2018-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|