fog-softlayer 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTORS.md +1 -0
  3. data/examples/account.md +82 -0
  4. data/examples/compute.md +20 -4
  5. data/examples/network.md +6 -0
  6. data/lib/fog/softlayer.rb +5 -0
  7. data/lib/fog/softlayer/account.rb +66 -0
  8. data/lib/fog/softlayer/compute.rb +0 -2
  9. data/lib/fog/softlayer/models/account/brand.rb +50 -0
  10. data/lib/fog/softlayer/models/account/brands.rb +31 -0
  11. data/lib/fog/softlayer/models/compute/server.rb +52 -17
  12. data/lib/fog/softlayer/models/network/datacenter.rb +4 -0
  13. data/lib/fog/softlayer/network.rb +1 -1
  14. data/lib/fog/softlayer/requests/account/create_brand.rb +41 -0
  15. data/lib/fog/softlayer/requests/account/get_account_owned_brands.rb +58 -0
  16. data/lib/fog/softlayer/requests/account/get_brand.rb +36 -0
  17. data/lib/fog/softlayer/requests/account/get_brand_owned_accounts.rb +111 -0
  18. data/lib/fog/softlayer/requests/network/get_maintenance_windows.rb +82 -0
  19. data/lib/fog/softlayer/requests/product/place_order.rb +7 -17
  20. data/lib/fog/softlayer/storage.rb +11 -0
  21. data/lib/fog/softlayer/version.rb +1 -1
  22. data/tests/softlayer/account/helper.rb +8 -0
  23. data/tests/softlayer/account/schema.rb +38 -0
  24. data/tests/softlayer/models/account/brand_tests.rb +66 -0
  25. data/tests/softlayer/models/compute/server_tests.rb +17 -2
  26. data/tests/softlayer/models/network/datacenter_tests.rb +32 -0
  27. data/tests/softlayer/network/helper.rb +8 -0
  28. data/tests/softlayer/network/schema.rb +20 -0
  29. data/tests/softlayer/requests/account/account_tests.rb +31 -0
  30. data/tests/softlayer/requests/account/brand_tests.rb +59 -0
  31. data/tests/softlayer/requests/compute/bmc_tests.rb +56 -1
  32. data/tests/softlayer/requests/compute/key_pair_tests.rb +0 -7
  33. data/tests/softlayer/requests/compute/tag_tests.rb +0 -1
  34. data/tests/softlayer/requests/compute/vm_tests.rb +60 -4
  35. data/tests/softlayer/requests/network/datacenter_tests.rb +44 -0
  36. metadata +21 -3
@@ -0,0 +1,44 @@
1
+ #
2
+ # Author:: Matheus Francisco Barra Mina (<mfbmina@gmail.com>)
3
+ # © Copyright IBM Corporation 2015.
4
+ #
5
+ # LICENSE: MIT (http://opensource.org/licenses/MIT)
6
+ #
7
+
8
+ Shindo.tests("Fog::Network[:softlayer] | datacenter requests", ["softlayer"]) do
9
+
10
+ @sl = Fog::Network[:softlayer]
11
+
12
+ tests('success') do
13
+ tests("#get_datacenters") do
14
+ response = @sl.get_datacenters
15
+ data_matches_schema(Array) { response.body }
16
+ data_matches_schema(Hash) { response.body.first }
17
+ data_matches_schema(200) {response.status}
18
+ end
19
+
20
+ tests("#get_maintenance_windows(location_id, begin_date, end_date, slots_number)") do
21
+ response = @sl.get_maintenance_windows(1, "2015-06-01", "2015-06-02", 1)
22
+ data_matches_schema(Array) { response.body }
23
+ data_matches_schema(200) {response.status}
24
+ end
25
+ end
26
+
27
+ tests('failure') do
28
+ tests("#get_maintenance_windows(nil, begin_date, end_date, slots_number)") do
29
+ raises(ArgumentError) { @sl.get_maintenance_windows(nil, "2015-06-01", "2015-06-02", 1) }
30
+ end
31
+
32
+ tests("#get_maintenance_windows(location_id, nil, end_date, slots_number)") do
33
+ raises(ArgumentError) { @sl.get_maintenance_windows(1, nil, "2015-06-02", 1) }
34
+ end
35
+
36
+ tests("#get_maintenance_windows(location_id, begin_date, nil, slots_number)") do
37
+ raises(ArgumentError) { @sl.get_maintenance_windows(1, "2015-06-01", nil, 1) }
38
+ end
39
+
40
+ tests("#get_maintenance_windows(location_id, begin_date, end_date)") do
41
+ raises(ArgumentError) { @sl.get_maintenance_windows(1, "2015-06-01", "2015-06-02") }
42
+ end
43
+ end
44
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-softlayer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Eldridge
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-12 00:00:00.000000000 Z
11
+ date: 2015-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
@@ -199,6 +199,7 @@ files:
199
199
  - docs/fog-softlayer-CCLA.pdf
200
200
  - docs/fog-softlayer-CLA.pdf
201
201
  - examples/README.md
202
+ - examples/account.md
202
203
  - examples/compute.md
203
204
  - examples/dns.md
204
205
  - examples/getting_started.md
@@ -212,11 +213,14 @@ files:
212
213
  - gemfiles/Gemfile-edge
213
214
  - gemfiles/Gemfile-ruby-1.8.7
214
215
  - lib/fog/softlayer.rb
216
+ - lib/fog/softlayer/account.rb
215
217
  - lib/fog/softlayer/compute.rb
216
218
  - lib/fog/softlayer/compute/shared.rb
217
219
  - lib/fog/softlayer/dns.rb
218
220
  - lib/fog/softlayer/ext/hash.rb
219
221
  - lib/fog/softlayer/ext/string.rb
222
+ - lib/fog/softlayer/models/account/brand.rb
223
+ - lib/fog/softlayer/models/account/brands.rb
220
224
  - lib/fog/softlayer/models/compute/flavor.rb
221
225
  - lib/fog/softlayer/models/compute/flavors.rb
222
226
  - lib/fog/softlayer/models/compute/image.rb
@@ -253,6 +257,10 @@ files:
253
257
  - lib/fog/softlayer/models/storage/files.rb
254
258
  - lib/fog/softlayer/network.rb
255
259
  - lib/fog/softlayer/product.rb
260
+ - lib/fog/softlayer/requests/account/create_brand.rb
261
+ - lib/fog/softlayer/requests/account/get_account_owned_brands.rb
262
+ - lib/fog/softlayer/requests/account/get_brand.rb
263
+ - lib/fog/softlayer/requests/account/get_brand_owned_accounts.rb
256
264
  - lib/fog/softlayer/requests/compute/create_bare_metal_server.rb
257
265
  - lib/fog/softlayer/requests/compute/create_bare_metal_tags.rb
258
266
  - lib/fog/softlayer/requests/compute/create_key_pair.rb
@@ -316,6 +324,7 @@ files:
316
324
  - lib/fog/softlayer/requests/network/get_global_ip_records.rb
317
325
  - lib/fog/softlayer/requests/network/get_ip_address.rb
318
326
  - lib/fog/softlayer/requests/network/get_ip_addresses.rb
327
+ - lib/fog/softlayer/requests/network/get_maintenance_windows.rb
319
328
  - lib/fog/softlayer/requests/network/get_network.rb
320
329
  - lib/fog/softlayer/requests/network/get_network_tags.rb
321
330
  - lib/fog/softlayer/requests/network/get_portable_subnet_package_id.rb
@@ -372,10 +381,13 @@ files:
372
381
  - tests/helpers/schema_validator_tests.rb
373
382
  - tests/helpers/succeeds_helper.rb
374
383
  - tests/lorem.txt
384
+ - tests/softlayer/account/helper.rb
385
+ - tests/softlayer/account/schema.rb
375
386
  - tests/softlayer/compute/helper.rb
376
387
  - tests/softlayer/compute/schema.rb
377
388
  - tests/softlayer/compute_tests.rb
378
389
  - tests/softlayer/helper.rb
390
+ - tests/softlayer/models/account/brand_tests.rb
379
391
  - tests/softlayer/models/compute/flavor_tests.rb
380
392
  - tests/softlayer/models/compute/image_tests.rb
381
393
  - tests/softlayer/models/compute/key_pair_tests.rb
@@ -384,16 +396,22 @@ files:
384
396
  - tests/softlayer/models/dns/domains_tests.rb
385
397
  - tests/softlayer/models/dns/record_tests.rb
386
398
  - tests/softlayer/models/dns/records_tests.rb
399
+ - tests/softlayer/models/network/datacenter_tests.rb
387
400
  - tests/softlayer/models/product/item_tests.rb
388
401
  - tests/softlayer/models/product/items_tests.rb
389
402
  - tests/softlayer/models/product/package_tests.rb
390
403
  - tests/softlayer/models/product/packages_tests.rb
391
404
  - tests/softlayer/models/storage/directory_tests.rb
392
405
  - tests/softlayer/models/storage/file_tests.rb
406
+ - tests/softlayer/network/helper.rb
407
+ - tests/softlayer/network/schema.rb
408
+ - tests/softlayer/requests/account/account_tests.rb
409
+ - tests/softlayer/requests/account/brand_tests.rb
393
410
  - tests/softlayer/requests/compute/bmc_tests.rb
394
411
  - tests/softlayer/requests/compute/key_pair_tests.rb
395
412
  - tests/softlayer/requests/compute/tag_tests.rb
396
413
  - tests/softlayer/requests/compute/vm_tests.rb
414
+ - tests/softlayer/requests/network/datacenter_tests.rb
397
415
  - tests/softlayer/requests/network/network_tests.rb
398
416
  - tests/softlayer/requests/product/get_package_item.rb
399
417
  - tests/softlayer/requests/product/get_package_items.rb
@@ -423,7 +441,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
423
441
  version: '0'
424
442
  requirements: []
425
443
  rubyforge_project:
426
- rubygems_version: 2.4.5
444
+ rubygems_version: 2.4.7
427
445
  signing_key:
428
446
  specification_version: 4
429
447
  summary: This library can be used as a module for `fog` or as standalone provider