fog-softlayer 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -13
- data/examples/compute.md +87 -4
- data/lib/fog/softlayer/compute.rb +6 -0
- data/lib/fog/softlayer/models/compute/server.rb +53 -3
- data/lib/fog/softlayer/product.rb +1 -0
- data/lib/fog/softlayer/requests/compute/generate_bare_metal_order_template.rb +162 -0
- data/lib/fog/softlayer/requests/compute/generate_virtual_guest_order_template.rb +173 -0
- data/lib/fog/softlayer/requests/compute/get_bare_metal_upgrade_item_prices.rb +629 -0
- data/lib/fog/softlayer/requests/compute/get_virtual_guest_upgrade_item_prices.rb +6056 -0
- data/lib/fog/softlayer/requests/product/place_order.rb +258 -0
- data/lib/fog/softlayer/version.rb +1 -1
- data/tests/softlayer/models/compute/server_tests.rb +14 -3
- data/tests/softlayer/requests/compute/bmc_tests.rb +31 -2
- data/tests/softlayer/requests/compute/vm_tests.rb +32 -0
- data/tests/softlayer/requests/product/place_order.rb +19 -0
- metadata +35 -30
@@ -0,0 +1,258 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Matheus Mina (<mfbmina@gmail.com>)
|
3
|
+
# © Copyright IBM Corporation 2015.
|
4
|
+
#
|
5
|
+
# LICENSE: MIT (http://opensource.org/licenses/MIT)
|
6
|
+
#
|
7
|
+
module Fog
|
8
|
+
module Softlayer
|
9
|
+
class Product
|
10
|
+
|
11
|
+
class Mock
|
12
|
+
def place_order(order_template)
|
13
|
+
response = Excon::Response.new
|
14
|
+
response.body = place_order_mock
|
15
|
+
response.status = 200
|
16
|
+
return response
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
class Real
|
22
|
+
def place_order(order_template)
|
23
|
+
request(:product_order, :place_order, :body => order_template, :http_method => :POST)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
module Fog
|
31
|
+
module Product
|
32
|
+
class Softlayer
|
33
|
+
class Mock
|
34
|
+
def place_order_mock
|
35
|
+
{
|
36
|
+
"orderDate"=>"2015-04-17T11:12:12-06:00",
|
37
|
+
"orderDetails"=>{
|
38
|
+
"bigDataOrderFlag"=>false,
|
39
|
+
"billingInformation"=>{
|
40
|
+
"billingAddressLine1"=>"11 Street ",
|
41
|
+
"billingCity"=>"Dallas",
|
42
|
+
"billingCountryCode"=>"US",
|
43
|
+
"billingEmail"=>"example@example.com",
|
44
|
+
"billingNameCompany"=>"Example company",
|
45
|
+
"billingNameFirst"=>"Example name",
|
46
|
+
"billingNameLast"=>"Example last name",
|
47
|
+
"billingPhoneVoice"=>"123.456.7890",
|
48
|
+
"billingPostalCode"=>"12345-6789",
|
49
|
+
"billingState"=>"TX",
|
50
|
+
"cardExpirationMonth"=>nil,
|
51
|
+
"cardExpirationYear"=>nil,
|
52
|
+
"taxExempt"=>0
|
53
|
+
},
|
54
|
+
"billingOrderItemId"=>nil,
|
55
|
+
"containerSplHash"=>"000000002aar43vc200007f66a254432d",
|
56
|
+
"currencyShortName"=>"USD",
|
57
|
+
"extendedHardwareTesting"=>nil,
|
58
|
+
"imageTemplateId"=>nil,
|
59
|
+
"isManagedOrder"=>0,
|
60
|
+
"itemCategoryQuestionAnswers"=>[],
|
61
|
+
"location"=>"37473",
|
62
|
+
"locationObject"=>{
|
63
|
+
"id"=>37213,
|
64
|
+
"longName"=>"Washington 1",
|
65
|
+
"name"=>"wdc01"
|
66
|
+
},
|
67
|
+
"message"=>"",
|
68
|
+
"packageId"=>46,
|
69
|
+
"paymentType"=>"ADD_TO_BALANCE",
|
70
|
+
"postTaxRecurring"=>"0",
|
71
|
+
"postTaxRecurringHourly"=>"0",
|
72
|
+
"postTaxRecurringMonthly"=>"0",
|
73
|
+
"postTaxSetup"=>"0",
|
74
|
+
"preTaxRecurring"=>"0",
|
75
|
+
"preTaxRecurringHourly"=>"0",
|
76
|
+
"preTaxRecurringMonthly"=>"0",
|
77
|
+
"preTaxSetup"=>"0",
|
78
|
+
"presetId"=>nil,
|
79
|
+
"prices"=>[
|
80
|
+
{
|
81
|
+
"hourlyRecurringFee"=>"0",
|
82
|
+
"id"=>1641,
|
83
|
+
"itemId"=>858,
|
84
|
+
"laborFee"=>"0",
|
85
|
+
"oneTimeFee"=>"0",
|
86
|
+
"recurringFee"=>"0",
|
87
|
+
"setupFee"=>"0",
|
88
|
+
"categories"=>[
|
89
|
+
{
|
90
|
+
"categoryCode"=>"guest_core",
|
91
|
+
"id"=>80,
|
92
|
+
"name"=>"Computing Instance"
|
93
|
+
}
|
94
|
+
],
|
95
|
+
"item"=>{
|
96
|
+
"capacity"=>"2",
|
97
|
+
"description"=>"2 x 2.0 GHz Cores",
|
98
|
+
"id"=>858,
|
99
|
+
"keyName"=>"GUEST_CORES_2",
|
100
|
+
"units"=>"CORE",
|
101
|
+
"bundle"=>[]
|
102
|
+
}
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"hourlyRecurringFee"=>"0",
|
106
|
+
"id"=>1644,
|
107
|
+
"itemId"=>861,
|
108
|
+
"laborFee"=>"0",
|
109
|
+
"oneTimeFee"=>"0",
|
110
|
+
"recurringFee"=>"0",
|
111
|
+
"setupFee"=>"0",
|
112
|
+
"categories"=>[
|
113
|
+
{
|
114
|
+
"categoryCode"=>"ram",
|
115
|
+
"id"=>3,
|
116
|
+
"name"=>"RAM"
|
117
|
+
}
|
118
|
+
],
|
119
|
+
"item"=>{
|
120
|
+
"capacity"=>"1",
|
121
|
+
"description"=>"1 GB",
|
122
|
+
"id"=>861,
|
123
|
+
"keyName"=>"RAM_1_GB",
|
124
|
+
"units"=>"GB",
|
125
|
+
"bundle"=>[]
|
126
|
+
}
|
127
|
+
},
|
128
|
+
{
|
129
|
+
"hourlyRecurringFee"=>"0",
|
130
|
+
"id"=>2202,
|
131
|
+
"itemId"=>1178,
|
132
|
+
"laborFee"=>"0",
|
133
|
+
"oneTimeFee"=>"0",
|
134
|
+
"recurringFee"=>"0",
|
135
|
+
"setupFee"=>"0",
|
136
|
+
"categories"=>[{
|
137
|
+
"categoryCode"=>"guest_disk0",
|
138
|
+
"id"=>81,
|
139
|
+
"name"=>"First Disk"
|
140
|
+
}
|
141
|
+
],
|
142
|
+
"item"=>{
|
143
|
+
"capacity"=>"25",
|
144
|
+
"description"=>"25 GB (SAN)",
|
145
|
+
"id"=>1178,
|
146
|
+
"keyName"=>"GUEST_DISK_25_GB_SAN",
|
147
|
+
"units"=>"GB",
|
148
|
+
"bundle"=>[]}
|
149
|
+
}
|
150
|
+
],
|
151
|
+
"primaryDiskPartitionId"=>nil,
|
152
|
+
"privateCloudOrderFlag"=>false,
|
153
|
+
"properties"=>[{
|
154
|
+
"name"=>"MAINTENANCE_WINDOW",
|
155
|
+
"value"=>"2015-04-17T14:11:20-03:00"
|
156
|
+
}
|
157
|
+
],
|
158
|
+
"proratedInitialCharge"=>"0",
|
159
|
+
"proratedOrderTotal"=>"0",
|
160
|
+
"quantity"=>1,
|
161
|
+
"resourceGroupId"=>nil,
|
162
|
+
"resourceGroupTemplateId"=>nil,
|
163
|
+
"sendQuoteEmailFlag"=>nil,
|
164
|
+
"serverCoreCount"=>nil,
|
165
|
+
"sourceVirtualGuestId"=>nil,
|
166
|
+
"sshKeys"=>[],
|
167
|
+
"stepId"=>nil,
|
168
|
+
"storageGroups"=>[],
|
169
|
+
"taxCacheHash"=>"ec46bb1535b09a7df30b2f8204d7363eae96f028",
|
170
|
+
"taxCompletedFlag"=>true,
|
171
|
+
"totalRecurringTax"=>"0",
|
172
|
+
"totalSetupTax"=>"0",
|
173
|
+
"useHourlyPricing"=>true,
|
174
|
+
"virtualGuests"=>[{
|
175
|
+
"accountId"=>307608,
|
176
|
+
"domain"=>"domain.com",
|
177
|
+
"fullyQualifiedDomainName"=>"hostname.domain.com",
|
178
|
+
"hostname"=>"hostname",
|
179
|
+
"id"=>8843591,
|
180
|
+
"maxCpu"=>1,
|
181
|
+
"maxCpuUnits"=>"CORE",
|
182
|
+
"maxMemory"=>1024,
|
183
|
+
"startCpus"=>1,
|
184
|
+
"statusId"=>1001,
|
185
|
+
"uuid"=>"77edc9a5-2ee2-fa9f-ac5a-3387ed482729",
|
186
|
+
"globalIdentifier"=>"0b304f83-b721-4d7b-a691-027085553b94"
|
187
|
+
}
|
188
|
+
],
|
189
|
+
"monitoringAgentConfigurationTemplateGroupId"=>nil},
|
190
|
+
"orderId"=>1213232,
|
191
|
+
"placedOrder"=>{
|
192
|
+
"accountId"=>434334,
|
193
|
+
"id"=>434334,
|
194
|
+
"orderQuoteId"=>nil,
|
195
|
+
"orderTypeId"=>4,
|
196
|
+
"presaleEventId"=>nil,
|
197
|
+
"status"=>"PENDING_UPGRADE",
|
198
|
+
"userRecordId"=>434334,
|
199
|
+
"account"=>{
|
200
|
+
"brandId"=>2,
|
201
|
+
"companyName"=>"Example company",
|
202
|
+
"id"=>307608},
|
203
|
+
"items"=>[{
|
204
|
+
"categoryCode"=>"guest_core",
|
205
|
+
"description"=>"2 x 2.0 GHz Cores",
|
206
|
+
"hourlyRecurringFee"=>"0",
|
207
|
+
"id"=>4434334,
|
208
|
+
"itemId"=>858,
|
209
|
+
"itemPriceId"=>"1641",
|
210
|
+
"laborFee"=>"0",
|
211
|
+
"oneTimeFee"=>"0",
|
212
|
+
"parentId"=>nil,
|
213
|
+
"promoCodeId"=>nil,
|
214
|
+
"recurringFee"=>"0",
|
215
|
+
"setupFee"=>"0",
|
216
|
+
"children"=>[]},
|
217
|
+
{
|
218
|
+
"categoryCode"=>"ram",
|
219
|
+
"description"=>"1 GB",
|
220
|
+
"hourlyRecurringFee"=>"0",
|
221
|
+
"id"=>34343,
|
222
|
+
"itemId"=>861,
|
223
|
+
"itemPriceId"=>"1644",
|
224
|
+
"laborFee"=>"0",
|
225
|
+
"oneTimeFee"=>"0",
|
226
|
+
"parentId"=>nil,
|
227
|
+
"promoCodeId"=>nil,
|
228
|
+
"recurringFee"=>"0",
|
229
|
+
"setupFee"=>"0",
|
230
|
+
"children"=>[]},
|
231
|
+
{
|
232
|
+
"categoryCode"=>"guest_disk0",
|
233
|
+
"description"=>"25 GB (SAN)",
|
234
|
+
"hourlyRecurringFee"=>"0",
|
235
|
+
"id"=>64357837,
|
236
|
+
"itemId"=>1178,
|
237
|
+
"itemPriceId"=>"2202",
|
238
|
+
"laborFee"=>"0",
|
239
|
+
"oneTimeFee"=>"0",
|
240
|
+
"parentId"=>nil,
|
241
|
+
"promoCodeId"=>nil,
|
242
|
+
"recurringFee"=>"0",
|
243
|
+
"setupFee"=>"0",
|
244
|
+
"children"=>[]}],
|
245
|
+
"userRecord"=>{
|
246
|
+
"accountId"=>4344343,
|
247
|
+
"firstName"=>"Example name",
|
248
|
+
"id"=>302942,
|
249
|
+
"lastName"=>"Example last name",
|
250
|
+
"username"=>"example-username"
|
251
|
+
}
|
252
|
+
}
|
253
|
+
}
|
254
|
+
end
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|
@@ -15,6 +15,7 @@ Shindo.tests("Fog::Compute[:softlayer] | Server model", ["softlayer"]) do
|
|
15
15
|
:name => 'test-vm',
|
16
16
|
:domain => 'example.com',
|
17
17
|
:datacenter => 'dal05',
|
18
|
+
:os_code => 'UBUNTU_LATEST',
|
18
19
|
:bare_metal => false
|
19
20
|
}
|
20
21
|
|
@@ -60,8 +61,19 @@ Shindo.tests("Fog::Compute[:softlayer] | Server model", ["softlayer"]) do
|
|
60
61
|
returns(true) { @bmc.bare_metal? }
|
61
62
|
end
|
62
63
|
|
64
|
+
tests("#generate_order_template") do
|
65
|
+
data_matches_schema(Hash) { @vm.generate_order_template }
|
66
|
+
data_matches_schema(Hash) { @bmc.generate_order_template }
|
67
|
+
end
|
68
|
+
|
63
69
|
tests("#save") do
|
64
70
|
returns(true) { @vm.save }
|
71
|
+
returns(true) { @bmc.save }
|
72
|
+
end
|
73
|
+
|
74
|
+
tests("#get_upgrade_options") do
|
75
|
+
data_matches_schema(Array) { @vm.get_upgrade_options }
|
76
|
+
data_matches_schema(Array) { @bmc.get_upgrade_options }
|
65
77
|
end
|
66
78
|
|
67
79
|
tests("#start") do
|
@@ -86,7 +98,6 @@ Shindo.tests("Fog::Compute[:softlayer] | Server model", ["softlayer"]) do
|
|
86
98
|
returns(true) { @vm.reboot(false) }
|
87
99
|
returns(true) { @bmc.reboot(false) }
|
88
100
|
end
|
89
|
-
|
90
101
|
end
|
91
102
|
|
92
103
|
tests ("failure") do
|
@@ -127,8 +138,8 @@ Shindo.tests("Fog::Compute[:softlayer] | Server model", ["softlayer"]) do
|
|
127
138
|
@bmc.shutdown
|
128
139
|
end
|
129
140
|
|
130
|
-
tests("#destroy")
|
131
|
-
@bmc.destroy
|
141
|
+
tests("#destroy") do
|
142
|
+
data_matches_schema(String){ @bmc.destroy }
|
132
143
|
end
|
133
144
|
|
134
145
|
@vm.destroy
|
@@ -28,6 +28,12 @@ Shindo.tests("Fog::Compute[:softlayer] | server requests", ["softlayer"]) do
|
|
28
28
|
data_matches_schema(201) { response.status }
|
29
29
|
end
|
30
30
|
|
31
|
+
tests("#generate_bare_metal_order_template('#{@bmc}')") do
|
32
|
+
response = @sl_connection.generate_bare_metal_order_template(@bmc)
|
33
|
+
data_matches_schema(Hash) {response.body}
|
34
|
+
data_matches_schema(200) {response.status}
|
35
|
+
end
|
36
|
+
|
31
37
|
tests"#get_bare_metal_server_by_ip('#{@server_ip}'))" do
|
32
38
|
response = @sl_connection.get_bare_metal_server_by_ip(@server_ip)
|
33
39
|
data_matches_schema(200) { response.status }
|
@@ -46,7 +52,7 @@ Shindo.tests("Fog::Compute[:softlayer] | server requests", ["softlayer"]) do
|
|
46
52
|
data_matches_schema(Array) {response.body}
|
47
53
|
data_matches_schema(200) {response.status}
|
48
54
|
end
|
49
|
-
|
55
|
+
|
50
56
|
tests("#get_bare_metal_users('#{@server_id})'") do
|
51
57
|
response = @sl_connection.get_bare_metal_users(@server_id)
|
52
58
|
data_matches_schema(Array) {response.body}
|
@@ -88,6 +94,12 @@ Shindo.tests("Fog::Compute[:softlayer] | server requests", ["softlayer"]) do
|
|
88
94
|
data_matches_schema(Hash) {response.body}
|
89
95
|
data_matches_schema(200) {response.status}
|
90
96
|
end
|
97
|
+
|
98
|
+
tests("#get_bare_metal_upgrade_item_prices('#{@server_id}')") do
|
99
|
+
response = @sl_connection.get_bare_metal_upgrade_item_prices(@server_id)
|
100
|
+
data_matches_schema(Array) {response.body}
|
101
|
+
data_matches_schema(200) {response.status}
|
102
|
+
end
|
91
103
|
end
|
92
104
|
|
93
105
|
tests('failure') do
|
@@ -99,6 +111,12 @@ Shindo.tests("Fog::Compute[:softlayer] | server requests", ["softlayer"]) do
|
|
99
111
|
data_matches_schema(500){ response.status }
|
100
112
|
end
|
101
113
|
|
114
|
+
tests("#generate_bare_metal_order_template('#{bmc}')") do
|
115
|
+
response = @sl_connection.generate_bare_metal_order_template(bmc)
|
116
|
+
data_matches_schema('SoftLayer_Exception_MissingCreationProperty'){ response.body['code'] }
|
117
|
+
data_matches_schema(500){ response.status }
|
118
|
+
end
|
119
|
+
|
102
120
|
tests("#create_bare_metal_server(#{[@bmc]}").raises(ArgumentError) do
|
103
121
|
@sl_connection.create_bare_metal_server([@bmc])
|
104
122
|
end
|
@@ -114,7 +132,13 @@ Shindo.tests("Fog::Compute[:softlayer] | server requests", ["softlayer"]) do
|
|
114
132
|
data_matches_schema('SoftLayer_Exception_ObjectNotFound'){ response.body['code'] }
|
115
133
|
data_matches_schema(404){ response.status }
|
116
134
|
end
|
117
|
-
|
135
|
+
|
136
|
+
tests("#get_bare_metal_active_tickets('#{bmc}')") do
|
137
|
+
response = @sl_connection.get_bare_metal_active_tickets(bmc)
|
138
|
+
data_matches_schema('SoftLayer_Exception_ObjectNotFound'){ response.body['code'] }
|
139
|
+
data_matches_schema(404){ response.status }
|
140
|
+
end
|
141
|
+
|
118
142
|
tests("#power_on_bare_metal_server('#{bmc}')") do
|
119
143
|
response = @sl_connection.power_on_bare_metal_server(bmc)
|
120
144
|
data_matches_schema('SoftLayer_Exception_ObjectNotFound'){ response.body['code'] }
|
@@ -145,5 +169,10 @@ Shindo.tests("Fog::Compute[:softlayer] | server requests", ["softlayer"]) do
|
|
145
169
|
data_matches_schema(500) {response.status}
|
146
170
|
end
|
147
171
|
|
172
|
+
tests("#get_bare_metal_upgrade_item_prices('99999999999999')'") do
|
173
|
+
response = @sl_connection.get_bare_metal_upgrade_item_prices(99999999999999)
|
174
|
+
data_matches_schema('SoftLayer_Exception_ObjectNotFound'){ response.body['code'] }
|
175
|
+
data_matches_schema(404) {response.status}
|
176
|
+
end
|
148
177
|
end
|
149
178
|
end
|
@@ -45,6 +45,13 @@ Shindo.tests("Fog::Compute[:softlayer] | server requests", ["softlayer"]) do
|
|
45
45
|
data_matches_schema(200) { response.status }
|
46
46
|
end
|
47
47
|
|
48
|
+
tests("#generate_virtual_guest_order_template('#{@vm}')") do
|
49
|
+
response = @sl_connection.generate_virtual_guest_order_template(@vm)
|
50
|
+
data_matches_schema(Hash) {response.body}
|
51
|
+
data_matches_schema(200) {response.status}
|
52
|
+
end
|
53
|
+
|
54
|
+
|
48
55
|
tests"#get_virtual_guest_by_ip('#{@vm_ip}'))" do
|
49
56
|
response = @sl_connection.get_virtual_guest_by_ip(@vm_ip)
|
50
57
|
data_matches_schema(200) { response.status }
|
@@ -63,6 +70,12 @@ Shindo.tests("Fog::Compute[:softlayer] | server requests", ["softlayer"]) do
|
|
63
70
|
data_matches_schema(200) {response.status}
|
64
71
|
end
|
65
72
|
|
73
|
+
tests("#get_virtual_guest_upgrade_item_prices(#{@vm_id})") do
|
74
|
+
response = @sl_connection.get_virtual_guest_upgrade_item_prices(@vm_id)
|
75
|
+
data_matches_schema(Array) {response.body}
|
76
|
+
data_matches_schema(200) {response.status}
|
77
|
+
end
|
78
|
+
|
66
79
|
tests("#get_virtual_guest_users(#{@vm_id})") do
|
67
80
|
response = @sl_connection.get_virtual_guest_users(@vm_id)
|
68
81
|
data_matches_schema(Array) {response.body}
|
@@ -127,6 +140,13 @@ Shindo.tests("Fog::Compute[:softlayer] | server requests", ["softlayer"]) do
|
|
127
140
|
data_matches_schema(500){ response.status }
|
128
141
|
end
|
129
142
|
|
143
|
+
vm = @vm.dup; vm.delete('datacenter')
|
144
|
+
tests("#generate_virtual_guest_order_template('#{vm}')") do
|
145
|
+
response = @sl_connection.generate_virtual_guest_order_template(vm)
|
146
|
+
data_matches_schema('SoftLayer_Exception_MissingCreationProperty'){ response.body['code'] }
|
147
|
+
data_matches_schema(500){ response.status }
|
148
|
+
end
|
149
|
+
|
130
150
|
tests("#create_vms(#{@vm}").raises(ArgumentError) do
|
131
151
|
@sl_connection.create_vms(@vm)
|
132
152
|
end
|
@@ -147,6 +167,18 @@ Shindo.tests("Fog::Compute[:softlayer] | server requests", ["softlayer"]) do
|
|
147
167
|
data_matches_schema(404) {response.status}
|
148
168
|
end
|
149
169
|
|
170
|
+
tests("#get_virtual_guest_active_tickets('99999999999999')") do
|
171
|
+
response = @sl_connection.get_virtual_guest_active_tickets(99999999999999)
|
172
|
+
data_matches_schema('SoftLayer_Exception_ObjectNotFound'){ response.body['code'] }
|
173
|
+
data_matches_schema(404) {response.status}
|
174
|
+
end
|
175
|
+
|
176
|
+
tests("#get_virtual_guest_upgrade_item_prices('99999999999999')") do
|
177
|
+
response = @sl_connection.get_virtual_guest_upgrade_item_prices(99999999999999)
|
178
|
+
data_matches_schema('SoftLayer_Exception_ObjectNotFound'){ response.body['code'] }
|
179
|
+
data_matches_schema(404) {response.status}
|
180
|
+
end
|
181
|
+
|
150
182
|
tests("#power_on_vm('99999999999999')") do
|
151
183
|
response = @sl_connection.power_on_vm(99999999999999)
|
152
184
|
data_matches_schema('SoftLayer_Exception_ObjectNotFound'){ response.body['code'] }
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Matheus Mina (<mfbmina@gmail.com>)
|
3
|
+
# © Copyright IBM Corporation 2015.
|
4
|
+
#
|
5
|
+
# LICENSE: MIT (http://opensource.org/licenses/MIT)
|
6
|
+
#
|
7
|
+
Shindo.tests("Fog::Softlayer[:product] | place_order_test", ["softlayer"]) do
|
8
|
+
|
9
|
+
@sl = Fog::Softlayer[:product]
|
10
|
+
|
11
|
+
tests('success') do
|
12
|
+
# should be an empty array
|
13
|
+
tests("#place_order") do
|
14
|
+
response = @sl.place_order
|
15
|
+
data_matches_schema(Hash) { response.body}
|
16
|
+
data_matches_schema(200) { response.status }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|