aliyun 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aliyun/services.rb +25 -1
- data/lib/aliyun/version.rb +1 -1
- data/spec/aliyun_spec.rb +20 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dc5e0595cf65cbc2bf6d43fa1332f025143be87
|
4
|
+
data.tar.gz: cd067473afc476ba9c400787c7ce65943c162c7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa762f088fb80c27b196f2e65e7b8e3f3c3971eb6045fce149710e614b910f3ec64f5b5b87b860fd4a0a1c003c60728c524d2a8fe98c9082bc33a1604e0b327a
|
7
|
+
data.tar.gz: 336643ed67cbacfe091043cd0999938e6459c4430f048bf645854351bbad2a0a187a904ec51640db93d98ed1efe06a32944e0f0303bca74b78a0424a23cb2056
|
data/lib/aliyun/services.rb
CHANGED
@@ -45,8 +45,32 @@ module Aliyun
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
class RDSConfig < APIConfig
|
49
|
+
def self.info
|
50
|
+
"Aliyu RDS Service"
|
51
|
+
end
|
52
|
+
def self.endpoint
|
53
|
+
'https://rds.aliyuncs.com/'
|
54
|
+
end
|
55
|
+
def self.default_parameters
|
56
|
+
{
|
57
|
+
:Format=>"JSON",
|
58
|
+
:Version=>"2014-08-15",
|
59
|
+
:SignatureMethod=>"HMAC-SHA1",
|
60
|
+
:SignatureVersion=>"1.0"
|
61
|
+
}
|
62
|
+
end
|
63
|
+
def self.separator
|
64
|
+
super
|
65
|
+
end
|
66
|
+
def self.http_method
|
67
|
+
super
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
48
71
|
SERVICES = {
|
49
72
|
:ecs => ECSConfig,
|
50
|
-
:slb => SLBConfig
|
73
|
+
:slb => SLBConfig,
|
74
|
+
:rds => RDSConfig
|
51
75
|
}
|
52
76
|
end
|
data/lib/aliyun/version.rb
CHANGED
data/spec/aliyun_spec.rb
CHANGED
@@ -30,6 +30,15 @@ describe Aliyun do
|
|
30
30
|
expect(service.service).to be(Aliyun::SLBConfig)
|
31
31
|
end
|
32
32
|
|
33
|
+
it 'can create aliyun rds service' do
|
34
|
+
options = load_options
|
35
|
+
options[:service] = :rds
|
36
|
+
service = Aliyun::Service.new options
|
37
|
+
|
38
|
+
expect(service).to be_instance_of(Aliyun::Service)
|
39
|
+
expect(service.service).to be(Aliyun::RDSConfig)
|
40
|
+
end
|
41
|
+
|
33
42
|
it 'can query aliyun ecs regions' do
|
34
43
|
options = load_options
|
35
44
|
options[:service] = :ecs
|
@@ -52,6 +61,17 @@ describe Aliyun do
|
|
52
61
|
expect(regions["Regions"]).to have_key("Region")
|
53
62
|
end
|
54
63
|
|
64
|
+
it 'can query aliyun rds regions' do
|
65
|
+
options = load_options
|
66
|
+
options[:service] = :rds
|
67
|
+
service = Aliyun::Service.new options
|
68
|
+
parameters = {}
|
69
|
+
regions = service.DescribeRegions parameters
|
70
|
+
|
71
|
+
expect(regions).to have_key("Regions")
|
72
|
+
expect(regions["Regions"]).to have_key("RDSRegion")
|
73
|
+
end
|
74
|
+
|
55
75
|
it "can describe aliyun slb regions" do
|
56
76
|
options = load_options
|
57
77
|
options[:service] = :slb
|