cloudcontrol_sdk 0.3.12 → 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/lib/cloudcontrol/api/account.rb +6 -5
- data/lib/cloudcontrol/api/core.rb +0 -3
- data/lib/cloudcontrol/api/drs.rb +16 -0
- data/lib/cloudcontrol/api/firewall.rb +6 -0
- data/lib/cloudcontrol/api/image.rb +16 -12
- data/lib/cloudcontrol/api/network.rb +184 -43
- data/lib/cloudcontrol/api/server.rb +37 -32
- data/lib/cloudcontrol/api/tagging.rb +15 -0
- data/lib/cloudcontrol/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51dacaf65d3eb7299c7c12771ae9d967c1408437f8f8b4468a22691300bda467
|
4
|
+
data.tar.gz: 8342195ec19f3d52686a14e98560a9dce8a7129038140b93e5491c91c4bbc7a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fba625dce586ff3ad23f5a4b4c091334d063efc7788cdb00c10960bde86a686e4a681b5e19633f1eec17a4d8e6ec204c8a8626f1531afe5e48e278339453e81e
|
7
|
+
data.tar.gz: dc009c601166c66d389f6a0c208bcb09b4894ab3948a57e2d5c99db11c30b3a61b7c460d43797835a8b3f622a956e2925ae2230572961afe52319cffd3282e75
|
@@ -1,13 +1,14 @@
|
|
1
1
|
module CloudControl::API
|
2
2
|
class Account < Core
|
3
|
-
def myaccount
|
4
|
-
endpoint
|
3
|
+
def myaccount
|
4
|
+
endpoint '/user/myUser'
|
5
5
|
get_simple
|
6
6
|
end
|
7
7
|
|
8
|
-
def list()
|
9
|
-
org_endpoint
|
10
|
-
|
8
|
+
def list(options = {})
|
9
|
+
org_endpoint '/user/user'
|
10
|
+
query_params options
|
11
|
+
get_simple
|
11
12
|
end
|
12
13
|
end
|
13
14
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module CloudControl::API
|
2
|
+
class Drs < Core
|
3
|
+
def list_consistency_groups(options = {})
|
4
|
+
org_endpoint '/consistencyGroup/consistencyGroup'
|
5
|
+
query_params options
|
6
|
+
get_simple
|
7
|
+
end
|
8
|
+
|
9
|
+
def list_consistency_group_snaps(consistency_group_id, options={})
|
10
|
+
org_endpoint '/consistencyGroup/snapshot'
|
11
|
+
options[:consistencyGroupId] = consistency_group_id
|
12
|
+
query_params options
|
13
|
+
get_simple
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,24 +1,28 @@
|
|
1
1
|
module CloudControl::API
|
2
2
|
class Image < Core
|
3
|
-
def
|
4
|
-
|
5
|
-
|
3
|
+
def list(options = {})
|
4
|
+
org_endpoint '/image/osImage'
|
5
|
+
query_params options
|
6
|
+
get_simple
|
6
7
|
end
|
7
8
|
|
8
|
-
def
|
9
|
-
|
9
|
+
def list_customer_images(options = {})
|
10
|
+
org_endpoint '/image/customerImage'
|
10
11
|
query_params options
|
11
|
-
|
12
|
+
get_simple
|
12
13
|
end
|
13
14
|
|
14
|
-
def
|
15
|
-
|
16
|
-
|
15
|
+
def list_ovf_packages(options = {})
|
16
|
+
# Api does not support filtering on this.
|
17
|
+
org_endpoint '/image/ovfPackage'
|
18
|
+
query_params options
|
19
|
+
get_simple
|
17
20
|
end
|
18
21
|
|
19
|
-
def
|
20
|
-
|
21
|
-
|
22
|
+
def list_image_exports_inprogress(options = {})
|
23
|
+
org_endpoint '/image/exportInProgress'
|
24
|
+
query_params options
|
25
|
+
get_simple
|
22
26
|
end
|
23
27
|
end
|
24
28
|
end
|
@@ -1,72 +1,213 @@
|
|
1
1
|
module CloudControl::API
|
2
2
|
class Network < Core
|
3
|
-
def
|
4
|
-
org_endpoint '/network'
|
5
|
-
|
3
|
+
def list_domains(options = {})
|
4
|
+
org_endpoint '/network/networkDomain'
|
5
|
+
query_params options
|
6
|
+
get_simple
|
7
|
+
end
|
8
|
+
|
9
|
+
def list_domains_byname(name, options = {})
|
10
|
+
options[:name] = name
|
11
|
+
single(list_domains(options))
|
12
|
+
end
|
13
|
+
|
14
|
+
def listvlans(options = {})
|
15
|
+
org_endpoint '/network/vlan'
|
16
|
+
query_params options
|
17
|
+
get_simple
|
6
18
|
end
|
7
19
|
|
8
|
-
def
|
9
|
-
|
10
|
-
|
11
|
-
post
|
20
|
+
def listvlan_byname(name, options = {})
|
21
|
+
options[:name] = name
|
22
|
+
single(listvlans(options))
|
12
23
|
end
|
13
24
|
|
14
|
-
def
|
15
|
-
org_endpoint
|
16
|
-
|
25
|
+
def list_publicipv4(network_domain_id, options = {})
|
26
|
+
org_endpoint '/network/publicIpBlock'
|
27
|
+
options[:networkDomain] = network_domain_id
|
28
|
+
query_params options
|
29
|
+
get_simple
|
17
30
|
end
|
18
31
|
|
19
|
-
def
|
20
|
-
org_endpoint
|
21
|
-
|
32
|
+
def list_reserved_publicipv4(network_domain_id, options = {})
|
33
|
+
org_endpoint '/network/reservedPublicIpv4Address'
|
34
|
+
options[:networkDomain] = network_domain_id
|
35
|
+
query_params options
|
36
|
+
get_simple
|
37
|
+
end
|
38
|
+
|
39
|
+
def list_reserved_privateipv4(network_domain_id, options = {})
|
40
|
+
org_endpoint '/network/reservedPrivateIpv4Address'
|
41
|
+
options[:networkDomain] = network_domain_id
|
42
|
+
query_params options
|
43
|
+
get_simple
|
44
|
+
end
|
45
|
+
|
46
|
+
def list_reserved_ipv6(network_domain_id, options = {})
|
47
|
+
org_endpoint '/network/reservedIpv6Address'
|
48
|
+
options[:networkDomain] = network_domain_id
|
49
|
+
query_params options
|
50
|
+
get_simple
|
22
51
|
end
|
23
52
|
|
24
|
-
def
|
25
|
-
|
53
|
+
def list_staticroutes(network_domain_id, options = {})
|
54
|
+
options[:networkDomain] = network_domain_id
|
55
|
+
org_endpoint 'network/staticRoute'
|
56
|
+
query_params options
|
57
|
+
get_simple
|
26
58
|
end
|
27
59
|
|
28
|
-
def
|
29
|
-
|
60
|
+
def list_fw_rules(network_domain_id, options = {})
|
61
|
+
org_endpoint '/network/firewallRule'
|
62
|
+
options[:networkDomainId] = network_domain_id
|
63
|
+
query_params options
|
64
|
+
get_simple
|
30
65
|
end
|
31
66
|
|
32
|
-
def
|
33
|
-
org_endpoint
|
34
|
-
|
67
|
+
def list_ipaddress_lists(network_domain_id, options = {})
|
68
|
+
org_endpoint '/network/ipAddressList'
|
69
|
+
options[:networkDomainId] = network_domain_id
|
70
|
+
query_params options
|
71
|
+
get_simple
|
35
72
|
end
|
36
73
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
74
|
+
def list_port_lists(network_domain_id, options = {})
|
75
|
+
org_endpoint '/network/portList'
|
76
|
+
options[:networkDomainId] = network_domain_id
|
77
|
+
query_params options
|
78
|
+
get_simple
|
42
79
|
end
|
43
80
|
|
44
|
-
def
|
45
|
-
org_endpoint
|
46
|
-
|
81
|
+
def list_nat_rules(network_domain_id, options = {})
|
82
|
+
org_endpoint '/network/natRule'
|
83
|
+
options[:networkDomainId] = network_domain_id
|
84
|
+
query_params options
|
85
|
+
get_simple
|
47
86
|
end
|
48
87
|
|
49
|
-
def
|
50
|
-
org_endpoint
|
51
|
-
|
88
|
+
def list_vip_nodes(options = {})
|
89
|
+
org_endpoint '/networkDomainVip/node'
|
90
|
+
query_params options
|
91
|
+
get_simple
|
52
92
|
end
|
53
93
|
|
54
|
-
def
|
55
|
-
org_endpoint
|
56
|
-
|
94
|
+
def list_vip_pools(options = {})
|
95
|
+
org_endpoint '/networkDomainVip/pool'
|
96
|
+
query_params options
|
97
|
+
get_simple
|
57
98
|
end
|
58
99
|
|
59
|
-
def
|
60
|
-
org_endpoint
|
61
|
-
|
62
|
-
|
100
|
+
def list_vip_pool_members(options = {})
|
101
|
+
org_endpoint '/networkDomainVip/poolMember'
|
102
|
+
query_params options
|
103
|
+
get_simple
|
63
104
|
end
|
64
105
|
|
65
|
-
def
|
66
|
-
|
106
|
+
def list_virtual_listeners(options = {})
|
107
|
+
org_endpoint '/networkDomainVip/virtualListener'
|
67
108
|
query_params options
|
68
109
|
get_simple
|
69
|
-
|
70
|
-
|
71
|
-
|
110
|
+
end
|
111
|
+
|
112
|
+
def list_ssl_certs(options = {})
|
113
|
+
org_endpoint '/networkDomainVip/sslDomainCertificate'
|
114
|
+
query_params options
|
115
|
+
get_simple
|
116
|
+
end
|
117
|
+
|
118
|
+
def list_ssl_certchains(options = {})
|
119
|
+
org_endpoint '/networkDomainVip/sslCertificateChain'
|
120
|
+
query_params options
|
121
|
+
get_simple
|
122
|
+
end
|
123
|
+
|
124
|
+
def list_ssl_offload_profile(options = {})
|
125
|
+
org_endpoint '/networkDomainVip/sslOffloadProfile'
|
126
|
+
query_params options
|
127
|
+
get_simple
|
128
|
+
end
|
129
|
+
|
130
|
+
def list_default_healthmon(network_domain_id, options = {})
|
131
|
+
org_endpoint '/networkDomainVip/defaultHealthMonitor'
|
132
|
+
options[:networkDomainId] = network_domain_id
|
133
|
+
query_params options
|
134
|
+
get_simple
|
135
|
+
end
|
136
|
+
|
137
|
+
def list_default_persistence(network_domain_id, options = {})
|
138
|
+
org_endpoint '/networkDomainVip/defaultPersistenceProfile'
|
139
|
+
options[:networkDomainId] = network_domain_id
|
140
|
+
query_params options
|
141
|
+
get_simple
|
142
|
+
end
|
143
|
+
|
144
|
+
def list_default_irules(network_domain_id, options = {})
|
145
|
+
org_endpoint '/networkDomainVip/defaultiRu'
|
146
|
+
options[:networkDomainId] = network_domain_id
|
147
|
+
query_params options
|
148
|
+
get_simple
|
149
|
+
end
|
150
|
+
|
151
|
+
def list_security_groups(options = {})
|
152
|
+
org_endpoint '/securityGroup/securityGroup'
|
153
|
+
query_params options
|
154
|
+
get_simple
|
155
|
+
end
|
156
|
+
# def create(name, description="", datacenter=@client.datacenter)
|
157
|
+
# org_endpoint "/networkWithLocation"
|
158
|
+
# xml_params(schema: "network", tag: "NewNetworkWithLocation", name: name, description: description, location: datacenter)
|
159
|
+
# post
|
160
|
+
# end
|
161
|
+
|
162
|
+
# def list_with_location
|
163
|
+
# org_endpoint "/networkWithLocation"
|
164
|
+
# get
|
165
|
+
# end
|
166
|
+
|
167
|
+
# def list_in_location(location_id)
|
168
|
+
# org_endpoint "/networkWithLocation/#{location_id}"
|
169
|
+
# get
|
170
|
+
# end
|
171
|
+
|
172
|
+
# def show(network_id)
|
173
|
+
# list_with_location.find {|n| n.id == network_id}
|
174
|
+
# end
|
175
|
+
|
176
|
+
# def show_by_name(name)
|
177
|
+
# list_with_location.find {|n| n.name == name}
|
178
|
+
# end
|
179
|
+
|
180
|
+
# def natrule_list(network_id)
|
181
|
+
# org_endpoint "/network/#{network_id}/natrule"
|
182
|
+
# get
|
183
|
+
# end
|
184
|
+
|
185
|
+
# # name = "10.147.15.11", source_ip = "10.147.15.11"
|
186
|
+
# def natrule_create(network_id, name, source_ip)
|
187
|
+
# org_endpoint "/network/#{network_id}/natrule"
|
188
|
+
# xml_params(schema: "network", tag: "NatRule", name: name, source_ip: source_ip)
|
189
|
+
# post
|
190
|
+
# end
|
191
|
+
|
192
|
+
# def natrule_delete(network_id, natrule_id)
|
193
|
+
# org_endpoint "/network/#{network_id}/natrule/#{natrule_id}?delete"
|
194
|
+
# get
|
195
|
+
# end
|
196
|
+
|
197
|
+
# def aclrule_list(network_id)
|
198
|
+
# org_endpoint "/network/#{network_id}/aclrule"
|
199
|
+
# get
|
200
|
+
# end
|
201
|
+
|
202
|
+
# def aclrule_delete(network_id, aclrule_id)
|
203
|
+
# org_endpoint "/network/#{network_id}/aclrule/#{aclrule_id}?delete"
|
204
|
+
# get
|
205
|
+
# end
|
206
|
+
|
207
|
+
# def aclrule_create(network_id, name, position, inbound, protocol, port, allow)
|
208
|
+
# org_endpoint "/network/#{network_id}/aclrule"
|
209
|
+
# xml_params(schema: "network", tag: "AclRule", name: name, position: position, action: (allow ? "PERMIT" : "DENY"), protocol: protocol, source_ip_range: {}, destination_ip_range: {}, port_range: {type: "EQUAL_TO", port1: port}, type: (inbound ? "OUTSIDE_ACL" : "INSIDE_ACL"))
|
210
|
+
# post
|
211
|
+
# end
|
212
|
+
end
|
72
213
|
end
|
@@ -1,48 +1,55 @@
|
|
1
1
|
module CloudControl::API
|
2
2
|
class Server < Core
|
3
|
-
|
4
|
-
|
5
3
|
def list(options = {})
|
6
|
-
|
4
|
+
org_endpoint '/server/server'
|
7
5
|
query_params options
|
8
6
|
get_simple
|
9
7
|
end
|
10
|
-
|
11
|
-
def show(server_id, options = {})
|
12
|
-
endpoint "/#{org_id}/server/server/#{server_id}"
|
13
|
-
get
|
14
|
-
end
|
15
8
|
|
16
|
-
def
|
17
|
-
|
18
|
-
|
9
|
+
def list_anti_affinity_rules(options = {})
|
10
|
+
org_endpoint '/server/antiAffinityRule'
|
11
|
+
query_params options
|
12
|
+
get_simple
|
19
13
|
end
|
20
14
|
|
21
|
-
def
|
22
|
-
|
23
|
-
|
15
|
+
def list_snapshots(server_id, options = {})
|
16
|
+
org_endpoint '/snapshot/snapshot'
|
17
|
+
options[:serverId] = server_id
|
18
|
+
query_params options
|
19
|
+
get_simple
|
24
20
|
end
|
25
21
|
|
26
|
-
|
27
22
|
def list_nics(vlan_id, options = {})
|
28
|
-
|
29
|
-
|
23
|
+
org_endpoint '/server/nic'
|
24
|
+
options[:vlanId] = vlan_id
|
25
|
+
query_params options
|
26
|
+
get_simple
|
30
27
|
end
|
31
28
|
|
32
|
-
def
|
33
|
-
|
34
|
-
|
35
|
-
end
|
29
|
+
# def show(server_id, options = {})
|
30
|
+
# org_endpoint "/server/server/#{server_id}"
|
31
|
+
# get_simple
|
32
|
+
# end
|
36
33
|
|
37
|
-
def
|
38
|
-
|
39
|
-
|
40
|
-
end
|
41
|
-
|
42
|
-
# def
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
34
|
+
# def show_by_name(name, options = {})
|
35
|
+
# options[:name] = name
|
36
|
+
# single(list(options))
|
37
|
+
# end
|
38
|
+
|
39
|
+
# def show_by_id(id, options = {})
|
40
|
+
# options[:id] = id
|
41
|
+
# single(list(options))
|
42
|
+
# end
|
43
|
+
|
44
|
+
# def show_by_ip(ip, options = {})
|
45
|
+
# options[:private_ip] = ip
|
46
|
+
# single(list(options))
|
47
|
+
# end
|
48
|
+
|
49
|
+
# def create(name,
|
50
|
+
# description,
|
51
|
+
# network_id,
|
52
|
+
# image_id,
|
46
53
|
# administrator_password=@client.default_password)
|
47
54
|
# org_endpoint "/server"
|
48
55
|
|
@@ -112,7 +119,5 @@ module CloudControl::API
|
|
112
119
|
# org_endpoint "/server/#{server_id}/disk/#{disk_id}?delete"
|
113
120
|
# get
|
114
121
|
# end
|
115
|
-
|
116
122
|
end
|
117
123
|
end
|
118
|
-
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module CloudControl::API
|
2
|
+
class Tagging < Core
|
3
|
+
def list_tag_keys(options = {})
|
4
|
+
org_endpoint '/tag/tagKey'
|
5
|
+
query_params options
|
6
|
+
get_simple
|
7
|
+
end
|
8
|
+
|
9
|
+
def list_tags(options = {})
|
10
|
+
org_endpoint '/tag/tag'
|
11
|
+
query_params options
|
12
|
+
get_simple
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/cloudcontrol/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudcontrol_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
|
- Nigel Wright
|
@@ -109,11 +109,14 @@ files:
|
|
109
109
|
- lib/cloudcontrol.rb
|
110
110
|
- lib/cloudcontrol/api/account.rb
|
111
111
|
- lib/cloudcontrol/api/core.rb
|
112
|
+
- lib/cloudcontrol/api/drs.rb
|
113
|
+
- lib/cloudcontrol/api/firewall.rb
|
112
114
|
- lib/cloudcontrol/api/image.rb
|
113
115
|
- lib/cloudcontrol/api/infrastructure.rb
|
114
116
|
- lib/cloudcontrol/api/network.rb
|
115
117
|
- lib/cloudcontrol/api/report.rb
|
116
118
|
- lib/cloudcontrol/api/server.rb
|
119
|
+
- lib/cloudcontrol/api/tagging.rb
|
117
120
|
- lib/cloudcontrol/api/vip.rb
|
118
121
|
- lib/cloudcontrol/client.rb
|
119
122
|
- lib/cloudcontrol/connection.rb
|