fog-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/.gitignore +23 -10
- data/.rubocop.yml +31 -4
- data/.rubocop_todo.yml +83 -55
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/bin/console +4 -3
- data/fog-aliyun.gemspec +19 -18
- data/lib/fog/aliyun.rb +4 -2
- data/lib/fog/aliyun/compute.rb +45 -43
- data/lib/fog/aliyun/models/compute/eip_address.rb +10 -8
- data/lib/fog/aliyun/models/compute/eip_addresses.rb +3 -3
- data/lib/fog/aliyun/models/compute/image.rb +23 -21
- data/lib/fog/aliyun/models/compute/images.rb +2 -0
- data/lib/fog/aliyun/models/compute/route_entry.rb +7 -5
- data/lib/fog/aliyun/models/compute/route_entrys.rb +2 -0
- data/lib/fog/aliyun/models/compute/route_table.rb +6 -4
- data/lib/fog/aliyun/models/compute/route_tables.rb +3 -3
- data/lib/fog/aliyun/models/compute/security_group.rb +7 -5
- data/lib/fog/aliyun/models/compute/security_group_rule.rb +15 -13
- data/lib/fog/aliyun/models/compute/security_group_rules.rb +2 -0
- data/lib/fog/aliyun/models/compute/security_groups.rb +2 -0
- data/lib/fog/aliyun/models/compute/server.rb +28 -26
- data/lib/fog/aliyun/models/compute/servers.rb +3 -3
- data/lib/fog/aliyun/models/compute/snapshot.rb +12 -10
- data/lib/fog/aliyun/models/compute/snapshots.rb +2 -0
- data/lib/fog/aliyun/models/compute/volume.rb +27 -25
- data/lib/fog/aliyun/models/compute/volumes.rb +2 -0
- data/lib/fog/aliyun/models/compute/vpc.rb +12 -10
- data/lib/fog/aliyun/models/compute/vpcs.rb +3 -3
- data/lib/fog/aliyun/models/compute/vrouter.rb +8 -6
- data/lib/fog/aliyun/models/compute/vrouters.rb +3 -3
- data/lib/fog/aliyun/models/compute/vswitch.rb +11 -9
- data/lib/fog/aliyun/models/compute/vswitches.rb +3 -3
- data/lib/fog/aliyun/models/storage/directories.rb +3 -1
- data/lib/fog/aliyun/models/storage/directory.rb +2 -0
- data/lib/fog/aliyun/models/storage/file.rb +18 -16
- data/lib/fog/aliyun/models/storage/files.rb +13 -19
- data/lib/fog/aliyun/requests/compute/allocate_eip_address.rb +5 -3
- data/lib/fog/aliyun/requests/compute/allocate_public_ip_address.rb +4 -2
- data/lib/fog/aliyun/requests/compute/associate_eip_address.rb +4 -2
- data/lib/fog/aliyun/requests/compute/attach_disk.rb +7 -5
- data/lib/fog/aliyun/requests/compute/create_disk.rb +15 -13
- data/lib/fog/aliyun/requests/compute/create_image.rb +3 -1
- data/lib/fog/aliyun/requests/compute/create_security_group.rb +11 -9
- data/lib/fog/aliyun/requests/compute/create_security_group_egress_ip_rule.rb +13 -11
- data/lib/fog/aliyun/requests/compute/create_security_group_egress_sg_rule.rb +12 -10
- data/lib/fog/aliyun/requests/compute/create_security_group_ip_rule.rb +13 -11
- data/lib/fog/aliyun/requests/compute/create_security_group_sg_rule.rb +12 -10
- data/lib/fog/aliyun/requests/compute/create_server.rb +11 -9
- data/lib/fog/aliyun/requests/compute/create_snapshot.rb +3 -1
- data/lib/fog/aliyun/requests/compute/create_vpc.rb +6 -4
- data/lib/fog/aliyun/requests/compute/create_vpn_connection.rb +8 -6
- data/lib/fog/aliyun/requests/compute/create_vpn_customergateway.rb +6 -6
- data/lib/fog/aliyun/requests/compute/create_vswitch.rb +6 -4
- data/lib/fog/aliyun/requests/compute/delete_disk.rb +8 -6
- data/lib/fog/aliyun/requests/compute/delete_image.rb +3 -1
- data/lib/fog/aliyun/requests/compute/delete_security_group.rb +7 -5
- data/lib/fog/aliyun/requests/compute/delete_security_group_egress_ip_rule.rb +13 -11
- data/lib/fog/aliyun/requests/compute/delete_security_group_egress_sg_rule.rb +12 -10
- data/lib/fog/aliyun/requests/compute/delete_security_group_ip_rule.rb +13 -11
- data/lib/fog/aliyun/requests/compute/delete_security_group_sg_rule.rb +12 -10
- data/lib/fog/aliyun/requests/compute/delete_server.rb +2 -0
- data/lib/fog/aliyun/requests/compute/delete_snapshot.rb +3 -1
- data/lib/fog/aliyun/requests/compute/delete_vpc.rb +6 -4
- data/lib/fog/aliyun/requests/compute/delete_vpn_connection.rb +6 -4
- data/lib/fog/aliyun/requests/compute/delete_vpn_customergateway.rb +6 -4
- data/lib/fog/aliyun/requests/compute/delete_vswitch.rb +6 -4
- data/lib/fog/aliyun/requests/compute/detach_disk.rb +6 -4
- data/lib/fog/aliyun/requests/compute/join_security_group.rb +2 -0
- data/lib/fog/aliyun/requests/compute/leave_security_group.rb +2 -0
- data/lib/fog/aliyun/requests/compute/list_disks.rb +5 -3
- data/lib/fog/aliyun/requests/compute/list_eip_addresses.rb +5 -3
- data/lib/fog/aliyun/requests/compute/list_images.rb +5 -3
- data/lib/fog/aliyun/requests/compute/list_route_tables.rb +6 -4
- data/lib/fog/aliyun/requests/compute/list_security_group_rules.rb +7 -5
- data/lib/fog/aliyun/requests/compute/list_security_groups.rb +10 -8
- data/lib/fog/aliyun/requests/compute/list_server_types.rb +8 -6
- data/lib/fog/aliyun/requests/compute/list_servers.rb +4 -2
- data/lib/fog/aliyun/requests/compute/list_snapshots.rb +4 -2
- data/lib/fog/aliyun/requests/compute/list_vpcs.rb +5 -3
- data/lib/fog/aliyun/requests/compute/list_vpn_connections.rb +49 -49
- data/lib/fog/aliyun/requests/compute/list_vpn_customergateways.rb +42 -43
- data/lib/fog/aliyun/requests/compute/list_vpn_gateways.rb +49 -49
- data/lib/fog/aliyun/requests/compute/list_vrouters.rb +6 -4
- data/lib/fog/aliyun/requests/compute/list_vswitchs.rb +6 -4
- data/lib/fog/aliyun/requests/compute/list_zones.rb +3 -1
- data/lib/fog/aliyun/requests/compute/modify_vpc.rb +7 -5
- data/lib/fog/aliyun/requests/compute/modify_vswitch.rb +6 -4
- data/lib/fog/aliyun/requests/compute/reboot_server.rb +2 -0
- data/lib/fog/aliyun/requests/compute/release_eip_address.rb +4 -2
- data/lib/fog/aliyun/requests/compute/start_server.rb +9 -7
- data/lib/fog/aliyun/requests/compute/stop_server.rb +9 -7
- data/lib/fog/aliyun/requests/compute/unassociate_eip_address.rb +4 -2
- data/lib/fog/aliyun/requests/storage/copy_object.rb +3 -2
- data/lib/fog/aliyun/requests/storage/delete_bucket.rb +3 -2
- data/lib/fog/aliyun/requests/storage/delete_container.rb +3 -2
- data/lib/fog/aliyun/requests/storage/delete_object.rb +4 -3
- data/lib/fog/aliyun/requests/storage/get_bucket.rb +6 -11
- data/lib/fog/aliyun/requests/storage/get_container.rb +3 -2
- data/lib/fog/aliyun/requests/storage/get_containers.rb +3 -2
- data/lib/fog/aliyun/requests/storage/get_object.rb +4 -3
- data/lib/fog/aliyun/requests/storage/get_object_http_url.rb +5 -4
- data/lib/fog/aliyun/requests/storage/get_object_https_url.rb +5 -4
- data/lib/fog/aliyun/requests/storage/head_object.rb +3 -2
- data/lib/fog/aliyun/requests/storage/list_buckets.rb +3 -2
- data/lib/fog/aliyun/requests/storage/list_objects.rb +5 -4
- data/lib/fog/aliyun/requests/storage/put_bucket.rb +3 -2
- data/lib/fog/aliyun/requests/storage/put_container.rb +3 -2
- data/lib/fog/aliyun/requests/storage/put_object.rb +12 -17
- data/lib/fog/aliyun/storage.rb +41 -52
- data/lib/fog/aliyun/version.rb +3 -1
- data/lib/fog/bin/aliyun.rb +10 -7
- metadata +37 -37
data/lib/fog/aliyun/version.rb
CHANGED
data/lib/fog/bin/aliyun.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class Aliyun < Fog::Bin
|
2
4
|
class << self
|
3
5
|
def class_for(key)
|
@@ -13,13 +15,14 @@ class Aliyun < Fog::Bin
|
|
13
15
|
|
14
16
|
def [](service)
|
15
17
|
@@connections ||= Hash.new do |hash, key|
|
16
|
-
hash[key] =
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
hash[key] =
|
19
|
+
case key
|
20
|
+
when :storage
|
21
|
+
Fog::Logger.warning('Aliyun[:storage] is not recommended, use Storage[:openstack] for portability')
|
22
|
+
Fog::Storage.new(provider: 'aliyun')
|
23
|
+
else
|
24
|
+
raise ArgumentError, "Unrecognized service: #{key.inspect}"
|
25
|
+
end
|
23
26
|
end
|
24
27
|
@@connections[service]
|
25
28
|
end
|
metadata
CHANGED
@@ -1,93 +1,93 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-aliyun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Qinsi Deng, Jianxun Li, Jane Han
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: mime-types
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.6'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 2.6.2
|
34
37
|
type: :development
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
41
|
- - "~>"
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
43
|
+
version: '2.6'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 2.6.2
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
48
|
+
name: pry-nav
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
|
-
- - "
|
51
|
+
- - ">="
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
53
|
+
version: '0'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
|
-
- - "
|
58
|
+
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
60
|
+
version: '0'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
62
|
+
name: rake
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
|
-
- - "
|
65
|
+
- - ">="
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0
|
67
|
+
version: '0'
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
|
-
- - "
|
72
|
+
- - ">="
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0
|
74
|
+
version: '0'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
76
|
+
name: rspec
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '2.6'
|
76
79
|
- - ">="
|
77
80
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
81
|
+
version: '0'
|
79
82
|
type: :development
|
80
83
|
prerelease: false
|
81
84
|
version_requirements: !ruby/object:Gem::Requirement
|
82
85
|
requirements:
|
83
|
-
- - "~>"
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '2.6'
|
86
86
|
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
88
|
+
version: '0'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
90
|
+
name: rubocop
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - ">="
|
@@ -104,30 +104,30 @@ dependencies:
|
|
104
104
|
name: fog-core
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
109
|
+
version: '0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- - "
|
114
|
+
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
116
|
+
version: '0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: fog-json
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- - "
|
121
|
+
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
123
|
+
version: '0'
|
124
124
|
type: :runtime
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- - "
|
128
|
+
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
130
|
+
version: '0'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: ipaddress
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|