qingcloud-sdk 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -14
- data/lib/qingcloud/sdk.rb +3 -3
- data/lib/qingcloud/sdk/general/contract.rb +5 -4
- data/lib/qingcloud/sdk/{client → iaas}/connector.rb +5 -2
- data/lib/qingcloud/sdk/{client → iaas}/foundation.rb +1 -1
- data/lib/qingcloud/sdk/{client → iaas}/service.rb +438 -1
- data/lib/qingcloud/sdk/template/{qingcloud.json → config.json} +0 -0
- data/lib/qingcloud/sdk/version.rb +1 -1
- data/qingcloud-sdk.gemspec +1 -1
- metadata +8 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64d5a78c501068c1c208197bd6498d637aad197a
|
4
|
+
data.tar.gz: 159afd08dbf521cdd548ef62721a2727fea72c50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12dc6d5ee2c4a594e3a4b5b7bf4c2f48176b9d25a6a751980cf706e403244cfea0c7c1b29d6f7ad94ec882b0f7a7bfac63090cad67a13c5d518d429a1bf4c243
|
7
|
+
data.tar.gz: 06659021062f813a951900940a69df5f09f0338bdb366c905892a5dfdb4da73391e63dbb7bd0c724eff9c39b6af37b509385a5987b01bbf2773fb99f1eb31204
|
data/README.md
CHANGED
@@ -12,15 +12,11 @@ SDK for QingCloud
|
|
12
12
|
|
13
13
|
Add this line to your application's Gemfile:
|
14
14
|
|
15
|
-
|
16
|
-
gem 'qingcloud-sdk'
|
17
|
-
```
|
15
|
+
gem 'qingcloud-sdk'
|
18
16
|
|
19
17
|
or
|
20
18
|
|
21
|
-
|
22
|
-
gem 'qingcloud-sdk', git: 'https://github.com/prettyxw/qingcloud-sdk-ruby'
|
23
|
-
```
|
19
|
+
gem 'qingcloud-sdk', git: 'https://github.com/prettyxw/qingcloud-sdk-ruby'
|
24
20
|
|
25
21
|
And then execute:
|
26
22
|
|
@@ -52,10 +48,12 @@ Using gem to remove this package:
|
|
52
48
|
|
53
49
|
Example:
|
54
50
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
51
|
+
```ruby
|
52
|
+
Action: "DescribeInstances" -> "describe_instances"
|
53
|
+
Parameter: "zone" -> "zone"
|
54
|
+
Array Parameter: "instances.n" -> "instances_N"
|
55
|
+
Array Parameter: "statics.n.static_type" -> "statics_N_static_type"
|
56
|
+
```
|
59
57
|
|
60
58
|
## Getting Started
|
61
59
|
|
@@ -68,10 +66,10 @@ require 'qingcloud/sdk'
|
|
68
66
|
|
69
67
|
# Create Connection and Service
|
70
68
|
|
71
|
-
connector = QingCloud::SDK::
|
72
|
-
|
69
|
+
connector = QingCloud::SDK::IaaS::Connector.init 'qy_access_key_id',
|
70
|
+
'qy_secret_access_key'
|
73
71
|
|
74
|
-
service = QingCloud::SDK::
|
72
|
+
service = QingCloud::SDK::IaaS::Service.new connector
|
75
73
|
|
76
74
|
# Describe Instances
|
77
75
|
|
@@ -87,7 +85,7 @@ service.run_instances image_id: 'centos7x64b',
|
|
87
85
|
login_mode: 'keypair',
|
88
86
|
login_keypair: 'keypair-id',
|
89
87
|
zone: 'ap1'
|
90
|
-
|
88
|
+
|
91
89
|
puts service.response
|
92
90
|
|
93
91
|
# Terminate Instances
|
data/lib/qingcloud/sdk.rb
CHANGED
@@ -10,6 +10,6 @@ require 'qingcloud/sdk/utility/file_manager'
|
|
10
10
|
require 'qingcloud/sdk/utility/json_parser'
|
11
11
|
|
12
12
|
# Client
|
13
|
-
require 'qingcloud/sdk/
|
14
|
-
require 'qingcloud/sdk/
|
15
|
-
require 'qingcloud/sdk/
|
13
|
+
require 'qingcloud/sdk/iaas/connector'
|
14
|
+
require 'qingcloud/sdk/iaas/foundation'
|
15
|
+
require 'qingcloud/sdk/iaas/service'
|
@@ -3,16 +3,17 @@ module QingCloud
|
|
3
3
|
module Contract
|
4
4
|
|
5
5
|
SUPPORT_DIRECTORY = "#{Dir.home}/.qingcloud"
|
6
|
-
CONFIG_FILE_NAME = '
|
6
|
+
CONFIG_FILE_NAME = 'config.json'
|
7
7
|
CONFIG_FILE_PATH = "#{SUPPORT_DIRECTORY}/#{CONFIG_FILE_NAME}"
|
8
|
-
LOG_FILE_NAME = '
|
8
|
+
LOG_FILE_NAME = 'access.log'
|
9
9
|
LOG_FILE_PATH = "#{SUPPORT_DIRECTORY}/#{LOG_FILE_NAME}"
|
10
10
|
|
11
11
|
TEMPLATE_DIRECTORY = Gem::Specification.find_by_name('qingcloud-sdk').gem_dir + '/lib/qingcloud/sdk/template'
|
12
|
-
TEMPLATE_CONFIG_FILE_NAME = '
|
12
|
+
TEMPLATE_CONFIG_FILE_NAME = 'config.json'
|
13
13
|
TEMPLATE_CONFIG_FILE_PATH = "#{TEMPLATE_DIRECTORY}/#{TEMPLATE_CONFIG_FILE_NAME}"
|
14
14
|
|
15
|
-
API_URL = 'https://api.qingcloud.com
|
15
|
+
API_URL = 'https://api.qingcloud.com'
|
16
|
+
IaaS_API_URL = "#{API_URL}/iaas/?"
|
16
17
|
|
17
18
|
end
|
18
19
|
end
|
@@ -5,7 +5,7 @@ require 'net/http'
|
|
5
5
|
|
6
6
|
module QingCloud
|
7
7
|
module SDK
|
8
|
-
module
|
8
|
+
module IaaS
|
9
9
|
|
10
10
|
class Connector
|
11
11
|
|
@@ -25,6 +25,9 @@ module QingCloud
|
|
25
25
|
end
|
26
26
|
|
27
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
|
28
31
|
config_map = {}
|
29
32
|
content = Utility.file_manager.read_config_file
|
30
33
|
config_map = Utility.json_parser.decode content if content
|
@@ -68,7 +71,7 @@ module QingCloud
|
|
68
71
|
)
|
69
72
|
).strip
|
70
73
|
|
71
|
-
request_url = "#{Contract::
|
74
|
+
request_url = "#{Contract::IaaS_API_URL}#{request_body}&signature=#{CGI.escape signature}"
|
72
75
|
|
73
76
|
# Log
|
74
77
|
Utility.logger.info request_url
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module QingCloud
|
2
2
|
module SDK
|
3
|
-
module
|
3
|
+
module IaaS
|
4
4
|
|
5
5
|
class Service < Foundation
|
6
6
|
|
@@ -830,6 +830,443 @@ module QingCloud
|
|
830
830
|
zone:)eval(build_fetch 'CreateRDBFromSnapshot')
|
831
831
|
end
|
832
832
|
|
833
|
+
# Mongo
|
834
|
+
|
835
|
+
def describe_mongo_nodes(
|
836
|
+
mongo:,
|
837
|
+
offset: nil,
|
838
|
+
limit: nil,
|
839
|
+
zone:)eval(build_fetch 'DescribeMongoNodes')
|
840
|
+
end
|
841
|
+
|
842
|
+
def describe_mongo_parameters(
|
843
|
+
mongo:,
|
844
|
+
offset: nil,
|
845
|
+
limit: nil,
|
846
|
+
zone:)eval(build_fetch 'DescribeMongoParameters')
|
847
|
+
end
|
848
|
+
|
849
|
+
def resize_mongos(
|
850
|
+
mongos_N:,
|
851
|
+
mongo_type: nil,
|
852
|
+
storage_size: nil,
|
853
|
+
zone:)eval(build_fetch 'ResizeMongos')
|
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 'CreateMongo')
|
866
|
+
end
|
867
|
+
|
868
|
+
def stop_mongos(
|
869
|
+
mongos_N:,
|
870
|
+
zone:)eval(build_fetch 'StopMongos')
|
871
|
+
end
|
872
|
+
|
873
|
+
def start_mongos(
|
874
|
+
mongos_N:,
|
875
|
+
zone:)eval(build_fetch 'StartMongos')
|
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 'DescribeMongos')
|
887
|
+
end
|
888
|
+
|
889
|
+
def delete_mongos(
|
890
|
+
mongos_N:,
|
891
|
+
zone:)eval(build_fetch 'DeleteMongos')
|
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 'CreateMongoFromSnapshot')
|
901
|
+
end
|
902
|
+
|
903
|
+
def change_mongo_vxnet(
|
904
|
+
mongo:,
|
905
|
+
vxnet:,
|
906
|
+
private_ips: nil,
|
907
|
+
zone:)eval(build_fetch 'ChangeMongoVxnet')
|
908
|
+
end
|
909
|
+
|
910
|
+
def add_mongo_instances(
|
911
|
+
mongo:,
|
912
|
+
node_count: nil,
|
913
|
+
private_ips: nil,
|
914
|
+
zone:)eval(build_fetch 'AddMongoInstances')
|
915
|
+
end
|
916
|
+
|
917
|
+
def remove_mongo_instances(
|
918
|
+
mongo:,
|
919
|
+
mongo_instances:,
|
920
|
+
zone:)eval(build_fetch 'RemoveMongoInstances')
|
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 'ModifyMongoAttributes')
|
929
|
+
end
|
930
|
+
|
931
|
+
def modify_mongo_instances(
|
932
|
+
mongo:,
|
933
|
+
private_ips: nil,
|
934
|
+
zone:)eval(build_fetch 'ModifyMongoInstances')
|
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 'GetMongoMonitor')
|
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 'DescribeCaches')
|
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 'CreateCache')
|
969
|
+
end
|
970
|
+
|
971
|
+
def stop_caches(
|
972
|
+
caches_N:,
|
973
|
+
zone:)eval(build_fetch 'StopCaches')
|
974
|
+
end
|
975
|
+
|
976
|
+
def start_caches(
|
977
|
+
caches_N:,
|
978
|
+
zone:)eval(build_fetch 'StartCaches')
|
979
|
+
end
|
980
|
+
|
981
|
+
def restart_caches(
|
982
|
+
caches_N:,
|
983
|
+
zone:)eval(build_fetch 'RestartCaches')
|
984
|
+
end
|
985
|
+
|
986
|
+
def delete_caches(
|
987
|
+
caches_N:,
|
988
|
+
zone:)eval(build_fetch 'DeleteCaches')
|
989
|
+
end
|
990
|
+
|
991
|
+
def resize_caches(
|
992
|
+
caches_N:,
|
993
|
+
cache_size:,
|
994
|
+
zone:)eval(build_fetch 'ResizeCaches')
|
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 'UpdateCache')
|
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 'ChangeCacheVxnet')
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
def modify_cache_attributes(
|
1013
|
+
cache:,
|
1014
|
+
cache_name: nil,
|
1015
|
+
description: nil,
|
1016
|
+
zone:)eval(build_fetch 'ModifyCacheAttributes')
|
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 'DescribeCacheNodes')
|
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 'AddCacheNodes')
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
def delete_cache_nodes(
|
1039
|
+
cache:,
|
1040
|
+
cache_nodes_N:,
|
1041
|
+
zone:)eval(build_fetch 'DeleteCacheNodes')
|
1042
|
+
end
|
1043
|
+
|
1044
|
+
def restart_cache_nodes(
|
1045
|
+
cache:,
|
1046
|
+
cache_nodes_N:,
|
1047
|
+
zone:)eval(build_fetch 'RestartCacheNodes')
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
def modify_cache_node_attributes(
|
1051
|
+
cache_node:,
|
1052
|
+
cache_node_name: nil,
|
1053
|
+
zone:)eval(build_fetch 'ModifyCacheNodeAttributes')
|
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 'CreateCacheFromSnapshot')
|
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 'DescribeCacheParameterGroups')
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
def create_cache_parameter_group(
|
1078
|
+
cache_type:,
|
1079
|
+
cache_parameter_group_name: nil,
|
1080
|
+
zone:)eval(build_fetch 'CreateCacheParameterGroup')
|
1081
|
+
end
|
1082
|
+
|
1083
|
+
def apply_cache_parameter_group(
|
1084
|
+
cache_parameter_group:,
|
1085
|
+
caches_N: [],
|
1086
|
+
zone:)eval(build_fetch 'ApplyCacheParameterGroup')
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
def delete_cache_parameter_groups(
|
1090
|
+
cache_parameter_groups_N:,
|
1091
|
+
zone:)eval(build_fetch 'DeleteCacheParameterGroups')
|
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 'ModifyCacheParameterGroupAttributes')
|
1099
|
+
end
|
1100
|
+
|
1101
|
+
def describe_cache_parameters(
|
1102
|
+
cache_parameter_group:,
|
1103
|
+
zone:)eval(build_fetch 'DescribeCacheParameters')
|
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 'UpdateCacheParameters')
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
def reset_cache_parameters(
|
1114
|
+
cache_parameter_group:,
|
1115
|
+
cache_parameter_names_N: [],
|
1116
|
+
zone:)eval(build_fetch 'ResetCacheParameters')
|
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 'CreateS2Server')
|
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 'DescribeS2Servers')
|
1140
|
+
end
|
1141
|
+
|
1142
|
+
def modify_s2_server(
|
1143
|
+
s2_server:,
|
1144
|
+
name: nil,
|
1145
|
+
description: nil,
|
1146
|
+
zone:)eval(build_fetch 'ModifyS2Server')
|
1147
|
+
end
|
1148
|
+
|
1149
|
+
def resize_s2_servers(
|
1150
|
+
s2_server:,
|
1151
|
+
s2_server_type:,
|
1152
|
+
zone:)eval(build_fetch 'ResizeS2Servers')
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
def delete_s2_servers(
|
1156
|
+
s2servers_N:,
|
1157
|
+
zone:)eval(build_fetch 'DeleteS2Servers')
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
def power_on_s2_servers(
|
1161
|
+
s2_servers_N:,
|
1162
|
+
zone:)eval(build_fetch 'PowerOnS2Servers')
|
1163
|
+
end
|
1164
|
+
|
1165
|
+
def power_off_s2_servers(
|
1166
|
+
s2_servers_N:,
|
1167
|
+
zone:)eval(build_fetch 'PowerOffS2Servers')
|
1168
|
+
end
|
1169
|
+
|
1170
|
+
def update_s2_servers(
|
1171
|
+
s2_servers_N:,
|
1172
|
+
zone:)eval(build_fetch 'UpdateS2Servers')
|
1173
|
+
end
|
1174
|
+
|
1175
|
+
def change_s2_server_vxnet(
|
1176
|
+
s2_server:,
|
1177
|
+
vxnet:,
|
1178
|
+
private_ip: nil,
|
1179
|
+
zone:)eval(build_fetch 'ChangeS2ServerVxnet')
|
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 'CreateS2SharedTarget')
|
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 'DescribeS2SharedTargets')
|
1200
|
+
end
|
1201
|
+
|
1202
|
+
def delete_s2_shared_targets(
|
1203
|
+
shared_targets_N:,
|
1204
|
+
zone:)eval(build_fetch 'DeleteS2SharedTargets')
|
1205
|
+
end
|
1206
|
+
|
1207
|
+
def enable_s2_shared_targets(
|
1208
|
+
shared_targets_N:,
|
1209
|
+
zone:)eval(build_fetch 'EnableS2SharedTargets')
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
def disable_s2_shared_targets(
|
1213
|
+
shared_targets_N:,
|
1214
|
+
zone:)eval(build_fetch 'DisableS2SharedTargets')
|
1215
|
+
end
|
1216
|
+
|
1217
|
+
def modify_s2_shared_targets(
|
1218
|
+
shared_targets_N:,
|
1219
|
+
operation:,
|
1220
|
+
initiator_names_N:,
|
1221
|
+
zone:)eval(build_fetch 'ModifyS2SharedTargets')
|
1222
|
+
end
|
1223
|
+
|
1224
|
+
def attach_to_s2_shared_target(
|
1225
|
+
shared_target:,
|
1226
|
+
volumes_N:,
|
1227
|
+
zone:)eval(build_fetch 'AttachToS2SharedTarget')
|
1228
|
+
end
|
1229
|
+
|
1230
|
+
def detach_from_s2_shared_target(
|
1231
|
+
shared_target:,
|
1232
|
+
volumes_N:,
|
1233
|
+
zone:)eval(build_fetch 'DetachFromS2SharedTarget')
|
1234
|
+
end
|
1235
|
+
|
1236
|
+
def describe_s2_default_parameters(
|
1237
|
+
service_type:,
|
1238
|
+
target_type:,
|
1239
|
+
offset:,
|
1240
|
+
limit:,
|
1241
|
+
zone:)eval(build_fetch 'DescribeS2DefaultParameters')
|
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 'AddSparkNodes')
|
1253
|
+
end
|
1254
|
+
|
1255
|
+
def delete_spark_nodes(
|
1256
|
+
spark:,
|
1257
|
+
spark_nodes_N:,
|
1258
|
+
zone:)eval(build_fetch 'AddSparkNodes')
|
1259
|
+
end
|
1260
|
+
|
1261
|
+
def start_sparks(
|
1262
|
+
sparks_N:,
|
1263
|
+
zone:)eval(build_fetch 'StartSparks')
|
1264
|
+
end
|
1265
|
+
|
1266
|
+
def stop_sparks(
|
1267
|
+
sparks_N:,
|
1268
|
+
zone:)eval(build_fetch 'StopSparks')
|
1269
|
+
end
|
833
1270
|
end
|
834
1271
|
|
835
1272
|
end
|
File without changes
|
data/qingcloud-sdk.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'qingcloud/sdk/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'qingcloud-sdk'
|
8
8
|
spec.version = QingCloud::SDK::VERSION
|
9
|
-
spec.authors = ['
|
9
|
+
spec.authors = ['Aspire']
|
10
10
|
spec.email = ['pengsrc@icloud.com']
|
11
11
|
|
12
12
|
if spec.respond_to?(:metadata)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qingcloud-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Aspire
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -69,12 +69,12 @@ files:
|
|
69
69
|
- bin/console
|
70
70
|
- bin/setup
|
71
71
|
- lib/qingcloud/sdk.rb
|
72
|
-
- lib/qingcloud/sdk/client/connector.rb
|
73
|
-
- lib/qingcloud/sdk/client/foundation.rb
|
74
|
-
- lib/qingcloud/sdk/client/service.rb
|
75
72
|
- lib/qingcloud/sdk/general/contract.rb
|
76
73
|
- lib/qingcloud/sdk/general/error.rb
|
77
|
-
- lib/qingcloud/sdk/
|
74
|
+
- lib/qingcloud/sdk/iaas/connector.rb
|
75
|
+
- lib/qingcloud/sdk/iaas/foundation.rb
|
76
|
+
- lib/qingcloud/sdk/iaas/service.rb
|
77
|
+
- lib/qingcloud/sdk/template/config.json
|
78
78
|
- lib/qingcloud/sdk/utility/file_manager.rb
|
79
79
|
- lib/qingcloud/sdk/utility/json_parser.rb
|
80
80
|
- lib/qingcloud/sdk/utility/logger.rb
|
@@ -101,9 +101,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.4.5
|
104
|
+
rubygems_version: 2.4.5.1
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: SDK for QingCloud
|
108
108
|
test_files: []
|
109
|
-
has_rdoc:
|