squall 1.1.0 → 1.2.0beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/LICENSE +1 -1
  2. data/README.md +1 -1
  3. data/lib/squall/support/base.rb +12 -37
  4. data/lib/squall/support/exception.rb +8 -8
  5. data/lib/squall/support/on_app_errors.rb +23 -0
  6. data/lib/squall/support/version.rb +1 -1
  7. data/lib/squall.rb +3 -1
  8. data/spec/squall/data_store_zone_spec.rb +3 -3
  9. data/spec/squall/firewall_rule_spec.rb +3 -3
  10. data/spec/squall/hypervisor_spec.rb +3 -3
  11. data/spec/squall/hypervisor_zone_spec.rb +3 -3
  12. data/spec/squall/ip_address_join_spec.rb +3 -3
  13. data/spec/squall/ip_address_spec.rb +1 -1
  14. data/spec/squall/network_spec.rb +3 -3
  15. data/spec/squall/network_zone_spec.rb +7 -7
  16. data/spec/squall/payment_spec.rb +3 -3
  17. data/spec/squall/role_spec.rb +3 -3
  18. data/spec/squall/support/base_spec.rb +2 -34
  19. data/spec/squall/template_spec.rb +1 -1
  20. data/spec/squall/transaction_spec.rb +1 -1
  21. data/spec/squall/user_group_spec.rb +2 -2
  22. data/spec/squall/user_spec.rb +7 -7
  23. data/spec/squall/virtual_machine_spec.rb +22 -22
  24. data/spec/squall/whitelist_spec.rb +4 -4
  25. data/spec/vcr_cassettes/data_store_zone/create.yml +1 -1
  26. data/spec/vcr_cassettes/data_store_zone/edit.yml +2 -2
  27. data/spec/vcr_cassettes/firewall_rule/create.yml +2 -2
  28. data/spec/vcr_cassettes/firewall_rule/edit.yml +2 -2
  29. data/spec/vcr_cassettes/hypervisor/add_network_join.yml +1 -1
  30. data/spec/vcr_cassettes/hypervisor/create.yml +1 -1
  31. data/spec/vcr_cassettes/hypervisor/edit.yml +1 -1
  32. data/spec/vcr_cassettes/hypervisor_zones/add_network_join.yml +1 -1
  33. data/spec/vcr_cassettes/hypervisor_zones/create.yml +1 -1
  34. data/spec/vcr_cassettes/hypervisor_zones/edit.yml +2 -2
  35. data/spec/vcr_cassettes/ipaddress/create.yml +1 -1
  36. data/spec/vcr_cassettes/ipaddress/edit.yml +1 -1
  37. data/spec/vcr_cassettes/ipaddress_join/assign.yml +2 -2
  38. data/spec/vcr_cassettes/network/create.yml +5 -5
  39. data/spec/vcr_cassettes/network/edit.yml +5 -5
  40. data/spec/vcr_cassettes/network_zones/create.yml +1 -1
  41. data/spec/vcr_cassettes/network_zones/edit.yml +2 -2
  42. data/spec/vcr_cassettes/payment/create.yml +2 -2
  43. data/spec/vcr_cassettes/payment/edit.yml +2 -2
  44. data/spec/vcr_cassettes/role/create.yml +1 -1
  45. data/spec/vcr_cassettes/role/edit.yml +1 -1
  46. data/spec/vcr_cassettes/user/create.yml +1 -1
  47. data/spec/vcr_cassettes/user/edit.yml +1 -1
  48. data/spec/vcr_cassettes/user/edit_role.yml +3 -3
  49. data/spec/vcr_cassettes/user_group/create.yml +1 -1
  50. data/spec/vcr_cassettes/user_group/edit.yml +2 -2
  51. data/spec/vcr_cassettes/virtual_machine/build.yml +2 -2
  52. data/spec/vcr_cassettes/virtual_machine/create.yml +1 -1
  53. data/spec/vcr_cassettes/virtual_machine/edit.yml +2 -2
  54. data/spec/vcr_cassettes/virtual_machine/migrate.yml +3 -3
  55. data/spec/vcr_cassettes/virtual_machine/resize.yml +2 -2
  56. data/spec/vcr_cassettes/virtual_machine/segregate.yml +3 -3
  57. data/spec/vcr_cassettes/whitelist/create.yml +2 -2
  58. data/spec/vcr_cassettes/whitelist/edit.yml +2 -2
  59. data/squall.gemspec +4 -2
  60. metadata +41 -26
@@ -34,7 +34,7 @@ describe Squall::VirtualMachine do
34
34
  end
35
35
 
36
36
  it "returns not found for invalid virtual_machines" do
37
- expect { @virtual_machine.show(404) }.to raise_error(Squall::NotFound)
37
+ expect { @virtual_machine.show(404) }.to raise_error(Squall::NotFoundError)
38
38
  end
39
39
 
40
40
  it "returns a virtual_machine" do
@@ -140,7 +140,7 @@ describe Squall::VirtualMachine do
140
140
  end
141
141
 
142
142
  it "returns not found for invalid virtual_machines" do
143
- expect { @virtual_machine.build(404, :template_id => 1) }.to raise_error(Squall::NotFound)
143
+ expect { @virtual_machine.build(404, :template_id => 1) }.to raise_error(Squall::NotFoundError)
144
144
  @virtual_machine.success.should be_false
145
145
  end
146
146
 
@@ -165,7 +165,7 @@ describe Squall::VirtualMachine do
165
165
  end
166
166
 
167
167
  it "404s on not found" do
168
- expect { @virtual_machine.edit(404, :label => 1) }.to raise_error(Squall::NotFound)
168
+ expect { @virtual_machine.edit(404, :label => 1) }.to raise_error(Squall::NotFoundError)
169
169
  end
170
170
 
171
171
  it "accepts all valid keys" do
@@ -216,7 +216,7 @@ describe Squall::VirtualMachine do
216
216
  end
217
217
 
218
218
  it "404s on not found" do
219
- expect { @virtual_machine.change_owner(404, 1) }.to raise_error(Squall::NotFound)
219
+ expect { @virtual_machine.change_owner(404, 1) }.to raise_error(Squall::NotFoundError)
220
220
  @virtual_machine.success.should be_false
221
221
  end
222
222
 
@@ -248,7 +248,7 @@ describe Squall::VirtualMachine do
248
248
  end
249
249
 
250
250
  it "404s on not found" do
251
- expect { @virtual_machine.change_password(404, 'password') }.to raise_error(Squall::NotFound)
251
+ expect { @virtual_machine.change_password(404, 'password') }.to raise_error(Squall::NotFoundError)
252
252
  @virtual_machine.success.should be_false
253
253
  end
254
254
 
@@ -266,7 +266,7 @@ describe Squall::VirtualMachine do
266
266
  end
267
267
 
268
268
  it "404s on not found" do
269
- expect { @virtual_machine.set_ssh_keys(404) }.to raise_error(Squall::NotFound)
269
+ expect { @virtual_machine.set_ssh_keys(404) }.to raise_error(Squall::NotFoundError)
270
270
  @virtual_machine.success.should be_false
271
271
  end
272
272
 
@@ -295,12 +295,12 @@ describe Squall::VirtualMachine do
295
295
  end
296
296
 
297
297
  it "404s on not found" do
298
- expect { @virtual_machine.migrate(404, :destination => 1) }.to raise_error(Squall::NotFound)
298
+ expect { @virtual_machine.migrate(404, :destination => 1) }.to raise_error(Squall::NotFoundError)
299
299
  @virtual_machine.success.should be_false
300
300
  end
301
301
 
302
302
  it "404s on unknown destination" do
303
- expect { @virtual_machine.migrate(1, :destination => 404) }.to raise_error(Squall::NotFound)
303
+ expect { @virtual_machine.migrate(1, :destination => 404) }.to raise_error(Squall::NotFoundError)
304
304
  @virtual_machine.success.should be_false
305
305
  end
306
306
 
@@ -320,7 +320,7 @@ describe Squall::VirtualMachine do
320
320
  end
321
321
 
322
322
  it "returns not found for invalid virtual_machines" do
323
- expect { @virtual_machine.set_vip(404) }.to raise_error(Squall::NotFound)
323
+ expect { @virtual_machine.set_vip(404) }.to raise_error(Squall::NotFoundError)
324
324
  end
325
325
 
326
326
  it "deletes a virtual_machine" do
@@ -344,7 +344,7 @@ describe Squall::VirtualMachine do
344
344
  end
345
345
 
346
346
  it "returns not found for invalid virtual_machines" do
347
- expect { @virtual_machine.delete(404) }.to raise_error(Squall::NotFound)
347
+ expect { @virtual_machine.delete(404) }.to raise_error(Squall::NotFoundError)
348
348
  end
349
349
 
350
350
  it "deletes a virtual_machine" do
@@ -360,7 +360,7 @@ describe Squall::VirtualMachine do
360
360
  end
361
361
 
362
362
  it "returns not found for invalid virtual_machines" do
363
- expect { @virtual_machine.resize(404, :memory => 1) }.to raise_error(Squall::NotFound)
363
+ expect { @virtual_machine.resize(404, :memory => 1) }.to raise_error(Squall::NotFoundError)
364
364
  end
365
365
 
366
366
  it "accepts memory" do
@@ -406,7 +406,7 @@ describe Squall::VirtualMachine do
406
406
  end
407
407
 
408
408
  it "returns not found for invalid virtual_machines" do
409
- expect { @virtual_machine.suspend(404) }.to raise_error(Squall::NotFound)
409
+ expect { @virtual_machine.suspend(404) }.to raise_error(Squall::NotFoundError)
410
410
  end
411
411
 
412
412
  it "suspends a virtual_machine" do
@@ -422,7 +422,7 @@ describe Squall::VirtualMachine do
422
422
  end
423
423
 
424
424
  it "returns not found for invalid virtual_machines" do
425
- expect { @virtual_machine.unlock(404) }.to raise_error(Squall::NotFound)
425
+ expect { @virtual_machine.unlock(404) }.to raise_error(Squall::NotFoundError)
426
426
  end
427
427
 
428
428
  it "unlocks a virtual_machine" do
@@ -439,7 +439,7 @@ describe Squall::VirtualMachine do
439
439
  end
440
440
 
441
441
  it "returns not found for invalid virtual_machines" do
442
- expect { @virtual_machine.startup(404) }.to raise_error(Squall::NotFound)
442
+ expect { @virtual_machine.startup(404) }.to raise_error(Squall::NotFoundError)
443
443
  @virtual_machine.success.should be_false
444
444
  end
445
445
 
@@ -457,7 +457,7 @@ describe Squall::VirtualMachine do
457
457
  end
458
458
 
459
459
  it "returns not found for invalid virtual_machines" do
460
- expect { @virtual_machine.shutdown(404) }.to raise_error(Squall::NotFound)
460
+ expect { @virtual_machine.shutdown(404) }.to raise_error(Squall::NotFoundError)
461
461
  @virtual_machine.success.should be_false
462
462
  end
463
463
 
@@ -475,7 +475,7 @@ describe Squall::VirtualMachine do
475
475
  end
476
476
 
477
477
  it "returns not found for invalid virtual_machines" do
478
- expect { @virtual_machine.stop(404) }.to raise_error(Squall::NotFound)
478
+ expect { @virtual_machine.stop(404) }.to raise_error(Squall::NotFoundError)
479
479
  @virtual_machine.success.should be_false
480
480
  end
481
481
 
@@ -493,7 +493,7 @@ describe Squall::VirtualMachine do
493
493
  end
494
494
 
495
495
  it "returns not found for invalid virtual_machines" do
496
- expect { @virtual_machine.reboot(404) }.to raise_error(Squall::NotFound)
496
+ expect { @virtual_machine.reboot(404) }.to raise_error(Squall::NotFoundError)
497
497
  @virtual_machine.success.should be_false
498
498
  end
499
499
 
@@ -522,16 +522,16 @@ describe Squall::VirtualMachine do
522
522
  end
523
523
 
524
524
  it "404s on not found" do
525
- expect { @virtual_machine.segregate(404, 1) }.to raise_error(Squall::NotFound)
525
+ expect { @virtual_machine.segregate(404, 1) }.to raise_error(Squall::NotFoundError)
526
526
  @virtual_machine.success.should be_false
527
527
  end
528
528
 
529
529
  it "returns 404 on unknown target vm id" do
530
- expect { @virtual_machine.segregate(1, 404) }.to raise_error(Squall::NotFound)
530
+ expect { @virtual_machine.segregate(1, 404) }.to raise_error(Squall::NotFoundError)
531
531
  @virtual_machine.success.should be_false
532
532
  end
533
533
 
534
- it "changes the user" do
534
+ it "segregates the VMS with given ids" do
535
535
  result = @virtual_machine.segregate(1, 2)
536
536
  @virtual_machine.success.should be_true
537
537
  end
@@ -546,7 +546,7 @@ describe Squall::VirtualMachine do
546
546
 
547
547
  it "returns not found for invalid virtual_machines" do
548
548
  pending "broken on OnApp (returning 500)" do
549
- expect { @virtual_machine.console(404) }.to raise_error(Squall::NotFound)
549
+ expect { @virtual_machine.console(404) }.to raise_error(Squall::NotFoundError)
550
550
  @virtual_machine.success.should be_false
551
551
  end
552
552
  end
@@ -568,7 +568,7 @@ describe Squall::VirtualMachine do
568
568
 
569
569
  it "returns not found for invalid virtual_machines" do
570
570
  pending "broken on OnApp (returning 500)" do
571
- expect { @virtual_machine.stats(404) }.to raise_error(Squall::NotFound)
571
+ expect { @virtual_machine.stats(404) }.to raise_error(Squall::NotFoundError)
572
572
  @virtual_machine.success.should be_false
573
573
  end
574
574
  end
@@ -31,7 +31,7 @@ describe Squall::Whitelist do
31
31
  end
32
32
 
33
33
  it "returns not found for invalid whitelists" do
34
- expect { @whitelist.show(1, 404) }.to raise_error(Squall::NotFound)
34
+ expect { @whitelist.show(1, 404) }.to raise_error(Squall::NotFoundError)
35
35
  end
36
36
 
37
37
  it "returns a whitelist" do
@@ -60,7 +60,7 @@ describe Squall::Whitelist do
60
60
  end
61
61
 
62
62
  it "raises an error for an invalid user id" do
63
- expect { @whitelist.create(404, @valid) }.to raise_error(Squall::NotFound)
63
+ expect { @whitelist.create(404, @valid) }.to raise_error(Squall::NotFoundError)
64
64
  end
65
65
 
66
66
  it "creates a whitelist for a user" do
@@ -90,7 +90,7 @@ describe Squall::Whitelist do
90
90
  end
91
91
 
92
92
  it "raises an error for an invalid whitelist id" do
93
- expect { @whitelist.edit(1, 404, @valid) }.to raise_error(Squall::NotFound)
93
+ expect { @whitelist.edit(1, 404, @valid) }.to raise_error(Squall::NotFoundError)
94
94
  end
95
95
  end
96
96
 
@@ -106,7 +106,7 @@ describe Squall::Whitelist do
106
106
  end
107
107
 
108
108
  it "returns NotFound for missing user" do
109
- expect { @whitelist.delete(1, 404) }.to raise_error(Squall::NotFound)
109
+ expect { @whitelist.delete(1, 404) }.to raise_error(Squall::NotFoundError)
110
110
  end
111
111
  end
112
112
 
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/data_store_zones.json?pack[label]=My%20zone
5
+ uri: http://<USER>:<PASS>@<URL>:80/data_store_zones.json?pack%5Blabel%5D=My+zone
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/data_store_zones/1.json?pack[label]=Updated%20zone
5
+ uri: http://<USER>:<PASS>@<URL>:80/data_store_zones/1.json?pack%5Blabel%5D=Updated+zone
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -41,7 +41,7 @@
41
41
  - !ruby/struct:VCR::HTTPInteraction
42
42
  request: !ruby/struct:VCR::Request
43
43
  method: :put
44
- uri: http://<USER>:<PASS>@<URL>:80/data_store_zones/404.json?pack[label]=My%20zone
44
+ uri: http://<USER>:<PASS>@<URL>:80/data_store_zones/404.json?pack%5Blabel%5D=My+zone
45
45
  body:
46
46
  headers:
47
47
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/firewall_rules.json?firewall_rule[command]=DROP&firewall_rule[protocol]=TCP&firewall_rule[network_interface_id]=1
5
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/firewall_rules.json?firewall_rule%5Bcommand%5D=DROP&firewall_rule%5Bprotocol%5D=TCP&firewall_rule%5Bnetwork_interface_id%5D=1
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :post
42
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/firewall_rules.json?firewall_rule[command]=DROP&firewall_rule[protocol]=TCP&firewall_rule[network_interface_id]=1
42
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/firewall_rules.json?firewall_rule%5Bcommand%5D=DROP&firewall_rule%5Bprotocol%5D=TCP&firewall_rule%5Bnetwork_interface_id%5D=1
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/firewall_rules/1.json?firewall_rule[port]=1000
5
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/firewall_rules/1.json?firewall_rule%5Bport%5D=1000
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :put
42
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/firewall_rules/404.json?firewall_rule[command]=DROP&firewall_rule[protocol]=TCP&firewall_rule[network_interface_id]=1
42
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/firewall_rules/404.json?firewall_rule%5Bcommand%5D=DROP&firewall_rule%5Bprotocol%5D=TCP&firewall_rule%5Bnetwork_interface_id%5D=1
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisors/1/network_joins.json?network_join[network_id]=1&network_join[interface]=interface
5
+ uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisors/1/network_joins.json?network_join%5Bnetwork_id%5D=1&network_join%5Binterface%5D=interface
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisors.json?hypervisor[label]=A%20new%20hypervisor&hypervisor[ip_address]=127.126.126.126&hypervisor[hypervisor_type]=xen
5
+ uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisors.json?hypervisor%5Blabel%5D=A+new+hypervisor&hypervisor%5Bip_address%5D=127.126.126.126&hypervisor%5Bhypervisor_type%5D=xen
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisors/1.json?hypervisor[label]=A%20new%20label
5
+ uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisors/1.json?hypervisor%5Blabel%5D=A+new+label
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisor_zones/1/network_joins.json?network_join[interface]=interface&network_join[network_id]=1
5
+ uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisor_zones/1/network_joins.json?network_join%5Binterface%5D=interface&network_join%5Bnetwork_id%5D=1
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisor_zones.json?pack[label]=My%20zone
5
+ uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisor_zones.json?pack%5Blabel%5D=My+zone
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisor_zones/1.json?pack[label]=Updated%20zone
5
+ uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisor_zones/1.json?pack%5Blabel%5D=Updated+zone
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -41,7 +41,7 @@
41
41
  - !ruby/struct:VCR::HTTPInteraction
42
42
  request: !ruby/struct:VCR::Request
43
43
  method: :put
44
- uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisor_zones/404.json?pack[label]=My%20zone
44
+ uri: http://<USER>:<PASS>@<URL>:80/settings/hypervisor_zones/404.json?pack%5Blabel%5D=My+zone
45
45
  body:
46
46
  headers:
47
47
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1/ip_addresses.json?ip_address[address]=109.123.91.24&ip_address[netmask]=255.255.255.194&ip_address[network_address]=109.123.91.66&ip_address[broadcast]=109.123.91.129&ip_address[gateway]=109.123.91.67
5
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1/ip_addresses.json?ip_address%5Baddress%5D=109.123.91.24&ip_address%5Bnetmask%5D=255.255.255.194&ip_address%5Bnetwork_address%5D=109.123.91.66&ip_address%5Bbroadcast%5D=109.123.91.129&ip_address%5Bgateway%5D=109.123.91.67
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1/ip_addresses/1.json?ip_address[address]=109.123.91.67&ip_address[netmask]=255.255.255.193&ip_address[network_address]=109.123.91.65&ip_address[broadcast]=109.123.91.128&ip_address[gateway]=109.123.91.66
5
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1/ip_addresses/1.json?ip_address%5Baddress%5D=109.123.91.67&ip_address%5Bnetmask%5D=255.255.255.193&ip_address%5Bnetwork_address%5D=109.123.91.65&ip_address%5Bbroadcast%5D=109.123.91.128&ip_address%5Bgateway%5D=109.123.91.66
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/ip_addresses.json?ip_address_join[network_interface_id]=1&ip_address_join[ip_address_id]=1
5
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/ip_addresses.json?ip_address_join%5Bnetwork_interface_id%5D=1&ip_address_join%5Bip_address_id%5D=1
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :post
42
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/ip_addresses.json?ip_address_join[network_interface_id]=1&ip_address_join[ip_address_id]=1
42
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/ip_addresses.json?ip_address_join%5Bnetwork_interface_id%5D=1&ip_address_join%5Bip_address_id%5D=1
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks.json?network[label]=networktaken
5
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks.json?network%5Blabel%5D=networktaken
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -41,7 +41,7 @@
41
41
  - !ruby/struct:VCR::HTTPInteraction
42
42
  request: !ruby/struct:VCR::Request
43
43
  method: :post
44
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks.json?network[identifier]=newnetworkid&network[label]=newnetwork&network[vlan]=1
44
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks.json?network%5Bidentifier%5D=newnetworkid&network%5Blabel%5D=newnetwork&network%5Bvlan%5D=1
45
45
  body:
46
46
  headers:
47
47
  content-type:
@@ -80,7 +80,7 @@
80
80
  - !ruby/struct:VCR::HTTPInteraction
81
81
  request: !ruby/struct:VCR::Request
82
82
  method: :post
83
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks.json?network[label]=newnetwork
83
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks.json?network%5Blabel%5D=newnetwork
84
84
  body:
85
85
  headers:
86
86
  content-type:
@@ -119,7 +119,7 @@
119
119
  - !ruby/struct:VCR::HTTPInteraction
120
120
  request: !ruby/struct:VCR::Request
121
121
  method: :post
122
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks.json?network[label]=newnetwork&network[vlan]=2
122
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks.json?network%5Blabel%5D=newnetwork&network%5Bvlan%5D=2
123
123
  body:
124
124
  headers:
125
125
  content-type:
@@ -158,7 +158,7 @@
158
158
  - !ruby/struct:VCR::HTTPInteraction
159
159
  request: !ruby/struct:VCR::Request
160
160
  method: :post
161
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks.json?network[identifier]=something&network[label]=newnetwork
161
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks.json?network%5Bidentifier%5D=something&network%5Blabel%5D=newnetwork
162
162
  body:
163
163
  headers:
164
164
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1.json?network[label]=one
5
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1.json?network%5Blabel%5D=one
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -41,7 +41,7 @@
41
41
  - !ruby/struct:VCR::HTTPInteraction
42
42
  request: !ruby/struct:VCR::Request
43
43
  method: :put
44
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1.json?network[network_group_id]=1
44
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1.json?network%5Bnetwork_group_id%5D=1
45
45
  body:
46
46
  headers:
47
47
  content-type:
@@ -80,7 +80,7 @@
80
80
  - !ruby/struct:VCR::HTTPInteraction
81
81
  request: !ruby/struct:VCR::Request
82
82
  method: :put
83
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1.json?network[identifier]=lolzsdfds
83
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1.json?network%5Bidentifier%5D=lolzsdfds
84
84
  body:
85
85
  headers:
86
86
  content-type:
@@ -119,7 +119,7 @@
119
119
  - !ruby/struct:VCR::HTTPInteraction
120
120
  request: !ruby/struct:VCR::Request
121
121
  method: :put
122
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1.json?network[vlan]=1
122
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1.json?network%5Bvlan%5D=1
123
123
  body:
124
124
  headers:
125
125
  content-type:
@@ -158,7 +158,7 @@
158
158
  - !ruby/struct:VCR::HTTPInteraction
159
159
  request: !ruby/struct:VCR::Request
160
160
  method: :put
161
- uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1.json?network[identifier]=woah&network[label]=two&network[vlan]=2
161
+ uri: http://<USER>:<PASS>@<URL>:80/settings/networks/1.json?network%5Bidentifier%5D=woah&network%5Blabel%5D=two&network%5Bvlan%5D=2
162
162
  body:
163
163
  headers:
164
164
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/network_zones.json?pack[label]=My%20zone
5
+ uri: http://<USER>:<PASS>@<URL>:80/network_zones.json?pack%5Blabel%5D=My+zone
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/network_zones/1.json?pack[label]=Updated%20zone
5
+ uri: http://<USER>:<PASS>@<URL>:80/network_zones/1.json?pack%5Blabel%5D=Updated+zone
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -41,7 +41,7 @@
41
41
  - !ruby/struct:VCR::HTTPInteraction
42
42
  request: !ruby/struct:VCR::Request
43
43
  method: :put
44
- uri: http://<USER>:<PASS>@<URL>:80/network_zones/404.json?pack[label]=My%20zone
44
+ uri: http://<USER>:<PASS>@<URL>:80/network_zones/404.json?pack%5Blabel%5D=My+zone
45
45
  body:
46
46
  headers:
47
47
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/users/404/payments.json?payment[amount]=500
5
+ uri: http://<USER>:<PASS>@<URL>:80/users/404/payments.json?payment%5Bamount%5D=500
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :post
42
- uri: http://<USER>:<PASS>@<URL>:80/users/1/payments.json?payment[amount]=500
42
+ uri: http://<USER>:<PASS>@<URL>:80/users/1/payments.json?payment%5Bamount%5D=500
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/users/1/payments/1.json?payment[amount]=100
5
+ uri: http://<USER>:<PASS>@<URL>:80/users/1/payments/1.json?payment%5Bamount%5D=100
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -41,7 +41,7 @@
41
41
  - !ruby/struct:VCR::HTTPInteraction
42
42
  request: !ruby/struct:VCR::Request
43
43
  method: :put
44
- uri: http://<USER>:<PASS>@<URL>:80/users/1/payments/404.json?payment[amount]=500
44
+ uri: http://<USER>:<PASS>@<URL>:80/users/1/payments/404.json?payment%5Bamount%5D=500
45
45
  body:
46
46
  headers:
47
47
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/roles.json?role[permission_ids]=1&role[label]=Test%20Create
5
+ uri: http://<USER>:<PASS>@<URL>:80/roles.json?role%5Bpermission_ids%5D=1&role%5Blabel%5D=Test+Create
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :put
42
- uri: http://<USER>:<PASS>@<URL>:80/roles/1.json?role[label]=New
42
+ uri: http://<USER>:<PASS>@<URL>:80/roles/1.json?role%5Blabel%5D=New
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/users.json?user[last_name]=Doe&user[email]=johndoe%40example.com&user[password]=CD2480A3413F&user[login]=johndoe&user[password_confirmation]=CD2480A3413F&user[first_name]=John
5
+ uri: http://<USER>:<PASS>@<URL>:80/users.json?user%5Blast_name%5D=Doe&user%5Bemail%5D=johndoe%40example.com&user%5Bpassword%5D=CD2480A3413F&user%5Blogin%5D=johndoe&user%5Bpassword_confirmation%5D=CD2480A3413F&user%5Bfirst_name%5D=John
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/users/1.json?user[first_name]=Test
5
+ uri: http://<USER>:<PASS>@<URL>:80/users/1.json?user%5Bfirst_name%5D=Test
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/users/500.json?user[role_ids][]=
5
+ uri: http://<USER>:<PASS>@<URL>:80/users/500.json?user%5Brole_ids%5D%5B%5D=
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :put
42
- uri: http://<USER>:<PASS>@<URL>:80/users/7.json?user[role_ids][]=4
42
+ uri: http://<USER>:<PASS>@<URL>:80/users/7.json?user%5Brole_ids%5D%5B%5D=4
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -78,7 +78,7 @@
78
78
  - !ruby/struct:VCR::HTTPInteraction
79
79
  request: !ruby/struct:VCR::Request
80
80
  method: :put
81
- uri: http://<USER>:<PASS>@<URL>:80/users/7.json?user[role_ids][]=4&user[role_ids][]=2
81
+ uri: http://<USER>:<PASS>@<URL>:80/users/7.json?user%5Brole_ids%5D%5B%5D=4&user%5Brole_ids%5D%5B%5D=2
82
82
  body:
83
83
  headers:
84
84
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/user_groups.json?user_group[label]=My%20new%20group
5
+ uri: http://<USER>:<PASS>@<URL>:80/user_groups.json?user_group%5Blabel%5D=My+new+group
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/user_groups/1.json?user_group[label]=My%20new%20group
5
+ uri: http://<USER>:<PASS>@<URL>:80/user_groups/1.json?user_group%5Blabel%5D=My+new+group
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -41,7 +41,7 @@
41
41
  - !ruby/struct:VCR::HTTPInteraction
42
42
  request: !ruby/struct:VCR::Request
43
43
  method: :put
44
- uri: http://<USER>:<PASS>@<URL>:80/user_groups/404.json?user_group[label]=My%20new%20group
44
+ uri: http://<USER>:<PASS>@<URL>:80/user_groups/404.json?user_group%5Blabel%5D=My+new+group
45
45
  body:
46
46
  headers:
47
47
  content-type: