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.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +23 -10
  3. data/.rubocop.yml +31 -4
  4. data/.rubocop_todo.yml +83 -55
  5. data/Gemfile +2 -0
  6. data/Rakefile +2 -0
  7. data/bin/console +4 -3
  8. data/fog-aliyun.gemspec +19 -18
  9. data/lib/fog/aliyun.rb +4 -2
  10. data/lib/fog/aliyun/compute.rb +45 -43
  11. data/lib/fog/aliyun/models/compute/eip_address.rb +10 -8
  12. data/lib/fog/aliyun/models/compute/eip_addresses.rb +3 -3
  13. data/lib/fog/aliyun/models/compute/image.rb +23 -21
  14. data/lib/fog/aliyun/models/compute/images.rb +2 -0
  15. data/lib/fog/aliyun/models/compute/route_entry.rb +7 -5
  16. data/lib/fog/aliyun/models/compute/route_entrys.rb +2 -0
  17. data/lib/fog/aliyun/models/compute/route_table.rb +6 -4
  18. data/lib/fog/aliyun/models/compute/route_tables.rb +3 -3
  19. data/lib/fog/aliyun/models/compute/security_group.rb +7 -5
  20. data/lib/fog/aliyun/models/compute/security_group_rule.rb +15 -13
  21. data/lib/fog/aliyun/models/compute/security_group_rules.rb +2 -0
  22. data/lib/fog/aliyun/models/compute/security_groups.rb +2 -0
  23. data/lib/fog/aliyun/models/compute/server.rb +28 -26
  24. data/lib/fog/aliyun/models/compute/servers.rb +3 -3
  25. data/lib/fog/aliyun/models/compute/snapshot.rb +12 -10
  26. data/lib/fog/aliyun/models/compute/snapshots.rb +2 -0
  27. data/lib/fog/aliyun/models/compute/volume.rb +27 -25
  28. data/lib/fog/aliyun/models/compute/volumes.rb +2 -0
  29. data/lib/fog/aliyun/models/compute/vpc.rb +12 -10
  30. data/lib/fog/aliyun/models/compute/vpcs.rb +3 -3
  31. data/lib/fog/aliyun/models/compute/vrouter.rb +8 -6
  32. data/lib/fog/aliyun/models/compute/vrouters.rb +3 -3
  33. data/lib/fog/aliyun/models/compute/vswitch.rb +11 -9
  34. data/lib/fog/aliyun/models/compute/vswitches.rb +3 -3
  35. data/lib/fog/aliyun/models/storage/directories.rb +3 -1
  36. data/lib/fog/aliyun/models/storage/directory.rb +2 -0
  37. data/lib/fog/aliyun/models/storage/file.rb +18 -16
  38. data/lib/fog/aliyun/models/storage/files.rb +13 -19
  39. data/lib/fog/aliyun/requests/compute/allocate_eip_address.rb +5 -3
  40. data/lib/fog/aliyun/requests/compute/allocate_public_ip_address.rb +4 -2
  41. data/lib/fog/aliyun/requests/compute/associate_eip_address.rb +4 -2
  42. data/lib/fog/aliyun/requests/compute/attach_disk.rb +7 -5
  43. data/lib/fog/aliyun/requests/compute/create_disk.rb +15 -13
  44. data/lib/fog/aliyun/requests/compute/create_image.rb +3 -1
  45. data/lib/fog/aliyun/requests/compute/create_security_group.rb +11 -9
  46. data/lib/fog/aliyun/requests/compute/create_security_group_egress_ip_rule.rb +13 -11
  47. data/lib/fog/aliyun/requests/compute/create_security_group_egress_sg_rule.rb +12 -10
  48. data/lib/fog/aliyun/requests/compute/create_security_group_ip_rule.rb +13 -11
  49. data/lib/fog/aliyun/requests/compute/create_security_group_sg_rule.rb +12 -10
  50. data/lib/fog/aliyun/requests/compute/create_server.rb +11 -9
  51. data/lib/fog/aliyun/requests/compute/create_snapshot.rb +3 -1
  52. data/lib/fog/aliyun/requests/compute/create_vpc.rb +6 -4
  53. data/lib/fog/aliyun/requests/compute/create_vpn_connection.rb +8 -6
  54. data/lib/fog/aliyun/requests/compute/create_vpn_customergateway.rb +6 -6
  55. data/lib/fog/aliyun/requests/compute/create_vswitch.rb +6 -4
  56. data/lib/fog/aliyun/requests/compute/delete_disk.rb +8 -6
  57. data/lib/fog/aliyun/requests/compute/delete_image.rb +3 -1
  58. data/lib/fog/aliyun/requests/compute/delete_security_group.rb +7 -5
  59. data/lib/fog/aliyun/requests/compute/delete_security_group_egress_ip_rule.rb +13 -11
  60. data/lib/fog/aliyun/requests/compute/delete_security_group_egress_sg_rule.rb +12 -10
  61. data/lib/fog/aliyun/requests/compute/delete_security_group_ip_rule.rb +13 -11
  62. data/lib/fog/aliyun/requests/compute/delete_security_group_sg_rule.rb +12 -10
  63. data/lib/fog/aliyun/requests/compute/delete_server.rb +2 -0
  64. data/lib/fog/aliyun/requests/compute/delete_snapshot.rb +3 -1
  65. data/lib/fog/aliyun/requests/compute/delete_vpc.rb +6 -4
  66. data/lib/fog/aliyun/requests/compute/delete_vpn_connection.rb +6 -4
  67. data/lib/fog/aliyun/requests/compute/delete_vpn_customergateway.rb +6 -4
  68. data/lib/fog/aliyun/requests/compute/delete_vswitch.rb +6 -4
  69. data/lib/fog/aliyun/requests/compute/detach_disk.rb +6 -4
  70. data/lib/fog/aliyun/requests/compute/join_security_group.rb +2 -0
  71. data/lib/fog/aliyun/requests/compute/leave_security_group.rb +2 -0
  72. data/lib/fog/aliyun/requests/compute/list_disks.rb +5 -3
  73. data/lib/fog/aliyun/requests/compute/list_eip_addresses.rb +5 -3
  74. data/lib/fog/aliyun/requests/compute/list_images.rb +5 -3
  75. data/lib/fog/aliyun/requests/compute/list_route_tables.rb +6 -4
  76. data/lib/fog/aliyun/requests/compute/list_security_group_rules.rb +7 -5
  77. data/lib/fog/aliyun/requests/compute/list_security_groups.rb +10 -8
  78. data/lib/fog/aliyun/requests/compute/list_server_types.rb +8 -6
  79. data/lib/fog/aliyun/requests/compute/list_servers.rb +4 -2
  80. data/lib/fog/aliyun/requests/compute/list_snapshots.rb +4 -2
  81. data/lib/fog/aliyun/requests/compute/list_vpcs.rb +5 -3
  82. data/lib/fog/aliyun/requests/compute/list_vpn_connections.rb +49 -49
  83. data/lib/fog/aliyun/requests/compute/list_vpn_customergateways.rb +42 -43
  84. data/lib/fog/aliyun/requests/compute/list_vpn_gateways.rb +49 -49
  85. data/lib/fog/aliyun/requests/compute/list_vrouters.rb +6 -4
  86. data/lib/fog/aliyun/requests/compute/list_vswitchs.rb +6 -4
  87. data/lib/fog/aliyun/requests/compute/list_zones.rb +3 -1
  88. data/lib/fog/aliyun/requests/compute/modify_vpc.rb +7 -5
  89. data/lib/fog/aliyun/requests/compute/modify_vswitch.rb +6 -4
  90. data/lib/fog/aliyun/requests/compute/reboot_server.rb +2 -0
  91. data/lib/fog/aliyun/requests/compute/release_eip_address.rb +4 -2
  92. data/lib/fog/aliyun/requests/compute/start_server.rb +9 -7
  93. data/lib/fog/aliyun/requests/compute/stop_server.rb +9 -7
  94. data/lib/fog/aliyun/requests/compute/unassociate_eip_address.rb +4 -2
  95. data/lib/fog/aliyun/requests/storage/copy_object.rb +3 -2
  96. data/lib/fog/aliyun/requests/storage/delete_bucket.rb +3 -2
  97. data/lib/fog/aliyun/requests/storage/delete_container.rb +3 -2
  98. data/lib/fog/aliyun/requests/storage/delete_object.rb +4 -3
  99. data/lib/fog/aliyun/requests/storage/get_bucket.rb +6 -11
  100. data/lib/fog/aliyun/requests/storage/get_container.rb +3 -2
  101. data/lib/fog/aliyun/requests/storage/get_containers.rb +3 -2
  102. data/lib/fog/aliyun/requests/storage/get_object.rb +4 -3
  103. data/lib/fog/aliyun/requests/storage/get_object_http_url.rb +5 -4
  104. data/lib/fog/aliyun/requests/storage/get_object_https_url.rb +5 -4
  105. data/lib/fog/aliyun/requests/storage/head_object.rb +3 -2
  106. data/lib/fog/aliyun/requests/storage/list_buckets.rb +3 -2
  107. data/lib/fog/aliyun/requests/storage/list_objects.rb +5 -4
  108. data/lib/fog/aliyun/requests/storage/put_bucket.rb +3 -2
  109. data/lib/fog/aliyun/requests/storage/put_container.rb +3 -2
  110. data/lib/fog/aliyun/requests/storage/put_object.rb +12 -17
  111. data/lib/fog/aliyun/storage.rb +41 -52
  112. data/lib/fog/aliyun/version.rb +3 -1
  113. data/lib/fog/bin/aliyun.rb +10 -7
  114. metadata +37 -37
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Fog
2
4
  module Aliyun
3
- VERSION = '0.3.0'.freeze
5
+ VERSION = '0.3.1'
4
6
  end
5
7
  end
@@ -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] = case key
17
- when :storage
18
- Fog::Logger.warning('Aliyun[:storage] is not recommended, use Storage[:openstack] for portability')
19
- Fog::Storage.new(provider: 'aliyun')
20
- else
21
- raise ArgumentError, "Unrecognized service: #{key.inspect}"
22
- end
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.0
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-21 00:00:00.000000000 Z
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: '1.10'
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: '1.10'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: mime-types
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
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: '10.0'
43
+ version: '2.6'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 2.6.2
41
47
  - !ruby/object:Gem::Dependency
42
- name: rspec
48
+ name: pry-nav
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - "~>"
51
+ - - ">="
46
52
  - !ruby/object:Gem::Version
47
- version: '3.3'
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: '3.3'
60
+ version: '0'
55
61
  - !ruby/object:Gem::Dependency
56
- name: rubocop
62
+ name: rake
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
- - - "~>"
65
+ - - ">="
60
66
  - !ruby/object:Gem::Version
61
- version: 0.49.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.49.0
74
+ version: '0'
69
75
  - !ruby/object:Gem::Dependency
70
- name: mime-types
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: 2.6.2
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: 2.6.2
88
+ version: '0'
89
89
  - !ruby/object:Gem::Dependency
90
- name: pry-nav
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: '1.27'
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: '1.27'
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: '1.0'
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: '1.0'
130
+ version: '0'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: ipaddress
133
133
  requirement: !ruby/object:Gem::Requirement