qingcloud-sdk 0.4.1 → 2.0.0.pre.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +201 -21
- data/README.md +141 -61
- data/bin/console +3 -3
- data/lib/qingcloud/sdk.rb +16 -14
- data/lib/qingcloud/sdk/general/config.rb +70 -0
- data/lib/qingcloud/sdk/general/contract.rb +28 -17
- data/lib/qingcloud/sdk/general/default/config.yaml +13 -0
- data/lib/qingcloud/sdk/general/error.rb +41 -32
- data/lib/qingcloud/sdk/general/logger.rb +54 -0
- data/lib/qingcloud/sdk/request/preprocessor.rb +81 -0
- data/lib/qingcloud/sdk/request/request.rb +80 -0
- data/lib/qingcloud/sdk/request/signer.rb +53 -0
- data/lib/qingcloud/sdk/service/cache.rb +1005 -0
- data/lib/qingcloud/sdk/service/dns_alias.rb +150 -0
- data/lib/qingcloud/sdk/service/eip.rb +389 -0
- data/lib/qingcloud/sdk/service/image.rb +304 -0
- data/lib/qingcloud/sdk/service/instance.rb +585 -0
- data/lib/qingcloud/sdk/service/job.rb +71 -0
- data/lib/qingcloud/sdk/service/key_pair.rb +257 -0
- data/lib/qingcloud/sdk/service/load_balancer.rb +1119 -0
- data/lib/qingcloud/sdk/service/mongo.rb +566 -0
- data/lib/qingcloud/sdk/service/qingcloud.rb +185 -0
- data/lib/qingcloud/sdk/service/rdb.rb +751 -0
- data/lib/qingcloud/sdk/service/router.rb +778 -0
- data/lib/qingcloud/sdk/service/security_group.rb +645 -0
- data/lib/qingcloud/sdk/service/shared_storage.rb +666 -0
- data/lib/qingcloud/sdk/service/snapshot.rb +283 -0
- data/lib/qingcloud/sdk/service/tag.rb +227 -0
- data/lib/qingcloud/sdk/service/user_data.rb +61 -0
- data/lib/qingcloud/sdk/service/volume.rb +296 -0
- data/lib/qingcloud/sdk/service/vxnet.rb +295 -0
- data/lib/qingcloud/sdk/version.rb +19 -5
- metadata +98 -29
- data/.gitignore +0 -13
- data/.rspec +0 -2
- data/.travis.yml +0 -3
- data/Rakefile +0 -6
- data/lib/qingcloud/sdk/iaas/connector.rb +0 -99
- data/lib/qingcloud/sdk/iaas/foundation.rb +0 -73
- data/lib/qingcloud/sdk/iaas/service.rb +0 -1274
- data/lib/qingcloud/sdk/template/config.json +0 -4
- data/lib/qingcloud/sdk/utility/file_manager.rb +0 -43
- data/lib/qingcloud/sdk/utility/json_parser.rb +0 -41
- data/lib/qingcloud/sdk/utility/logger.rb +0 -19
- data/qingcloud-sdk.gemspec +0 -31
@@ -1,7 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
# +-------------------------------------------------------------------------
|
2
|
+
# | Copyright (C) 2016 Yunify, Inc.
|
3
|
+
# +-------------------------------------------------------------------------
|
4
|
+
# | Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# | you may not use this work except in compliance with the License.
|
6
|
+
# | You may obtain a copy of the License in the LICENSE file, or at:
|
7
|
+
# |
|
8
|
+
# | http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
# |
|
10
|
+
# | Unless required by applicable law or agreed to in writing, software
|
11
|
+
# | distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# | See the License for the specific language governing permissions and
|
14
|
+
# | limitations under the License.
|
15
|
+
# +-------------------------------------------------------------------------
|
5
16
|
|
6
|
-
|
17
|
+
module QingCloud
|
18
|
+
module SDK
|
19
|
+
VERSION = '2.0.0-alpha.1'.freeze
|
20
|
+
end
|
7
21
|
end
|
metadata
CHANGED
@@ -1,88 +1,157 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qingcloud-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 2.0.0.pre.alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Yunify SDK Group
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.2.7
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.2.7
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: net-http-persistent
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.0.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.0.0
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: bundler
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
16
44
|
requirements:
|
17
45
|
- - "~>"
|
18
46
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
47
|
+
version: 1.13.2
|
20
48
|
type: :development
|
21
49
|
prerelease: false
|
22
50
|
version_requirements: !ruby/object:Gem::Requirement
|
23
51
|
requirements:
|
24
52
|
- - "~>"
|
25
53
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
54
|
+
version: 1.13.2
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: rake
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
59
|
- - "~>"
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
61
|
+
version: 11.3.0
|
34
62
|
type: :development
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
66
|
- - "~>"
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
68
|
+
version: 11.3.0
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: rspec
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
73
|
- - "~>"
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.
|
75
|
+
version: 3.5.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.5.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.12.0
|
48
90
|
type: :development
|
49
91
|
prerelease: false
|
50
92
|
version_requirements: !ruby/object:Gem::Requirement
|
51
93
|
requirements:
|
52
94
|
- - "~>"
|
53
95
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
55
|
-
|
96
|
+
version: 0.12.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.45.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.45.0
|
111
|
+
description: The official QingCloud SDK for Ruby programming language.
|
56
112
|
email:
|
57
|
-
-
|
113
|
+
- sdk_group@yunify.com
|
58
114
|
executables: []
|
59
115
|
extensions: []
|
60
116
|
extra_rdoc_files: []
|
61
117
|
files:
|
62
|
-
- ".gitignore"
|
63
|
-
- ".rspec"
|
64
|
-
- ".travis.yml"
|
65
118
|
- Gemfile
|
66
119
|
- LICENSE
|
67
120
|
- README.md
|
68
|
-
- Rakefile
|
69
121
|
- bin/console
|
70
122
|
- bin/setup
|
71
123
|
- lib/qingcloud/sdk.rb
|
124
|
+
- lib/qingcloud/sdk/general/config.rb
|
72
125
|
- lib/qingcloud/sdk/general/contract.rb
|
126
|
+
- lib/qingcloud/sdk/general/default/config.yaml
|
73
127
|
- lib/qingcloud/sdk/general/error.rb
|
74
|
-
- lib/qingcloud/sdk/
|
75
|
-
- lib/qingcloud/sdk/
|
76
|
-
- lib/qingcloud/sdk/
|
77
|
-
- lib/qingcloud/sdk/
|
78
|
-
- lib/qingcloud/sdk/
|
79
|
-
- lib/qingcloud/sdk/
|
80
|
-
- lib/qingcloud/sdk/
|
128
|
+
- lib/qingcloud/sdk/general/logger.rb
|
129
|
+
- lib/qingcloud/sdk/request/preprocessor.rb
|
130
|
+
- lib/qingcloud/sdk/request/request.rb
|
131
|
+
- lib/qingcloud/sdk/request/signer.rb
|
132
|
+
- lib/qingcloud/sdk/service/cache.rb
|
133
|
+
- lib/qingcloud/sdk/service/dns_alias.rb
|
134
|
+
- lib/qingcloud/sdk/service/eip.rb
|
135
|
+
- lib/qingcloud/sdk/service/image.rb
|
136
|
+
- lib/qingcloud/sdk/service/instance.rb
|
137
|
+
- lib/qingcloud/sdk/service/job.rb
|
138
|
+
- lib/qingcloud/sdk/service/key_pair.rb
|
139
|
+
- lib/qingcloud/sdk/service/load_balancer.rb
|
140
|
+
- lib/qingcloud/sdk/service/mongo.rb
|
141
|
+
- lib/qingcloud/sdk/service/qingcloud.rb
|
142
|
+
- lib/qingcloud/sdk/service/rdb.rb
|
143
|
+
- lib/qingcloud/sdk/service/router.rb
|
144
|
+
- lib/qingcloud/sdk/service/security_group.rb
|
145
|
+
- lib/qingcloud/sdk/service/shared_storage.rb
|
146
|
+
- lib/qingcloud/sdk/service/snapshot.rb
|
147
|
+
- lib/qingcloud/sdk/service/tag.rb
|
148
|
+
- lib/qingcloud/sdk/service/user_data.rb
|
149
|
+
- lib/qingcloud/sdk/service/volume.rb
|
150
|
+
- lib/qingcloud/sdk/service/vxnet.rb
|
81
151
|
- lib/qingcloud/sdk/version.rb
|
82
|
-
|
83
|
-
homepage: https://github.com/prettyxw/qingcloud-sdk-ruby
|
152
|
+
homepage: https://github.com/yunify/qingcloud-sdk-ruby
|
84
153
|
licenses:
|
85
|
-
-
|
154
|
+
- Apache-2.0
|
86
155
|
metadata:
|
87
156
|
allowed_push_host: https://rubygems.org
|
88
157
|
post_install_message:
|
@@ -91,17 +160,17 @@ require_paths:
|
|
91
160
|
- lib
|
92
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
93
162
|
requirements:
|
94
|
-
- - "
|
163
|
+
- - ">="
|
95
164
|
- !ruby/object:Gem::Version
|
96
165
|
version: 2.1.5
|
97
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
167
|
requirements:
|
99
|
-
- - "
|
168
|
+
- - ">"
|
100
169
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
170
|
+
version: 1.3.1
|
102
171
|
requirements: []
|
103
172
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.
|
173
|
+
rubygems_version: 2.6.7
|
105
174
|
signing_key:
|
106
175
|
specification_version: 4
|
107
176
|
summary: SDK for QingCloud
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
data/Rakefile
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
require 'cgi'
|
2
|
-
require 'openssl'
|
3
|
-
require 'base64'
|
4
|
-
require 'net/http'
|
5
|
-
|
6
|
-
module QingCloud
|
7
|
-
module SDK
|
8
|
-
module IaaS
|
9
|
-
|
10
|
-
class Connector
|
11
|
-
|
12
|
-
attr_accessor :access_key
|
13
|
-
attr_accessor :secret_key
|
14
|
-
|
15
|
-
def initialize(access_key, secret_key)
|
16
|
-
raise Error::ParameterError, 'Load API Key' unless access_key && access_key.length > 0
|
17
|
-
raise Error::ParameterError, 'Load API Key' unless secret_key && secret_key.length > 0
|
18
|
-
|
19
|
-
self.access_key = access_key
|
20
|
-
self.secret_key = secret_key
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.init(access_key, secret_key)
|
24
|
-
Connector.new access_key, secret_key
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.init_with_config_file
|
28
|
-
unless Utility.file_manager.read_config_file
|
29
|
-
Utility.file_manager.create_new_config_file
|
30
|
-
end
|
31
|
-
config_map = {}
|
32
|
-
content = Utility.file_manager.read_config_file
|
33
|
-
config_map = Utility.json_parser.decode content if content
|
34
|
-
Connector.new config_map['qy_access_key_id'], config_map['qy_secret_access_key']
|
35
|
-
end
|
36
|
-
|
37
|
-
def fetch(action, params={})
|
38
|
-
raise Error::ParameterError, 'Check API Request' unless action && action.length > 0
|
39
|
-
|
40
|
-
params.update(
|
41
|
-
action: action,
|
42
|
-
time_stamp: Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ'),
|
43
|
-
access_key_id: access_key,
|
44
|
-
version: 1,
|
45
|
-
signature_method: 'HmacSHA256',
|
46
|
-
signature_version: 1,
|
47
|
-
)
|
48
|
-
|
49
|
-
request_body = params.sort.map { |key, value|
|
50
|
-
if value.is_a? Array
|
51
|
-
if key.to_s.include? '_N_'
|
52
|
-
parts = key.to_s.split '_N_'
|
53
|
-
value.map { |v|
|
54
|
-
"#{CGI.escape parts[0].to_s}.#{value.index(v)+1}.#{CGI.escape parts[1].to_s}=#{CGI.escape v.to_s}"
|
55
|
-
}.join('&')
|
56
|
-
elsif key.to_s.include? '_N'
|
57
|
-
value.map { |v|
|
58
|
-
"#{CGI.escape key.to_s.gsub('_N', '').to_s}.#{value.index(v)+1}=#{CGI.escape v.to_s}"
|
59
|
-
}.join('&')
|
60
|
-
end
|
61
|
-
else
|
62
|
-
"#{CGI.escape key.to_s}=#{CGI.escape value.to_s}"
|
63
|
-
end
|
64
|
-
}.join('&')
|
65
|
-
|
66
|
-
signature = Base64.encode64(
|
67
|
-
OpenSSL::HMAC.digest(
|
68
|
-
OpenSSL::Digest.new('sha256'),
|
69
|
-
self.secret_key,
|
70
|
-
"GET\n/iaas/\n#{request_body}"
|
71
|
-
)
|
72
|
-
).strip
|
73
|
-
|
74
|
-
request_url = "#{Contract::IaaS_API_URL}#{request_body}&signature=#{CGI.escape signature}"
|
75
|
-
|
76
|
-
# Log
|
77
|
-
Utility.logger.info request_url
|
78
|
-
|
79
|
-
response = Net::HTTPResponse.new 1.1, 500, 'Error'
|
80
|
-
|
81
|
-
begin
|
82
|
-
response = Net::HTTP.get_response URI(request_url)
|
83
|
-
rescue
|
84
|
-
raise Error::NetworkError
|
85
|
-
end
|
86
|
-
|
87
|
-
raise Error::ServerError, response.code unless response.code == '200'
|
88
|
-
|
89
|
-
# Log
|
90
|
-
Utility.logger.info response.body
|
91
|
-
|
92
|
-
Utility.json_parser.decode response.body
|
93
|
-
end
|
94
|
-
|
95
|
-
end
|
96
|
-
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|
@@ -1,73 +0,0 @@
|
|
1
|
-
module QingCloud
|
2
|
-
module SDK
|
3
|
-
module IaaS
|
4
|
-
|
5
|
-
class Foundation
|
6
|
-
|
7
|
-
ERROR_CODE_MAP = {
|
8
|
-
1100 => 'Request Format Invalid',
|
9
|
-
1200 => 'Authentication Failed',
|
10
|
-
1300 => 'Request Expired',
|
11
|
-
1400 => 'Request Denied',
|
12
|
-
2100 => 'Resource Not Found',
|
13
|
-
2400 => 'Balance Insufficient',
|
14
|
-
2500 => 'Over Quota',
|
15
|
-
5000 => 'Internal Error',
|
16
|
-
5100 => 'Server Busy',
|
17
|
-
5200 => 'Resources Inadequate',
|
18
|
-
5300 => 'Server Updating',
|
19
|
-
}
|
20
|
-
|
21
|
-
attr_accessor :response
|
22
|
-
|
23
|
-
def initialize(connector)
|
24
|
-
@connector = connector
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
def fetch_response(action, params={})
|
30
|
-
|
31
|
-
params.map { |key, value|
|
32
|
-
params.delete key unless (value.is_a? Numeric) || (value && value.length > 0)
|
33
|
-
}
|
34
|
-
|
35
|
-
response_body = @connector.fetch action, params
|
36
|
-
|
37
|
-
raise Error::APIError, 'No Response Data Received' unless response_body['ret_code']
|
38
|
-
|
39
|
-
self.response = response_body
|
40
|
-
|
41
|
-
if response_body['ret_code'] != 0
|
42
|
-
raise Error::APIError, response_body['message'] || ERROR_CODE_MAP[response_body['ret_code']]
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def merge_maps(maps)
|
47
|
-
final = {}
|
48
|
-
maps.map { |map| final.merge! map }
|
49
|
-
final
|
50
|
-
end
|
51
|
-
|
52
|
-
def build_fetch(action_name)
|
53
|
-
"
|
54
|
-
fetch_response(
|
55
|
-
\"#{action_name}\",
|
56
|
-
eval('merge_maps(method(__method__).parameters.map { |_, p| {p.to_sym => eval(p.to_s)} })')
|
57
|
-
)
|
58
|
-
"
|
59
|
-
end
|
60
|
-
|
61
|
-
def build_fetch_match
|
62
|
-
"
|
63
|
-
fetch_response(
|
64
|
-
__method__.to_s.split('_').map{ |w| w.capitalize! }.join,
|
65
|
-
eval('merge_maps(method(__method__).parameters.map { |_, p| {p.to_sym => eval(p.to_s)} })')
|
66
|
-
)
|
67
|
-
"
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
@@ -1,1274 +0,0 @@
|
|
1
|
-
module QingCloud
|
2
|
-
module SDK
|
3
|
-
module IaaS
|
4
|
-
|
5
|
-
class Service < Foundation
|
6
|
-
|
7
|
-
def check_api_keys
|
8
|
-
begin
|
9
|
-
eval(build_fetch_match)
|
10
|
-
rescue Error::APIError
|
11
|
-
false
|
12
|
-
self.response['ret_code'] == 1200 ? false : true
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
# Instance
|
17
|
-
|
18
|
-
def describe_instances(
|
19
|
-
instances_N: [],
|
20
|
-
image_id_N: [],
|
21
|
-
instance_type_N: [],
|
22
|
-
status_N: [],
|
23
|
-
search_word: nil,
|
24
|
-
verbose: nil,
|
25
|
-
offset: nil,
|
26
|
-
limit: nil,
|
27
|
-
zone:)eval(build_fetch_match)
|
28
|
-
end
|
29
|
-
|
30
|
-
def run_instances(
|
31
|
-
image_id:,
|
32
|
-
instance_type: nil,
|
33
|
-
cpu: nil,
|
34
|
-
memory: nil,
|
35
|
-
count: 1,
|
36
|
-
instance_name: nil,
|
37
|
-
login_mode:,
|
38
|
-
login_keypair: nil,
|
39
|
-
login_passwd: nil,
|
40
|
-
vxnets_N: [],
|
41
|
-
security_group: nil,
|
42
|
-
volumes_N: [],
|
43
|
-
need_newsid: nil,
|
44
|
-
need_userdata: nil,
|
45
|
-
userdata_type: nil,
|
46
|
-
userdata_value: nil,
|
47
|
-
userdata_path: nil,
|
48
|
-
zone:)eval(build_fetch_match)
|
49
|
-
end
|
50
|
-
|
51
|
-
def terminate_instances(
|
52
|
-
instances_N:,
|
53
|
-
zone:)eval(build_fetch_match)
|
54
|
-
end
|
55
|
-
|
56
|
-
def start_instances(
|
57
|
-
instances_N:,
|
58
|
-
zone:)eval(build_fetch_match)
|
59
|
-
end
|
60
|
-
|
61
|
-
def stop_instances(
|
62
|
-
instances_N:,
|
63
|
-
force: nil,
|
64
|
-
zone:)eval(build_fetch_match)
|
65
|
-
end
|
66
|
-
|
67
|
-
def restart_instances(
|
68
|
-
instances_N:,
|
69
|
-
zone:)eval(build_fetch_match)
|
70
|
-
end
|
71
|
-
|
72
|
-
def reset_instances(
|
73
|
-
instances_N:,
|
74
|
-
login_mode:,
|
75
|
-
login_keypair: nil,
|
76
|
-
login_passwd: nil,
|
77
|
-
need_newsid: nil,
|
78
|
-
zone:)eval(build_fetch_match)
|
79
|
-
end
|
80
|
-
|
81
|
-
def resize_instances(
|
82
|
-
instances_N:,
|
83
|
-
instance_type: nil,
|
84
|
-
cpu: nil,
|
85
|
-
memory: nil,
|
86
|
-
zone: nil)eval(build_fetch_match)
|
87
|
-
end
|
88
|
-
|
89
|
-
def modify_instance_attributes(
|
90
|
-
instance:,
|
91
|
-
instance_name: nil,
|
92
|
-
description: nil,
|
93
|
-
zone:)eval(build_fetch_match)
|
94
|
-
end
|
95
|
-
|
96
|
-
# Volume
|
97
|
-
|
98
|
-
def describe_volumes(
|
99
|
-
volumes_N: [],
|
100
|
-
volume_type: nil,
|
101
|
-
status_N: [],
|
102
|
-
search_word: nil,
|
103
|
-
verbose: nil,
|
104
|
-
offset: nil,
|
105
|
-
limit: nil,
|
106
|
-
zone:)eval(build_fetch_match)
|
107
|
-
end
|
108
|
-
|
109
|
-
def create_volumes(
|
110
|
-
size:,
|
111
|
-
volume_name: nil,
|
112
|
-
volume_type: nil,
|
113
|
-
count: nil,
|
114
|
-
zone:)eval(build_fetch_match)
|
115
|
-
end
|
116
|
-
|
117
|
-
def delete_volumes(
|
118
|
-
volumes_N:,
|
119
|
-
zone:)eval(build_fetch_match)
|
120
|
-
end
|
121
|
-
|
122
|
-
def attach_volumes(
|
123
|
-
volumes_N:,
|
124
|
-
instance:,
|
125
|
-
zone:)eval(build_fetch_match)
|
126
|
-
end
|
127
|
-
|
128
|
-
def detach_volumes(
|
129
|
-
volumes_N:,
|
130
|
-
instance:,
|
131
|
-
zone:)eval(build_fetch_match)
|
132
|
-
end
|
133
|
-
|
134
|
-
def resize_volumes(
|
135
|
-
volumes_N:,
|
136
|
-
size:,
|
137
|
-
zone:)eval(build_fetch_match)
|
138
|
-
end
|
139
|
-
|
140
|
-
def modify_volume_attributes(
|
141
|
-
volume:,
|
142
|
-
volume_name: nil,
|
143
|
-
description: nil,
|
144
|
-
zone:)eval(build_fetch_match)
|
145
|
-
end
|
146
|
-
|
147
|
-
# VXNet
|
148
|
-
|
149
|
-
def describe_vxnets(
|
150
|
-
vxnets_N: [],
|
151
|
-
vxnet_type: nil,
|
152
|
-
search_word: nil,
|
153
|
-
verbose: nil,
|
154
|
-
offset: nil,
|
155
|
-
limit: nil,
|
156
|
-
zone:)eval(build_fetch_match)
|
157
|
-
end
|
158
|
-
|
159
|
-
def create_vxnets(
|
160
|
-
vxnet_name: nil,
|
161
|
-
vxnet_type:,
|
162
|
-
count: nil,
|
163
|
-
zone:)eval(build_fetch_match)
|
164
|
-
end
|
165
|
-
|
166
|
-
def delete_vxnets(
|
167
|
-
vxnets_N:,
|
168
|
-
zone:)eval(build_fetch_match)
|
169
|
-
end
|
170
|
-
|
171
|
-
def join_vxnets(
|
172
|
-
vxnet:,
|
173
|
-
instances_N:,
|
174
|
-
zone:)eval(build_fetch_match)
|
175
|
-
end
|
176
|
-
|
177
|
-
def leave_vxnets(
|
178
|
-
vxnet:,
|
179
|
-
instances_N:,
|
180
|
-
zone:)eval(build_fetch_match)
|
181
|
-
end
|
182
|
-
|
183
|
-
def modify_vxnet_attributes(
|
184
|
-
vxnet:,
|
185
|
-
vxnet_name: nil,
|
186
|
-
description: nil,
|
187
|
-
zone:)eval(build_fetch_match)
|
188
|
-
end
|
189
|
-
|
190
|
-
def describe_vxnet_instances(
|
191
|
-
vxnet:,
|
192
|
-
instances_N: [],
|
193
|
-
instance_type: nil,
|
194
|
-
status: nil,
|
195
|
-
image: nil,
|
196
|
-
offset: nil,
|
197
|
-
limit: nil,
|
198
|
-
zone:)eval(build_fetch_match)
|
199
|
-
end
|
200
|
-
|
201
|
-
# Router
|
202
|
-
|
203
|
-
def describe_routers(
|
204
|
-
routers_N: [],
|
205
|
-
status_N: [],
|
206
|
-
search_word: nil,
|
207
|
-
verbose: nil,
|
208
|
-
offset: nil,
|
209
|
-
limit: nil,
|
210
|
-
zone:)eval(build_fetch_match)
|
211
|
-
end
|
212
|
-
|
213
|
-
def create_routers(
|
214
|
-
router_name: nil,
|
215
|
-
router_type: nil,
|
216
|
-
count: nil,
|
217
|
-
security_group: nil,
|
218
|
-
zone:)eval(build_fetch_match)
|
219
|
-
end
|
220
|
-
|
221
|
-
def delete_routers(
|
222
|
-
routers_N:,
|
223
|
-
zone:)eval(build_fetch_match)
|
224
|
-
end
|
225
|
-
|
226
|
-
def update_routers(
|
227
|
-
routers_N:,
|
228
|
-
zone:)eval(build_fetch_match)
|
229
|
-
end
|
230
|
-
|
231
|
-
def power_off_routers(
|
232
|
-
routers_N:,
|
233
|
-
zone:)eval(build_fetch_match)
|
234
|
-
end
|
235
|
-
|
236
|
-
def power_on_routers(
|
237
|
-
routers_N:,
|
238
|
-
zone:)eval(build_fetch_match)
|
239
|
-
end
|
240
|
-
|
241
|
-
def join_routers(
|
242
|
-
vxnet:,
|
243
|
-
router:,
|
244
|
-
ip_network:,
|
245
|
-
features: nil,
|
246
|
-
zone:)eval(build_fetch_match)
|
247
|
-
end
|
248
|
-
|
249
|
-
def leave_routers(
|
250
|
-
vxnets_N:,
|
251
|
-
router:,
|
252
|
-
zone:)eval(build_fetch_match)
|
253
|
-
end
|
254
|
-
|
255
|
-
def modify_router_attributes(
|
256
|
-
router:,
|
257
|
-
eip: nil,
|
258
|
-
security_group: nil,
|
259
|
-
router_name: nil,
|
260
|
-
description: nil,
|
261
|
-
zone:)eval(build_fetch_match)
|
262
|
-
end
|
263
|
-
|
264
|
-
def describe_router_statics(
|
265
|
-
router_statics_N: [],
|
266
|
-
router: nil,
|
267
|
-
static_type: nil,
|
268
|
-
verbose: nil,
|
269
|
-
offset: nil,
|
270
|
-
limit: nil,
|
271
|
-
zone:)eval(build_fetch_match)
|
272
|
-
end
|
273
|
-
|
274
|
-
def add_router_statics(
|
275
|
-
router:,
|
276
|
-
statics_N_router_static_name: [],
|
277
|
-
statics_N_static_type:,
|
278
|
-
statics_N_val1:,
|
279
|
-
statics_N_val2: nil,
|
280
|
-
statics_N_val3: nil,
|
281
|
-
statics_N_val4: nil,
|
282
|
-
zone:)eval(build_fetch_match)
|
283
|
-
end
|
284
|
-
|
285
|
-
def modify_router_static_attributes(
|
286
|
-
router_static:,
|
287
|
-
router_static_name: nil,
|
288
|
-
val1: nil,
|
289
|
-
val2: nil,
|
290
|
-
val3: nil,
|
291
|
-
val4: nil,
|
292
|
-
val5: nil,
|
293
|
-
val6: nil,
|
294
|
-
zone:)eval(build_fetch_match)
|
295
|
-
end
|
296
|
-
|
297
|
-
def delete_router_statics(
|
298
|
-
router_statics_N:,
|
299
|
-
zone:)eval(build_fetch_match)
|
300
|
-
end
|
301
|
-
|
302
|
-
def describe_router_vxnets(
|
303
|
-
router: nil,
|
304
|
-
vxnet: nil,
|
305
|
-
verbose: nil,
|
306
|
-
offset: nil,
|
307
|
-
limit: nil,
|
308
|
-
zone:)eval(build_fetch_match)
|
309
|
-
end
|
310
|
-
|
311
|
-
# Eip
|
312
|
-
|
313
|
-
def describe_eips(
|
314
|
-
eips_N: [],
|
315
|
-
instance_id: nil,
|
316
|
-
status_N: [],
|
317
|
-
search_word: nil,
|
318
|
-
offset: nil,
|
319
|
-
limit: nil,
|
320
|
-
zone:)eval(build_fetch_match)
|
321
|
-
end
|
322
|
-
|
323
|
-
def allocate_eips(
|
324
|
-
bandwidth:,
|
325
|
-
billing_mode: nil,
|
326
|
-
eip_name: nil,
|
327
|
-
count: nil,
|
328
|
-
need_icp: nil,
|
329
|
-
zone:)eval(build_fetch_match)
|
330
|
-
end
|
331
|
-
|
332
|
-
def release_eips(
|
333
|
-
eips_N: [],
|
334
|
-
zone:)eval(build_fetch_match)
|
335
|
-
end
|
336
|
-
|
337
|
-
def associate_eips(
|
338
|
-
eip:,
|
339
|
-
instance:,
|
340
|
-
zone:)eval(build_fetch_match)
|
341
|
-
end
|
342
|
-
|
343
|
-
def dssociate_eips(
|
344
|
-
eips_N:,
|
345
|
-
zone:)eval(build_fetch_match)
|
346
|
-
end
|
347
|
-
|
348
|
-
def change_eips_bandwidth(
|
349
|
-
eips_N:,
|
350
|
-
bandwidth:,
|
351
|
-
zone:)eval(build_fetch_match)
|
352
|
-
end
|
353
|
-
|
354
|
-
def change_eips_billing_mode(
|
355
|
-
eips_N:,
|
356
|
-
billing_mode:,
|
357
|
-
zone:)eval(build_fetch_match)
|
358
|
-
end
|
359
|
-
|
360
|
-
def modify_eip_attributes(
|
361
|
-
eips:,
|
362
|
-
eip_name: nil,
|
363
|
-
description: nil,
|
364
|
-
zone:)eval(build_fetch_match)
|
365
|
-
end
|
366
|
-
|
367
|
-
# SecurityGroup
|
368
|
-
|
369
|
-
def describe_security_groups(
|
370
|
-
security_groups_N: [],
|
371
|
-
search_word: nil,
|
372
|
-
verbose: nil,
|
373
|
-
offset: nil,
|
374
|
-
limit: nil,
|
375
|
-
zone:)eval(build_fetch_match)
|
376
|
-
end
|
377
|
-
|
378
|
-
def create_security_group(
|
379
|
-
security_group_name: nil,
|
380
|
-
zone:)eval(build_fetch_match)
|
381
|
-
end
|
382
|
-
|
383
|
-
def delete_security_groups(
|
384
|
-
security_groups_N:,
|
385
|
-
zone:)eval(build_fetch_match)
|
386
|
-
end
|
387
|
-
|
388
|
-
def apply_security_group(
|
389
|
-
security_group:,
|
390
|
-
instances_N: [],
|
391
|
-
zone:)eval(build_fetch_match)
|
392
|
-
end
|
393
|
-
|
394
|
-
def modify_security_group_attributes(
|
395
|
-
security_group:,
|
396
|
-
security_group_name: nil,
|
397
|
-
description: nil,
|
398
|
-
zone:)eval(build_fetch_match)
|
399
|
-
end
|
400
|
-
|
401
|
-
def describe_security_group_rules(
|
402
|
-
security_group: nil,
|
403
|
-
security_group_rules_N: [],
|
404
|
-
direction: nil,
|
405
|
-
offset: nil,
|
406
|
-
limit: nil,
|
407
|
-
zone:)eval(build_fetch_match)
|
408
|
-
end
|
409
|
-
|
410
|
-
def add_security_group_rules(
|
411
|
-
security_group:,
|
412
|
-
rules_N_protocol:,
|
413
|
-
rules_N_priority:,
|
414
|
-
rules_N_security_group_rule_name: [],
|
415
|
-
rules_N_action: [],
|
416
|
-
rules_N_direction: [],
|
417
|
-
rules_N_val1: [],
|
418
|
-
rules_N_val2: [],
|
419
|
-
rules_N_val3: [],
|
420
|
-
zone:)eval(build_fetch_match)
|
421
|
-
end
|
422
|
-
|
423
|
-
def delete_security_group_rules(
|
424
|
-
security_group_rules_N:,
|
425
|
-
zone:)eval(build_fetch_match)
|
426
|
-
end
|
427
|
-
|
428
|
-
def modify_security_group_rule_attributes(
|
429
|
-
security_group_rule:,
|
430
|
-
security_group_rule_name: nil,
|
431
|
-
priority:,
|
432
|
-
zone:)eval(build_fetch_match)
|
433
|
-
end
|
434
|
-
|
435
|
-
# KeyPair
|
436
|
-
|
437
|
-
def describe_key_pairs(
|
438
|
-
keypairs_N: [],
|
439
|
-
instance_id: nil,
|
440
|
-
encrypt_method: nil,
|
441
|
-
search_word: nil,
|
442
|
-
verbose: nil,
|
443
|
-
offset: nil,
|
444
|
-
limit: nil,
|
445
|
-
zone:)eval(build_fetch_match)
|
446
|
-
end
|
447
|
-
|
448
|
-
def create_key_pairs(
|
449
|
-
keypair_name: nil,
|
450
|
-
mode: nil,
|
451
|
-
encrypt_method: nil,
|
452
|
-
public_key: nil,
|
453
|
-
zone:)eval(build_fetch_match)
|
454
|
-
end
|
455
|
-
|
456
|
-
def delete_key_pairs(
|
457
|
-
keypairs_N:,
|
458
|
-
zone:)eval(build_fetch_match)
|
459
|
-
end
|
460
|
-
|
461
|
-
def attach_key_pairs(
|
462
|
-
keypairs_N:,
|
463
|
-
instances_N:,
|
464
|
-
zone:)eval(build_fetch_match)
|
465
|
-
end
|
466
|
-
|
467
|
-
def detach_key_pairs(
|
468
|
-
keypairs_N:,
|
469
|
-
instances_N:,
|
470
|
-
zone:)eval(build_fetch_match)
|
471
|
-
end
|
472
|
-
|
473
|
-
def modify_key_pair_attributes(
|
474
|
-
keypair:,
|
475
|
-
keypair_name: nil,
|
476
|
-
description: nil,
|
477
|
-
zone:)eval(build_fetch_match)
|
478
|
-
end
|
479
|
-
|
480
|
-
# Image
|
481
|
-
|
482
|
-
def describe_images(
|
483
|
-
images_N: [],
|
484
|
-
processor_type: nil,
|
485
|
-
os_family: nil,
|
486
|
-
visibility: nil,
|
487
|
-
provider: nil,
|
488
|
-
status_N: [],
|
489
|
-
search_word: nil,
|
490
|
-
verbose: nil,
|
491
|
-
offset: nil,
|
492
|
-
limit: nil,
|
493
|
-
zone:)eval(build_fetch_match)
|
494
|
-
end
|
495
|
-
|
496
|
-
def capture_instance(
|
497
|
-
instance:,
|
498
|
-
image_name: nil,
|
499
|
-
zone:)eval(build_fetch_match)
|
500
|
-
end
|
501
|
-
|
502
|
-
def delete_images(
|
503
|
-
images_N:,
|
504
|
-
zone:)eval(build_fetch_match)
|
505
|
-
end
|
506
|
-
|
507
|
-
def modify_image_attributes(
|
508
|
-
image:,
|
509
|
-
image_name: nil,
|
510
|
-
description: nil,
|
511
|
-
zone:)eval(build_fetch_match)
|
512
|
-
end
|
513
|
-
|
514
|
-
# LoadBalancer
|
515
|
-
|
516
|
-
def create_load_balancer(
|
517
|
-
eips_N: [],
|
518
|
-
vxnet: nil,
|
519
|
-
private_ip: nil,
|
520
|
-
loadbalancer_type: nil,
|
521
|
-
loadbalancer_name: nil,
|
522
|
-
security_group: nil,
|
523
|
-
zone:)eval(build_fetch_match)
|
524
|
-
end
|
525
|
-
|
526
|
-
def describe_load_balancers(
|
527
|
-
loadbalancers_N: [],
|
528
|
-
status_N: [],
|
529
|
-
search_word: nil,
|
530
|
-
verbose: nil,
|
531
|
-
offset: nil,
|
532
|
-
limit: nil,
|
533
|
-
zone:)eval(build_fetch_match)
|
534
|
-
end
|
535
|
-
|
536
|
-
def delete_load_balancers(
|
537
|
-
loadbalancers_N:,
|
538
|
-
zone:)eval(build_fetch_match)
|
539
|
-
end
|
540
|
-
|
541
|
-
def modify_load_balancer_attributes(
|
542
|
-
loadbalancer:,
|
543
|
-
loadbalancer_name: nil,
|
544
|
-
security_group: nil,
|
545
|
-
description: nil,
|
546
|
-
private_ip: nil,
|
547
|
-
zone:)eval(build_fetch_match)
|
548
|
-
end
|
549
|
-
|
550
|
-
def start_load_balancers(
|
551
|
-
loadbalancers_N:,
|
552
|
-
zone:)eval(build_fetch_match)
|
553
|
-
end
|
554
|
-
|
555
|
-
def stop_load_balancers(
|
556
|
-
loadbalancers_N:,
|
557
|
-
zone:)eval(build_fetch_match)
|
558
|
-
end
|
559
|
-
|
560
|
-
def update_load_balancers(
|
561
|
-
loadbalancers_N:,
|
562
|
-
zone:)eval(build_fetch_match)
|
563
|
-
end
|
564
|
-
|
565
|
-
def resize_load_balancers(
|
566
|
-
loadbalancers_N:,
|
567
|
-
loadbalancer_type:,
|
568
|
-
zone:)eval(build_fetch_match)
|
569
|
-
end
|
570
|
-
|
571
|
-
def associate_eips_to_load_balancer(
|
572
|
-
eips_N:,
|
573
|
-
loadbalancer:,
|
574
|
-
zone:)eval(build_fetch_match)
|
575
|
-
end
|
576
|
-
|
577
|
-
def dissociate_eips_from_load_balancer(
|
578
|
-
eips_N:,
|
579
|
-
loadbalancer:,
|
580
|
-
zone:)eval(build_fetch_match)
|
581
|
-
end
|
582
|
-
|
583
|
-
def add_load_balancer_listeners(
|
584
|
-
loadbalancer:,
|
585
|
-
listeners_N_listener_port:,
|
586
|
-
listeners_N_listener_protocol:,
|
587
|
-
listeners_N_backend_protocol:,
|
588
|
-
listeners_N_loadbalancer_listener_name: [],
|
589
|
-
listeners_N_balance_mode: [],
|
590
|
-
listeners_N_session_sticky: [],
|
591
|
-
listeners_N_forwardfor: [],
|
592
|
-
listeners_N_healthy_check_method: [],
|
593
|
-
listeners_N_healthy_check_option: [],
|
594
|
-
listeners_N_listener_option: [],
|
595
|
-
zone:)eval(build_fetch_match)
|
596
|
-
end
|
597
|
-
|
598
|
-
def add_load_balancer_listeners(
|
599
|
-
loadbalancer_listeners_N: nil,
|
600
|
-
loadbalancer: nil,
|
601
|
-
verbose: nil,
|
602
|
-
offset: nil,
|
603
|
-
limit: nil,
|
604
|
-
zone:)eval(build_fetch_match)
|
605
|
-
end
|
606
|
-
|
607
|
-
def delete_load_balancer_listeners(
|
608
|
-
loadbalancer_listeners_N:,
|
609
|
-
zone:)eval(build_fetch_match)
|
610
|
-
end
|
611
|
-
|
612
|
-
def modify_load_balancer_listener_attributes(
|
613
|
-
loadbalancer_listener:,
|
614
|
-
loadbalancer_listener_name: nil,
|
615
|
-
balance_mode: nil,
|
616
|
-
session_sticky: nil,
|
617
|
-
forwardfor: nil,
|
618
|
-
healthy_check_method: nil,
|
619
|
-
healthy_check_option: nil,
|
620
|
-
listeners_N_listener_option: [],
|
621
|
-
zone:)eval(build_fetch_match)
|
622
|
-
end
|
623
|
-
|
624
|
-
def add_load_balancer_backends(
|
625
|
-
loadbalancer_listener:,
|
626
|
-
backends_N_resource_id:,
|
627
|
-
backends_N_loadbalancer_backend_name: [],
|
628
|
-
backends_N_port:,
|
629
|
-
backends_N_weight:,
|
630
|
-
listeners_N_listener_option: [],
|
631
|
-
zone:)eval(build_fetch_match)
|
632
|
-
end
|
633
|
-
|
634
|
-
def describe_load_balancer_backends(
|
635
|
-
loadbalancer_backends_N: [],
|
636
|
-
loadbalancer_listener: nil,
|
637
|
-
loadbalancer: nil,
|
638
|
-
verbose: nil,
|
639
|
-
offset: nil,
|
640
|
-
limit: nil,
|
641
|
-
zone:)eval(build_fetch_match)
|
642
|
-
end
|
643
|
-
|
644
|
-
def delete_load_balancer_backends(
|
645
|
-
loadbalancer_backends_N: [],
|
646
|
-
zone:)eval(build_fetch_match)
|
647
|
-
end
|
648
|
-
|
649
|
-
def modify_load_balancer_backend_attributes(
|
650
|
-
loadbalancer_backend:,
|
651
|
-
port: nil,
|
652
|
-
weight: nil,
|
653
|
-
disabled: nil,
|
654
|
-
loadbalancer_policy_id: nil,
|
655
|
-
zone:)eval(build_fetch_match)
|
656
|
-
end
|
657
|
-
|
658
|
-
# Monitor
|
659
|
-
|
660
|
-
def get_monitor(
|
661
|
-
resource:,
|
662
|
-
meters_N:,
|
663
|
-
step:,
|
664
|
-
start_time:,
|
665
|
-
end_time:,
|
666
|
-
zone:)eval(build_fetch_match)
|
667
|
-
end
|
668
|
-
|
669
|
-
def get_load_balancer_monitor(
|
670
|
-
resource:,
|
671
|
-
meters_N:,
|
672
|
-
step:,
|
673
|
-
start_time:,
|
674
|
-
end_time:,
|
675
|
-
zone:)eval(build_fetch_match)
|
676
|
-
end
|
677
|
-
|
678
|
-
def get_rdb_monitor(
|
679
|
-
resource:,
|
680
|
-
meters_N:,
|
681
|
-
step:,
|
682
|
-
start_time:,
|
683
|
-
end_time:,
|
684
|
-
zone:)eval(build_fetch 'GetRDBMonitor')
|
685
|
-
end
|
686
|
-
|
687
|
-
# Snapshot
|
688
|
-
|
689
|
-
def describe_snapshots(
|
690
|
-
snapshots_N: [],
|
691
|
-
resource_id: nil,
|
692
|
-
snapshot_type: nil,
|
693
|
-
status_N: [],
|
694
|
-
search_word: nil,
|
695
|
-
verbose: nil,
|
696
|
-
offset: nil,
|
697
|
-
limit: nil,
|
698
|
-
zone:)eval(build_fetch_match)
|
699
|
-
end
|
700
|
-
|
701
|
-
def create_snapshots(
|
702
|
-
resources_N:,
|
703
|
-
snapshot_name: nil,
|
704
|
-
is_full: nil,
|
705
|
-
zone:)eval(build_fetch_match)
|
706
|
-
end
|
707
|
-
|
708
|
-
def delete_snapshots(
|
709
|
-
snapshots_N:,
|
710
|
-
zone:)eval(build_fetch_match)
|
711
|
-
end
|
712
|
-
|
713
|
-
def apply_snapshots(
|
714
|
-
snapshots_N:,
|
715
|
-
zone:)eval(build_fetch_match)
|
716
|
-
end
|
717
|
-
|
718
|
-
def modify_snapshot_attributes(
|
719
|
-
snapshot:,
|
720
|
-
snapshot_name: nil,
|
721
|
-
description: nil,
|
722
|
-
zone:)eval(build_fetch_match)
|
723
|
-
end
|
724
|
-
|
725
|
-
def capture_instance_from_snapshot(
|
726
|
-
snapshot:,
|
727
|
-
image_name: nil,
|
728
|
-
zone:)eval(build_fetch_match)
|
729
|
-
end
|
730
|
-
|
731
|
-
def create_volume_from_snapshot(
|
732
|
-
snapshot:,
|
733
|
-
volume_name: nil,
|
734
|
-
zone:)eval(build_fetch_match)
|
735
|
-
end
|
736
|
-
|
737
|
-
# UserData
|
738
|
-
|
739
|
-
def upload_user_data_attachment(
|
740
|
-
attachment_content:,
|
741
|
-
attachment_name: nil,
|
742
|
-
zone:)eval(build_fetch_match)
|
743
|
-
end
|
744
|
-
|
745
|
-
# Job
|
746
|
-
|
747
|
-
def describe_jobs(
|
748
|
-
jobs_N: [],
|
749
|
-
status_N: [],
|
750
|
-
job_action: nil,
|
751
|
-
verbose: nil,
|
752
|
-
offset: nil,
|
753
|
-
limit: nil,
|
754
|
-
zone:)eval(build_fetch_match)
|
755
|
-
end
|
756
|
-
|
757
|
-
# Zone
|
758
|
-
|
759
|
-
def describe_zones(
|
760
|
-
zones_N: [],
|
761
|
-
status_N: [])eval(build_fetch_match)
|
762
|
-
end
|
763
|
-
|
764
|
-
# RemoteDataBase
|
765
|
-
|
766
|
-
def create_rdb(
|
767
|
-
vxnet:,
|
768
|
-
rdb_engine: nil,
|
769
|
-
engine_version: nil,
|
770
|
-
rdb_username:,
|
771
|
-
rdb_password:,
|
772
|
-
rdb_type:,
|
773
|
-
storage_size:,
|
774
|
-
rdb_name: nil,
|
775
|
-
description: nil,
|
776
|
-
auto_backup_time: nil,
|
777
|
-
zone:)eval(build_fetch 'CreateRDB')
|
778
|
-
end
|
779
|
-
|
780
|
-
def describe_rdbs(
|
781
|
-
rdbs_N: [],
|
782
|
-
status_N: [],
|
783
|
-
rdb_name: nil,
|
784
|
-
verbose: nil,
|
785
|
-
offset: nil,
|
786
|
-
limit: nil,
|
787
|
-
zone:)eval(build_fetch 'DescribeRDBs')
|
788
|
-
end
|
789
|
-
|
790
|
-
def delete_rdbs(
|
791
|
-
rdbs_N:,
|
792
|
-
zone:)eval(build_fetch 'DeleteRDBs')
|
793
|
-
end
|
794
|
-
|
795
|
-
def start_rdbs(
|
796
|
-
rdbs_N:,
|
797
|
-
zone:)eval(build_fetch 'StartRDBs')
|
798
|
-
end
|
799
|
-
|
800
|
-
def stop_rdbs(
|
801
|
-
rdbs_N:,
|
802
|
-
zone:)eval(build_fetch 'StopRDBs')
|
803
|
-
end
|
804
|
-
|
805
|
-
def resize_rdbs(
|
806
|
-
rdbs_N:,
|
807
|
-
rdb_type: nil,
|
808
|
-
storage_size: nil,
|
809
|
-
zone:)eval(build_fetch 'ResizeRDBs')
|
810
|
-
end
|
811
|
-
|
812
|
-
def rdbs_leave_vxnet(
|
813
|
-
rdbs_N:,
|
814
|
-
vxnet:,
|
815
|
-
zone:)eval(build_fetch 'RDBsLeaveVxnet')
|
816
|
-
end
|
817
|
-
|
818
|
-
def rdbs_join_vxnet(
|
819
|
-
rdbs_N:,
|
820
|
-
vxnet:,
|
821
|
-
zone:)eval(build_fetch 'RDBsJoinVxnet')
|
822
|
-
end
|
823
|
-
|
824
|
-
def create_rdb_from_snapshot(
|
825
|
-
vxnet:,
|
826
|
-
rdb_type:,
|
827
|
-
rdb_name: nil,
|
828
|
-
description: nil,
|
829
|
-
auto_backup_time: nil,
|
830
|
-
zone:)eval(build_fetch 'CreateRDBFromSnapshot')
|
831
|
-
end
|
832
|
-
|
833
|
-
# Mongo
|
834
|
-
|
835
|
-
def describe_mongo_nodes(
|
836
|
-
mongo:,
|
837
|
-
offset: nil,
|
838
|
-
limit: nil,
|
839
|
-
zone:)eval(build_fetch_match)
|
840
|
-
end
|
841
|
-
|
842
|
-
def describe_mongo_parameters(
|
843
|
-
mongo:,
|
844
|
-
offset: nil,
|
845
|
-
limit: nil,
|
846
|
-
zone:)eval(build_fetch_match)
|
847
|
-
end
|
848
|
-
|
849
|
-
def resize_mongos(
|
850
|
-
mongos_N:,
|
851
|
-
mongo_type: nil,
|
852
|
-
storage_size: nil,
|
853
|
-
zone:)eval(build_fetch_match)
|
854
|
-
end
|
855
|
-
|
856
|
-
def create_mongo(
|
857
|
-
vxnet:,
|
858
|
-
mongo_version: nil,
|
859
|
-
mongo_type:,
|
860
|
-
storage_size:,
|
861
|
-
mongo_name: nil,
|
862
|
-
description: nil,
|
863
|
-
auto_backup_time: nil,
|
864
|
-
private_ips: nil,
|
865
|
-
zone:)eval(build_fetch_match)
|
866
|
-
end
|
867
|
-
|
868
|
-
def stop_mongos(
|
869
|
-
mongos_N:,
|
870
|
-
zone:)eval(build_fetch_match)
|
871
|
-
end
|
872
|
-
|
873
|
-
def start_mongos(
|
874
|
-
mongos_N:,
|
875
|
-
zone:)eval(build_fetch_match)
|
876
|
-
end
|
877
|
-
|
878
|
-
def describe_mongos(
|
879
|
-
mongos_N: [],
|
880
|
-
status_N: [],
|
881
|
-
mongo_name: nil,
|
882
|
-
tags_N: [],
|
883
|
-
verbose: nil,
|
884
|
-
offset: nil,
|
885
|
-
limit: nil,
|
886
|
-
zone:)eval(build_fetch_match)
|
887
|
-
end
|
888
|
-
|
889
|
-
def delete_mongos(
|
890
|
-
mongos_N:,
|
891
|
-
zone:)eval(build_fetch_match)
|
892
|
-
end
|
893
|
-
|
894
|
-
def create_mongo_from_snapshot(
|
895
|
-
vxnet:,
|
896
|
-
mongo_type:,
|
897
|
-
mongo_name: nil,
|
898
|
-
description: nil,
|
899
|
-
auto_backup_time: nil,
|
900
|
-
zone:)eval(build_fetch_match)
|
901
|
-
end
|
902
|
-
|
903
|
-
def change_mongo_vxnet(
|
904
|
-
mongo:,
|
905
|
-
vxnet:,
|
906
|
-
private_ips: nil,
|
907
|
-
zone:)eval(build_fetch_match)
|
908
|
-
end
|
909
|
-
|
910
|
-
def add_mongo_instances(
|
911
|
-
mongo:,
|
912
|
-
node_count: nil,
|
913
|
-
private_ips: nil,
|
914
|
-
zone:)eval(build_fetch_match)
|
915
|
-
end
|
916
|
-
|
917
|
-
def remove_mongo_instances(
|
918
|
-
mongo:,
|
919
|
-
mongo_instances:,
|
920
|
-
zone:)eval(build_fetch_match)
|
921
|
-
end
|
922
|
-
|
923
|
-
def modify_mongo_attributes(
|
924
|
-
mongo:,
|
925
|
-
mongo_name: nil,
|
926
|
-
description: nil,
|
927
|
-
auto_backup_time: nil,
|
928
|
-
zone:)eval(build_fetch_match)
|
929
|
-
end
|
930
|
-
|
931
|
-
def modify_mongo_instances(
|
932
|
-
mongo:,
|
933
|
-
private_ips: nil,
|
934
|
-
zone:)eval(build_fetch_match)
|
935
|
-
end
|
936
|
-
|
937
|
-
def get_mongo_monitor(
|
938
|
-
resource:,
|
939
|
-
meters_N:,
|
940
|
-
step:,
|
941
|
-
start_time:,
|
942
|
-
end_time:,
|
943
|
-
zone:)eval(build_fetch_match)
|
944
|
-
end
|
945
|
-
|
946
|
-
# Cache
|
947
|
-
|
948
|
-
def describe_caches(
|
949
|
-
caches_N: [],
|
950
|
-
status_N: [],
|
951
|
-
search_word: nil,
|
952
|
-
tags_N: [],
|
953
|
-
verbose: nil,
|
954
|
-
offset: nil,
|
955
|
-
limit: nil,
|
956
|
-
zone:)eval(build_fetch_match)
|
957
|
-
end
|
958
|
-
|
959
|
-
def create_cache(
|
960
|
-
vxnet:,
|
961
|
-
cache_size:,
|
962
|
-
cache_type:,
|
963
|
-
node_count: nil,
|
964
|
-
cache_name: nil,
|
965
|
-
cache_parameter_group: nil,
|
966
|
-
private_ips_N_cache_role: [],
|
967
|
-
private_ips_N_private_ips: [],
|
968
|
-
zone:)eval(build_fetch_match)
|
969
|
-
end
|
970
|
-
|
971
|
-
def stop_caches(
|
972
|
-
caches_N:,
|
973
|
-
zone:)eval(build_fetch_match)
|
974
|
-
end
|
975
|
-
|
976
|
-
def start_caches(
|
977
|
-
caches_N:,
|
978
|
-
zone:)eval(build_fetch_match)
|
979
|
-
end
|
980
|
-
|
981
|
-
def restart_caches(
|
982
|
-
caches_N:,
|
983
|
-
zone:)eval(build_fetch_match)
|
984
|
-
end
|
985
|
-
|
986
|
-
def delete_caches(
|
987
|
-
caches_N:,
|
988
|
-
zone:)eval(build_fetch_match)
|
989
|
-
end
|
990
|
-
|
991
|
-
def resize_caches(
|
992
|
-
caches_N:,
|
993
|
-
cache_size:,
|
994
|
-
zone:)eval(build_fetch_match)
|
995
|
-
end
|
996
|
-
|
997
|
-
def update_cache(
|
998
|
-
cache:,
|
999
|
-
private_ips_N_cache_node_id: [],
|
1000
|
-
private_ips_N_private_ip: [],
|
1001
|
-
zone:)eval(build_fetch_match)
|
1002
|
-
end
|
1003
|
-
|
1004
|
-
def change_cache_vxnet(
|
1005
|
-
cache:,
|
1006
|
-
vxnet:,
|
1007
|
-
private_ips_N_cache_node_id: [],
|
1008
|
-
private_ips_N_private_ip: [],
|
1009
|
-
zone:)eval(build_fetch_match)
|
1010
|
-
end
|
1011
|
-
|
1012
|
-
def modify_cache_attributes(
|
1013
|
-
cache:,
|
1014
|
-
cache_name: nil,
|
1015
|
-
description: nil,
|
1016
|
-
zone:)eval(build_fetch_match)
|
1017
|
-
end
|
1018
|
-
|
1019
|
-
def describe_cache_nodes(
|
1020
|
-
cache: nil,
|
1021
|
-
cache_nodes_N: [],
|
1022
|
-
status_N: [],
|
1023
|
-
search_word: nil,
|
1024
|
-
verbose: nil,
|
1025
|
-
offset: nil,
|
1026
|
-
limit: nil,
|
1027
|
-
zone:)eval(build_fetch_match)
|
1028
|
-
end
|
1029
|
-
|
1030
|
-
def add_cache_nodes(
|
1031
|
-
cache:,
|
1032
|
-
node_count:,
|
1033
|
-
private_ips_N_cache_role: [],
|
1034
|
-
private_ips_N_private_ips: nil,
|
1035
|
-
zone:)eval(build_fetch_match)
|
1036
|
-
end
|
1037
|
-
|
1038
|
-
def delete_cache_nodes(
|
1039
|
-
cache:,
|
1040
|
-
cache_nodes_N:,
|
1041
|
-
zone:)eval(build_fetch_match)
|
1042
|
-
end
|
1043
|
-
|
1044
|
-
def restart_cache_nodes(
|
1045
|
-
cache:,
|
1046
|
-
cache_nodes_N:,
|
1047
|
-
zone:)eval(build_fetch_match)
|
1048
|
-
end
|
1049
|
-
|
1050
|
-
def modify_cache_node_attributes(
|
1051
|
-
cache_node:,
|
1052
|
-
cache_node_name: nil,
|
1053
|
-
zone:)eval(build_fetch_match)
|
1054
|
-
end
|
1055
|
-
|
1056
|
-
def create_cache_from_snapshot(
|
1057
|
-
snapshot:,
|
1058
|
-
vxnet:,
|
1059
|
-
node_count: nil,
|
1060
|
-
cache_name: nil,
|
1061
|
-
cache_parameter_group: nil,
|
1062
|
-
private_ips_N_cache_role: [],
|
1063
|
-
private_ips_N_private_ips: [],
|
1064
|
-
zone:)eval(build_fetch_match)
|
1065
|
-
end
|
1066
|
-
|
1067
|
-
def describe_cache_parameter_groups(
|
1068
|
-
cache_parameter_groups_N: [],
|
1069
|
-
cache_type: nil,
|
1070
|
-
search_word: nil,
|
1071
|
-
verbose: nil,
|
1072
|
-
offset: nil,
|
1073
|
-
limit: nil,
|
1074
|
-
zone:)eval(build_fetch_match)
|
1075
|
-
end
|
1076
|
-
|
1077
|
-
def create_cache_parameter_group(
|
1078
|
-
cache_type:,
|
1079
|
-
cache_parameter_group_name: nil,
|
1080
|
-
zone:)eval(build_fetch_match)
|
1081
|
-
end
|
1082
|
-
|
1083
|
-
def apply_cache_parameter_group(
|
1084
|
-
cache_parameter_group:,
|
1085
|
-
caches_N: [],
|
1086
|
-
zone:)eval(build_fetch_match)
|
1087
|
-
end
|
1088
|
-
|
1089
|
-
def delete_cache_parameter_groups(
|
1090
|
-
cache_parameter_groups_N:,
|
1091
|
-
zone:)eval(build_fetch_match)
|
1092
|
-
end
|
1093
|
-
|
1094
|
-
def modify_cache_parameter_group_attributes(
|
1095
|
-
cache_parameter_group:,
|
1096
|
-
cache_parameter_group_name: nil,
|
1097
|
-
description: nil,
|
1098
|
-
zone:)eval(build_fetch_match)
|
1099
|
-
end
|
1100
|
-
|
1101
|
-
def describe_cache_parameters(
|
1102
|
-
cache_parameter_group:,
|
1103
|
-
zone:)eval(build_fetch_match)
|
1104
|
-
end
|
1105
|
-
|
1106
|
-
def update_cache_parameters(
|
1107
|
-
cache_parameter_group:,
|
1108
|
-
parameters_N_cache_parameter_name:,
|
1109
|
-
parameters_N_cache_parameter_value:,
|
1110
|
-
zone:)eval(build_fetch_match)
|
1111
|
-
end
|
1112
|
-
|
1113
|
-
def reset_cache_parameters(
|
1114
|
-
cache_parameter_group:,
|
1115
|
-
cache_parameter_names_N: [],
|
1116
|
-
zone:)eval(build_fetch_match)
|
1117
|
-
end
|
1118
|
-
|
1119
|
-
# S2
|
1120
|
-
|
1121
|
-
def create_s2_server(
|
1122
|
-
vxnet_id:,
|
1123
|
-
service_type:,
|
1124
|
-
name: nil,
|
1125
|
-
s2_server_type: nil,
|
1126
|
-
private_ip: nil,
|
1127
|
-
description: nil,
|
1128
|
-
zone:)eval(build_fetch_match)
|
1129
|
-
end
|
1130
|
-
|
1131
|
-
def describe_s2_servers(
|
1132
|
-
s2_servers_N: [],
|
1133
|
-
status_N: [],
|
1134
|
-
search_word: nil,
|
1135
|
-
tags_N: nil,
|
1136
|
-
verbose: nil,
|
1137
|
-
offset: nil,
|
1138
|
-
limit: nil,
|
1139
|
-
zone:)eval(build_fetch_match)
|
1140
|
-
end
|
1141
|
-
|
1142
|
-
def modify_s2_server(
|
1143
|
-
s2_server:,
|
1144
|
-
name: nil,
|
1145
|
-
description: nil,
|
1146
|
-
zone:)eval(build_fetch_match)
|
1147
|
-
end
|
1148
|
-
|
1149
|
-
def resize_s2_servers(
|
1150
|
-
s2_server:,
|
1151
|
-
s2_server_type:,
|
1152
|
-
zone:)eval(build_fetch_match)
|
1153
|
-
end
|
1154
|
-
|
1155
|
-
def delete_s2_servers(
|
1156
|
-
s2servers_N:,
|
1157
|
-
zone:)eval(build_fetch_match)
|
1158
|
-
end
|
1159
|
-
|
1160
|
-
def power_on_s2_servers(
|
1161
|
-
s2_servers_N:,
|
1162
|
-
zone:)eval(build_fetch_match)
|
1163
|
-
end
|
1164
|
-
|
1165
|
-
def power_off_s2_servers(
|
1166
|
-
s2_servers_N:,
|
1167
|
-
zone:)eval(build_fetch_match)
|
1168
|
-
end
|
1169
|
-
|
1170
|
-
def update_s2_servers(
|
1171
|
-
s2_servers_N:,
|
1172
|
-
zone:)eval(build_fetch_match)
|
1173
|
-
end
|
1174
|
-
|
1175
|
-
def change_s2_server_vxnet(
|
1176
|
-
s2_server:,
|
1177
|
-
vxnet:,
|
1178
|
-
private_ip: nil,
|
1179
|
-
zone:)eval(build_fetch_match)
|
1180
|
-
end
|
1181
|
-
|
1182
|
-
def create_s2_shared_target(
|
1183
|
-
s2_server:,
|
1184
|
-
export_name:,
|
1185
|
-
target_type:,
|
1186
|
-
description: nil,
|
1187
|
-
volumes_N: [],
|
1188
|
-
initiator_names_N: [],
|
1189
|
-
zone:)eval(build_fetch_match)
|
1190
|
-
end
|
1191
|
-
|
1192
|
-
def describe_s2_shared_targets(
|
1193
|
-
shared_targets_N: [],
|
1194
|
-
s2_server_id: nil,
|
1195
|
-
search_word: nil,
|
1196
|
-
verbose: nil,
|
1197
|
-
offset: nil,
|
1198
|
-
limit: nil,
|
1199
|
-
zone:)eval(build_fetch_match)
|
1200
|
-
end
|
1201
|
-
|
1202
|
-
def delete_s2_shared_targets(
|
1203
|
-
shared_targets_N:,
|
1204
|
-
zone:)eval(build_fetch_match)
|
1205
|
-
end
|
1206
|
-
|
1207
|
-
def enable_s2_shared_targets(
|
1208
|
-
shared_targets_N:,
|
1209
|
-
zone:)eval(build_fetch_match)
|
1210
|
-
end
|
1211
|
-
|
1212
|
-
def disable_s2_shared_targets(
|
1213
|
-
shared_targets_N:,
|
1214
|
-
zone:)eval(build_fetch_match)
|
1215
|
-
end
|
1216
|
-
|
1217
|
-
def modify_s2_shared_targets(
|
1218
|
-
shared_targets_N:,
|
1219
|
-
operation:,
|
1220
|
-
initiator_names_N:,
|
1221
|
-
zone:)eval(build_fetch_match)
|
1222
|
-
end
|
1223
|
-
|
1224
|
-
def attach_to_s2_shared_target(
|
1225
|
-
shared_target:,
|
1226
|
-
volumes_N:,
|
1227
|
-
zone:)eval(build_fetch_match)
|
1228
|
-
end
|
1229
|
-
|
1230
|
-
def detach_from_s2_shared_target(
|
1231
|
-
shared_target:,
|
1232
|
-
volumes_N:,
|
1233
|
-
zone:)eval(build_fetch_match)
|
1234
|
-
end
|
1235
|
-
|
1236
|
-
def describe_s2_default_parameters(
|
1237
|
-
service_type:,
|
1238
|
-
target_type:,
|
1239
|
-
offset:,
|
1240
|
-
limit:,
|
1241
|
-
zone:)eval(build_fetch_match)
|
1242
|
-
end
|
1243
|
-
|
1244
|
-
# Spark
|
1245
|
-
|
1246
|
-
def add_spark_nodes(
|
1247
|
-
spark:,
|
1248
|
-
node_count:,
|
1249
|
-
spark_node_name: nil,
|
1250
|
-
private_ips_N_role: [],
|
1251
|
-
private_ips_N_private_ips: [],
|
1252
|
-
zone:)eval(build_fetch_match)
|
1253
|
-
end
|
1254
|
-
|
1255
|
-
def delete_spark_nodes(
|
1256
|
-
spark:,
|
1257
|
-
spark_nodes_N:,
|
1258
|
-
zone:)eval(build_fetch_match)
|
1259
|
-
end
|
1260
|
-
|
1261
|
-
def start_sparks(
|
1262
|
-
sparks_N:,
|
1263
|
-
zone:)eval(build_fetch_match)
|
1264
|
-
end
|
1265
|
-
|
1266
|
-
def stop_sparks(
|
1267
|
-
sparks_N:,
|
1268
|
-
zone:)eval(build_fetch_match)
|
1269
|
-
end
|
1270
|
-
end
|
1271
|
-
|
1272
|
-
end
|
1273
|
-
end
|
1274
|
-
end
|