squall 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.rbenv-version +1 -0
- data/.rspec +1 -1
- data/.rvmrc +41 -1
- data/.travis.yml +13 -3
- data/README.md +122 -27
- data/Rakefile +5 -34
- data/lib/squall/data_store_zone.rb +58 -0
- data/lib/squall/firewall_rule.rb +66 -0
- data/lib/squall/hypervisor.rb +63 -11
- data/lib/squall/hypervisor_zone.rb +135 -0
- data/lib/squall/ip_address.rb +50 -3
- data/lib/squall/ip_address_join.rb +46 -0
- data/lib/squall/network.rb +21 -4
- data/lib/squall/network_zone.rb +73 -0
- data/lib/squall/payment.rb +59 -0
- data/lib/squall/role.rb +28 -11
- data/lib/squall/statistic.rb +3 -3
- data/lib/squall/{base.rb → support/base.rb} +8 -4
- data/lib/squall/{config.rb → support/config.rb} +4 -0
- data/lib/squall/{exception.rb → support/exception.rb} +0 -0
- data/lib/squall/{params.rb → support/params.rb} +0 -0
- data/lib/squall/support/version.rb +3 -0
- data/lib/squall/support/yaml.rb +5 -0
- data/lib/squall/template.rb +4 -0
- data/lib/squall/transaction.rb +4 -0
- data/lib/squall/user.rb +126 -30
- data/lib/squall/user_group.rb +56 -0
- data/lib/squall/virtual_machine.rb +176 -52
- data/lib/squall/whitelist.rb +74 -0
- data/lib/squall.rb +21 -12
- data/spec/spec_helper.rb +21 -16
- data/spec/squall/data_store_zone_spec.rb +97 -0
- data/spec/squall/firewall_rule_spec.rb +112 -0
- data/spec/squall/hypervisor_spec.rb +101 -48
- data/spec/squall/hypervisor_zone_spec.rb +190 -0
- data/spec/squall/ip_address_join_spec.rb +67 -0
- data/spec/squall/ip_address_spec.rb +68 -6
- data/spec/squall/network_spec.rb +0 -1
- data/spec/squall/network_zone_spec.rb +147 -0
- data/spec/squall/payment_spec.rb +98 -0
- data/spec/squall/role_spec.rb +31 -46
- data/spec/squall/statistic_spec.rb +7 -9
- data/spec/squall/{base_spec.rb → support/base_spec.rb} +5 -7
- data/spec/squall/{config_spec.rb → support/config_spec.rb} +0 -0
- data/spec/{params_spec.rb → squall/support/params_spec.rb} +0 -0
- data/spec/squall/template_spec.rb +0 -1
- data/spec/squall/transaction_spec.rb +0 -1
- data/spec/squall/user_group_spec.rb +74 -0
- data/spec/squall/user_spec.rb +142 -59
- data/spec/squall/virtual_machine_spec.rb +179 -67
- data/spec/squall/whitelist_spec.rb +113 -0
- data/spec/squall_spec.rb +4 -8
- data/spec/vcr_cassettes/data_store_zone/create.yml +40 -0
- data/spec/vcr_cassettes/data_store_zone/delete.yml +77 -0
- data/spec/vcr_cassettes/data_store_zone/edit.yml +77 -0
- data/spec/vcr_cassettes/data_store_zone/list.yml +40 -0
- data/spec/vcr_cassettes/data_store_zone/show.yml +77 -0
- data/spec/vcr_cassettes/firewall_rule/create.yml +75 -0
- data/spec/vcr_cassettes/firewall_rule/delete.yml +75 -0
- data/spec/vcr_cassettes/firewall_rule/edit.yml +75 -0
- data/spec/vcr_cassettes/firewall_rule/list.yml +40 -0
- data/spec/vcr_cassettes/hypervisor/add_data_store_join.yml +40 -0
- data/spec/vcr_cassettes/hypervisor/add_network_join.yml +40 -0
- data/spec/vcr_cassettes/hypervisor/create.yml +7 -44
- data/spec/vcr_cassettes/hypervisor/data_store_joins.yml +40 -0
- data/spec/vcr_cassettes/hypervisor/delete.yml +11 -11
- data/spec/vcr_cassettes/hypervisor/edit.yml +7 -46
- data/spec/vcr_cassettes/hypervisor/list.yml +7 -7
- data/spec/vcr_cassettes/hypervisor/network_joins.yml +40 -0
- data/spec/vcr_cassettes/hypervisor/reboot.yml +13 -13
- data/spec/vcr_cassettes/hypervisor/remove_data_store_join.yml +40 -0
- data/spec/vcr_cassettes/hypervisor/remove_network_join.yml +40 -0
- data/spec/vcr_cassettes/hypervisor/show.yml +13 -13
- data/spec/vcr_cassettes/hypervisor_zones/add_data_store_join.yml +40 -0
- data/spec/vcr_cassettes/hypervisor_zones/add_network_join.yml +40 -0
- data/spec/vcr_cassettes/hypervisor_zones/create.yml +40 -0
- data/spec/vcr_cassettes/hypervisor_zones/data_store_joins.yml +40 -0
- data/spec/vcr_cassettes/hypervisor_zones/delete.yml +77 -0
- data/spec/vcr_cassettes/hypervisor_zones/edit.yml +77 -0
- data/spec/vcr_cassettes/hypervisor_zones/hypervisors.yml +40 -0
- data/spec/vcr_cassettes/hypervisor_zones/list.yml +40 -0
- data/spec/vcr_cassettes/hypervisor_zones/network_joins.yml +40 -0
- data/spec/vcr_cassettes/hypervisor_zones/remove_data_store_join.yml +40 -0
- data/spec/vcr_cassettes/hypervisor_zones/remove_network_join.yml +40 -0
- data/spec/vcr_cassettes/hypervisor_zones/show.yml +77 -0
- data/spec/vcr_cassettes/ipaddress/create.yml +40 -0
- data/spec/vcr_cassettes/ipaddress/delete.yml +40 -0
- data/spec/vcr_cassettes/ipaddress/edit.yml +40 -0
- data/spec/vcr_cassettes/ipaddress/list.yml +17 -17
- data/spec/vcr_cassettes/ipaddress_join/assign.yml +77 -0
- data/spec/vcr_cassettes/ipaddress_join/delete.yml +77 -0
- data/spec/vcr_cassettes/ipaddress_join/list.yml +77 -0
- data/spec/vcr_cassettes/network/create.yml +15 -15
- data/spec/vcr_cassettes/network/delete.yml +6 -6
- data/spec/vcr_cassettes/network/edit.yml +18 -18
- data/spec/vcr_cassettes/network/list.yml +3 -3
- data/spec/vcr_cassettes/network_zones/attach.yml +114 -0
- data/spec/vcr_cassettes/network_zones/create.yml +40 -0
- data/spec/vcr_cassettes/network_zones/delete.yml +77 -0
- data/spec/vcr_cassettes/network_zones/detach.yml +114 -0
- data/spec/vcr_cassettes/network_zones/edit.yml +77 -0
- data/spec/vcr_cassettes/network_zones/list.yml +40 -0
- data/spec/vcr_cassettes/network_zones/show.yml +77 -0
- data/spec/vcr_cassettes/payment/create.yml +78 -0
- data/spec/vcr_cassettes/payment/delete.yml +77 -0
- data/spec/vcr_cassettes/payment/edit.yml +77 -0
- data/spec/vcr_cassettes/payment/list.yml +41 -0
- data/spec/vcr_cassettes/role/create.yml +7 -44
- data/spec/vcr_cassettes/role/delete.yml +6 -6
- data/spec/vcr_cassettes/role/edit.yml +13 -75
- data/spec/vcr_cassettes/role/list.yml +7 -7
- data/spec/vcr_cassettes/role/permissions.yml +7 -7
- data/spec/vcr_cassettes/role/show.yml +13 -13
- data/spec/vcr_cassettes/statistic/usage_statistics.yml +7 -7
- data/spec/vcr_cassettes/template/list.yml +3 -3
- data/spec/vcr_cassettes/template/make_public.yml +6 -6
- data/spec/vcr_cassettes/transaction/list.yml +3 -3
- data/spec/vcr_cassettes/transaction/show.yml +6 -6
- data/spec/vcr_cassettes/user/activate.yml +7 -7
- data/spec/vcr_cassettes/user/create.yml +7 -83
- data/spec/vcr_cassettes/user/data_store_zones.yml +79 -0
- data/spec/vcr_cassettes/user/delete.yml +11 -11
- data/spec/vcr_cassettes/user/edit.yml +40 -0
- data/spec/vcr_cassettes/user/edit_role.yml +9 -9
- data/spec/vcr_cassettes/user/generate_api_key.yml +7 -7
- data/spec/vcr_cassettes/user/hypervisors.yml +77 -0
- data/spec/vcr_cassettes/user/limits.yml +77 -0
- data/spec/vcr_cassettes/user/list.yml +8 -8
- data/spec/vcr_cassettes/user/monthly_bills.yml +40 -0
- data/spec/vcr_cassettes/user/network_zones.yml +79 -0
- data/spec/vcr_cassettes/user/show.yml +29 -29
- data/spec/vcr_cassettes/user/stats.yml +6 -6
- data/spec/vcr_cassettes/user/suspend.yml +7 -7
- data/spec/vcr_cassettes/user/virtual_machines.yml +18 -20
- data/spec/vcr_cassettes/user_group/create.yml +40 -0
- data/spec/vcr_cassettes/user_group/delete.yml +77 -0
- data/spec/vcr_cassettes/user_group/edit.yml +77 -0
- data/spec/vcr_cassettes/user_group/list.yml +40 -0
- data/spec/vcr_cassettes/virtual_machine/build.yml +7 -7
- data/spec/vcr_cassettes/virtual_machine/change_owner.yml +8 -8
- data/spec/vcr_cassettes/virtual_machine/change_password.yml +13 -13
- data/spec/vcr_cassettes/virtual_machine/console.yml +63 -0
- data/spec/vcr_cassettes/virtual_machine/create.yml +9 -11
- data/spec/vcr_cassettes/virtual_machine/delete.yml +11 -11
- data/spec/vcr_cassettes/virtual_machine/edit.yml +16 -18
- data/spec/vcr_cassettes/virtual_machine/list.yml +3 -3
- data/spec/vcr_cassettes/virtual_machine/migrate.yml +22 -24
- data/spec/vcr_cassettes/virtual_machine/reboot.yml +22 -22
- data/spec/vcr_cassettes/virtual_machine/resize.yml +13 -13
- data/spec/vcr_cassettes/virtual_machine/segregate.yml +114 -0
- data/spec/vcr_cassettes/virtual_machine/set_ssh_keys.yml +77 -0
- data/spec/vcr_cassettes/virtual_machine/set_vip.yml +77 -0
- data/spec/vcr_cassettes/virtual_machine/show.yml +6 -6
- data/spec/vcr_cassettes/virtual_machine/shutdown.yml +6 -6
- data/spec/vcr_cassettes/virtual_machine/startup.yml +6 -6
- data/spec/vcr_cassettes/virtual_machine/stats.yml +63 -0
- data/spec/vcr_cassettes/virtual_machine/stop.yml +22 -22
- data/spec/vcr_cassettes/virtual_machine/suspend.yml +13 -13
- data/spec/vcr_cassettes/virtual_machine/unlock.yml +13 -13
- data/spec/vcr_cassettes/virtual_machine/unsuspend.yml +6 -6
- data/spec/vcr_cassettes/whitelist/create.yml +77 -0
- data/spec/vcr_cassettes/whitelist/delete.yml +77 -0
- data/spec/vcr_cassettes/whitelist/edit.yml +77 -0
- data/spec/vcr_cassettes/whitelist/list.yml +40 -0
- data/spec/vcr_cassettes/whitelist/show.yml +77 -0
- data/squall.gemspec +3 -2
- metadata +247 -131
- data/Gemfile.lock +0 -100
- data/lib/squall/version.rb +0 -3
@@ -0,0 +1,114 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/strict_vm.json?virtual_machine[strict_virtual_machine_id]=1
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
content-type:
|
9
|
+
- application/json
|
10
|
+
authorization:
|
11
|
+
- Basic <REDACTED>
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 404
|
15
|
+
message: Not Found
|
16
|
+
headers:
|
17
|
+
x-ua-compatible:
|
18
|
+
- IE=Edge,chrome=1
|
19
|
+
x-powered-by:
|
20
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.1
|
21
|
+
content-type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
x-runtime:
|
24
|
+
- "0.026716"
|
25
|
+
server:
|
26
|
+
- Apache/2.2.3 (CentOS)
|
27
|
+
date:
|
28
|
+
- Thu, 09 Feb 2012 15:24:55 GMT
|
29
|
+
set-cookie:
|
30
|
+
- <REDACTED>
|
31
|
+
status:
|
32
|
+
- "404"
|
33
|
+
cache-control:
|
34
|
+
- no-cache
|
35
|
+
transfer-encoding:
|
36
|
+
- chunked
|
37
|
+
body: "{\"errors\":[\"Resource not found\"]}"
|
38
|
+
http_version: "1.1"
|
39
|
+
- !ruby/struct:VCR::HTTPInteraction
|
40
|
+
request: !ruby/struct:VCR::Request
|
41
|
+
method: :post
|
42
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/strict_vm.json?virtual_machine[strict_virtual_machine_id]=404
|
43
|
+
body:
|
44
|
+
headers:
|
45
|
+
content-type:
|
46
|
+
- application/json
|
47
|
+
authorization:
|
48
|
+
- Basic <REDACTED>
|
49
|
+
response: !ruby/struct:VCR::Response
|
50
|
+
status: !ruby/struct:VCR::ResponseStatus
|
51
|
+
code: 404
|
52
|
+
message: Not Found
|
53
|
+
headers:
|
54
|
+
x-ua-compatible:
|
55
|
+
- IE=Edge,chrome=1
|
56
|
+
x-powered-by:
|
57
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.1
|
58
|
+
content-type:
|
59
|
+
- application/json; charset=utf-8
|
60
|
+
date:
|
61
|
+
- Thu, 09 Feb 2012 15:24:55 GMT
|
62
|
+
server:
|
63
|
+
- Apache/2.2.3 (CentOS)
|
64
|
+
x-runtime:
|
65
|
+
- "0.027102"
|
66
|
+
set-cookie:
|
67
|
+
- <REDACTED>
|
68
|
+
cache-control:
|
69
|
+
- no-cache
|
70
|
+
status:
|
71
|
+
- "404"
|
72
|
+
transfer-encoding:
|
73
|
+
- chunked
|
74
|
+
body: "{\"errors\":[\"Resource not found\"]}"
|
75
|
+
http_version: "1.1"
|
76
|
+
- !ruby/struct:VCR::HTTPInteraction
|
77
|
+
request: !ruby/struct:VCR::Request
|
78
|
+
method: :post
|
79
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/strict_vm.json?virtual_machine[strict_virtual_machine_id]=2
|
80
|
+
body:
|
81
|
+
headers:
|
82
|
+
content-type:
|
83
|
+
- application/json
|
84
|
+
authorization:
|
85
|
+
- Basic <REDACTED>
|
86
|
+
response: !ruby/struct:VCR::Response
|
87
|
+
status: !ruby/struct:VCR::ResponseStatus
|
88
|
+
code: 201
|
89
|
+
message: Created
|
90
|
+
headers:
|
91
|
+
x-ua-compatible:
|
92
|
+
- IE=Edge,chrome=1
|
93
|
+
location:
|
94
|
+
- http://<URL>/virtual_machines/cjiul6p4pljqzy
|
95
|
+
x-powered-by:
|
96
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.1
|
97
|
+
content-type:
|
98
|
+
- application/json; charset=utf-8
|
99
|
+
x-runtime:
|
100
|
+
- "0.053333"
|
101
|
+
server:
|
102
|
+
- Apache/2.2.3 (CentOS)
|
103
|
+
date:
|
104
|
+
- Thu, 09 Feb 2012 15:24:56 GMT
|
105
|
+
set-cookie:
|
106
|
+
- <REDACTED>
|
107
|
+
status:
|
108
|
+
- "201"
|
109
|
+
cache-control:
|
110
|
+
- no-cache
|
111
|
+
transfer-encoding:
|
112
|
+
- chunked
|
113
|
+
body: "{\"virtual_machine\":{\"monthly_bandwidth_used\":25927,\"aflexi_id\":null,\"cpus\":1,\"label\":\"oscar-vm-do-not-delete\",\"created_at\":\"2011-12-19T16:34:51Z\",\"operating_system_distro\":\"ubuntu\",\"cpu_shares\":34,\"enable_autoscale\":true,\"operating_system\":\"linux\",\"template_id\":264,\"allowed_swap\":true,\"local_remote_access_port\":5905,\"memory\":1000,\"updated_at\":\"2012-02-09T15:22:31Z\",\"allow_resize_without_reboot\":false,\"recovery_mode\":false,\"enable_monitis\":true,\"hypervisor_id\":1,\"id\":1343,\"update_billing_stat\":false,\"xen_id\":524,\"admin_note\":null,\"allowed_hot_migrate\":false,\"user_id\":942,\"note\":null,\"strict_virtual_machine_id\":1359,\"suspended\":true,\"vip\":true,\"booted\":true,\"hostname\":\"t\",\"max_memory\":16000,\"template_label\":\"Debian 6.0.0 LAMP x64\",\"total_disk_size\":10,\"add_to_marketplace\":null,\"identifier\":\"cjiul6p4pljqzy\",\"initial_root_password\":\"11111111-t\",\"min_disk_size\":5,\"remote_access_password\":\"co7f0jb3ua5h\",\"built\":true,\"locked\":false,\"state\":\"new\",\"ip_addresses\":[{\"ip_address\":{\"address\":\"109.123.105.212\",\"disallowed_primary\":false,\"netmask\":\"255.255.255.240\",\"created_at\":\"2010-10-27T15:28:22Z\",\"broadcast\":\"109.123.105.223\",\"updated_at\":\"2011-10-10T09:03:14Z\",\"network_id\":1,\"network_address\":\"109.123.105.208\",\"id\":17,\"free\":false,\"gateway\":\"109.123.105.209\"}}]}}"
|
114
|
+
http_version: "1.1"
|
@@ -0,0 +1,77 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/set_ssh_keys.json
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
content-type:
|
9
|
+
- application/json
|
10
|
+
authorization:
|
11
|
+
- Basic <REDACTED>
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 404
|
15
|
+
message: Not Found
|
16
|
+
headers:
|
17
|
+
x-ua-compatible:
|
18
|
+
- IE=Edge,chrome=1
|
19
|
+
x-powered-by:
|
20
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.1
|
21
|
+
content-type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
date:
|
24
|
+
- Wed, 08 Feb 2012 16:58:45 GMT
|
25
|
+
server:
|
26
|
+
- Apache/2.2.3 (CentOS)
|
27
|
+
x-runtime:
|
28
|
+
- "0.029641"
|
29
|
+
set-cookie:
|
30
|
+
- <REDACTED>
|
31
|
+
cache-control:
|
32
|
+
- no-cache
|
33
|
+
status:
|
34
|
+
- "404"
|
35
|
+
transfer-encoding:
|
36
|
+
- chunked
|
37
|
+
body: "{\"errors\":[\"Resource not found\"]}"
|
38
|
+
http_version: "1.1"
|
39
|
+
- !ruby/struct:VCR::HTTPInteraction
|
40
|
+
request: !ruby/struct:VCR::Request
|
41
|
+
method: :post
|
42
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/set_ssh_keys.json
|
43
|
+
body:
|
44
|
+
headers:
|
45
|
+
content-type:
|
46
|
+
- application/json
|
47
|
+
authorization:
|
48
|
+
- Basic <REDACTED>
|
49
|
+
response: !ruby/struct:VCR::Response
|
50
|
+
status: !ruby/struct:VCR::ResponseStatus
|
51
|
+
code: 201
|
52
|
+
message: Created
|
53
|
+
headers:
|
54
|
+
x-ua-compatible:
|
55
|
+
- IE=Edge,chrome=1
|
56
|
+
location:
|
57
|
+
- http://www.example.com/virtual_machines/rq2l6j9j8jg51a
|
58
|
+
x-powered-by:
|
59
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.1
|
60
|
+
content-type:
|
61
|
+
- application/json; charset=utf-8
|
62
|
+
x-runtime:
|
63
|
+
- "0.053561"
|
64
|
+
server:
|
65
|
+
- Apache/2.2.3 (CentOS)
|
66
|
+
date:
|
67
|
+
- Wed, 08 Feb 2012 16:58:45 GMT
|
68
|
+
set-cookie:
|
69
|
+
- <REDACTED>
|
70
|
+
status:
|
71
|
+
- "201"
|
72
|
+
cache-control:
|
73
|
+
- no-cache
|
74
|
+
transfer-encoding:
|
75
|
+
- chunked
|
76
|
+
body: "{\"virtual_machine\":{\"monthly_bandwidth_used\":30090,\"aflexi_id\":null,\"cpus\":1,\"label\":\"testing\",\"created_at\":\"2011-12-16T11:46:18Z\",\"operating_system_distro\":\"2003\",\"cpu_shares\":25,\"enable_autoscale\":false,\"operating_system\":\"windows\",\"template_id\":1,\"allowed_swap\":false,\"local_remote_access_port\":null,\"memory\":2048,\"updated_at\":\"2012-02-08T16:56:46Z\",\"allow_resize_without_reboot\":false,\"recovery_mode\":false,\"enable_monitis\":false,\"hypervisor_id\":1,\"id\":1333,\"update_billing_stat\":false,\"xen_id\":null,\"admin_note\":null,\"allowed_hot_migrate\":false,\"user_id\":100,\"note\":null,\"strict_virtual_machine_id\":null,\"suspended\":false,\"vip\":null,\"booted\":false,\"hostname\":\"VH\",\"max_memory\":32768,\"template_label\":\"Windows Server 2003 x86\",\"total_disk_size\":14,\"add_to_marketplace\":null,\"identifier\":\"rq2l6j9j8jg51a\",\"initial_root_password\":\"kghxzabxml61\",\"min_disk_size\":10,\"remote_access_password\":\"mt3n2r4gdg99\",\"built\":true,\"locked\":false,\"state\":\"new\",\"ip_addresses\":[{\"ip_address\":{\"address\":\"83.170.67.231\",\"disallowed_primary\":false,\"netmask\":\"255.255.255.224\",\"created_at\":\"2011-01-20T11:23:30Z\",\"broadcast\":\"83.170.67.255\",\"updated_at\":\"2011-10-10T09:15:15Z\",\"network_id\":1,\"network_address\":\"83.170.67.224\",\"id\":33448,\"free\":false,\"gateway\":\"83.170.67.225\"}}]}}"
|
77
|
+
http_version: "1.1"
|
@@ -0,0 +1,77 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/set_vip.json
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
content-type:
|
9
|
+
- application/json
|
10
|
+
authorization:
|
11
|
+
- Basic <REDACTED>
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 404
|
15
|
+
message: Not Found
|
16
|
+
headers:
|
17
|
+
x-ua-compatible:
|
18
|
+
- IE=Edge,chrome=1
|
19
|
+
x-powered-by:
|
20
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.1
|
21
|
+
content-type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
date:
|
24
|
+
- Wed, 08 Feb 2012 17:54:26 GMT
|
25
|
+
server:
|
26
|
+
- Apache/2.2.3 (CentOS)
|
27
|
+
x-runtime:
|
28
|
+
- "0.044084"
|
29
|
+
set-cookie:
|
30
|
+
- <REDACTED>
|
31
|
+
cache-control:
|
32
|
+
- no-cache
|
33
|
+
status:
|
34
|
+
- "404"
|
35
|
+
transfer-encoding:
|
36
|
+
- chunked
|
37
|
+
body: "{\"errors\":[\"Resource not found\"]}"
|
38
|
+
http_version: "1.1"
|
39
|
+
- !ruby/struct:VCR::HTTPInteraction
|
40
|
+
request: !ruby/struct:VCR::Request
|
41
|
+
method: :post
|
42
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/set_vip.json
|
43
|
+
body:
|
44
|
+
headers:
|
45
|
+
content-type:
|
46
|
+
- application/json
|
47
|
+
authorization:
|
48
|
+
- Basic <REDACTED>
|
49
|
+
response: !ruby/struct:VCR::Response
|
50
|
+
status: !ruby/struct:VCR::ResponseStatus
|
51
|
+
code: 201
|
52
|
+
message: Created
|
53
|
+
headers:
|
54
|
+
x-ua-compatible:
|
55
|
+
- IE=Edge,chrome=1
|
56
|
+
location:
|
57
|
+
- http://www.example.com/virtual_machines/rq2l6j9j8jg51a
|
58
|
+
x-powered-by:
|
59
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.1
|
60
|
+
content-type:
|
61
|
+
- application/json; charset=utf-8
|
62
|
+
x-runtime:
|
63
|
+
- "0.072173"
|
64
|
+
server:
|
65
|
+
- Apache/2.2.3 (CentOS)
|
66
|
+
date:
|
67
|
+
- Wed, 08 Feb 2012 17:54:27 GMT
|
68
|
+
set-cookie:
|
69
|
+
- <REDACTED>
|
70
|
+
status:
|
71
|
+
- "201"
|
72
|
+
cache-control:
|
73
|
+
- no-cache
|
74
|
+
transfer-encoding:
|
75
|
+
- chunked
|
76
|
+
body: "{\"virtual_machine\":{\"monthly_bandwidth_used\":30090,\"aflexi_id\":null,\"cpus\":1,\"label\":\"testing\",\"created_at\":\"2011-12-16T11:46:18Z\",\"operating_system_distro\":\"2003\",\"cpu_shares\":25,\"enable_autoscale\":false,\"operating_system\":\"windows\",\"template_id\":1,\"allowed_swap\":false,\"local_remote_access_port\":null,\"memory\":2048,\"updated_at\":\"2012-02-08T17:54:27Z\",\"allow_resize_without_reboot\":false,\"recovery_mode\":false,\"enable_monitis\":false,\"hypervisor_id\":1,\"id\":1333,\"update_billing_stat\":false,\"xen_id\":null,\"admin_note\":null,\"allowed_hot_migrate\":false,\"user_id\":100,\"note\":null,\"strict_virtual_machine_id\":null,\"suspended\":false,\"vip\":true,\"booted\":false,\"hostname\":\"VH\",\"max_memory\":32768,\"template_label\":\"Windows Server 2003 x86\",\"total_disk_size\":14,\"add_to_marketplace\":null,\"identifier\":\"rq2l6j9j8jg51a\",\"initial_root_password\":\"kghxzabxml61\",\"min_disk_size\":10,\"remote_access_password\":\"mt3n2r4gdg99\",\"built\":true,\"locked\":false,\"state\":\"new\",\"ip_addresses\":[{\"ip_address\":{\"address\":\"83.170.67.231\",\"disallowed_primary\":false,\"netmask\":\"255.255.255.224\",\"created_at\":\"2011-01-20T11:23:30Z\",\"broadcast\":\"83.170.67.255\",\"updated_at\":\"2011-10-10T09:15:15Z\",\"network_id\":1,\"network_address\":\"83.170.67.224\",\"id\":33448,\"free\":false,\"gateway\":\"83.170.67.225\"}}]}}"
|
77
|
+
http_version: "1.1"
|
@@ -2,13 +2,13 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: http
|
5
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404.json
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
content-type:
|
9
9
|
- application/json
|
10
10
|
authorization:
|
11
|
-
- Basic
|
11
|
+
- Basic <REDACTED>
|
12
12
|
response: !ruby/struct:VCR::Response
|
13
13
|
status: !ruby/struct:VCR::ResponseStatus
|
14
14
|
code: 404
|
@@ -27,7 +27,7 @@
|
|
27
27
|
x-runtime:
|
28
28
|
- "2.822767"
|
29
29
|
set-cookie:
|
30
|
-
-
|
30
|
+
- <REDACTED>
|
31
31
|
cache-control:
|
32
32
|
- no-cache
|
33
33
|
status:
|
@@ -39,13 +39,13 @@
|
|
39
39
|
- !ruby/struct:VCR::HTTPInteraction
|
40
40
|
request: !ruby/struct:VCR::Request
|
41
41
|
method: :get
|
42
|
-
uri: http
|
42
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1.json
|
43
43
|
body:
|
44
44
|
headers:
|
45
45
|
content-type:
|
46
46
|
- application/json
|
47
47
|
authorization:
|
48
|
-
- Basic
|
48
|
+
- Basic <REDACTED>
|
49
49
|
response: !ruby/struct:VCR::Response
|
50
50
|
status: !ruby/struct:VCR::ResponseStatus
|
51
51
|
code: 200
|
@@ -66,7 +66,7 @@
|
|
66
66
|
date:
|
67
67
|
- Tue, 19 Apr 2011 18:32:58 GMT
|
68
68
|
set-cookie:
|
69
|
-
-
|
69
|
+
- <REDACTED>
|
70
70
|
status:
|
71
71
|
- "200"
|
72
72
|
cache-control:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: http
|
5
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/shutdown.json
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
content-type:
|
9
9
|
- application/json
|
10
10
|
authorization:
|
11
|
-
- Basic
|
11
|
+
- Basic <REDACTED>
|
12
12
|
response: !ruby/struct:VCR::Response
|
13
13
|
status: !ruby/struct:VCR::ResponseStatus
|
14
14
|
code: 404
|
@@ -27,7 +27,7 @@
|
|
27
27
|
x-runtime:
|
28
28
|
- "0.062045"
|
29
29
|
set-cookie:
|
30
|
-
-
|
30
|
+
- <REDACTED>
|
31
31
|
cache-control:
|
32
32
|
- no-cache
|
33
33
|
status:
|
@@ -39,13 +39,13 @@
|
|
39
39
|
- !ruby/struct:VCR::HTTPInteraction
|
40
40
|
request: !ruby/struct:VCR::Request
|
41
41
|
method: :post
|
42
|
-
uri: http
|
42
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/shutdown.json
|
43
43
|
body:
|
44
44
|
headers:
|
45
45
|
content-type:
|
46
46
|
- application/json
|
47
47
|
authorization:
|
48
|
-
- Basic
|
48
|
+
- Basic <REDACTED>
|
49
49
|
response: !ruby/struct:VCR::Response
|
50
50
|
status: !ruby/struct:VCR::ResponseStatus
|
51
51
|
code: 201
|
@@ -66,7 +66,7 @@
|
|
66
66
|
x-runtime:
|
67
67
|
- "0.033748"
|
68
68
|
set-cookie:
|
69
|
-
-
|
69
|
+
- <REDACTED>
|
70
70
|
cache-control:
|
71
71
|
- no-cache
|
72
72
|
status:
|
@@ -2,13 +2,13 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: http
|
5
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/startup.json
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
content-type:
|
9
9
|
- application/json
|
10
10
|
authorization:
|
11
|
-
- Basic
|
11
|
+
- Basic <REDACTED>
|
12
12
|
response: !ruby/struct:VCR::Response
|
13
13
|
status: !ruby/struct:VCR::ResponseStatus
|
14
14
|
code: 404
|
@@ -27,7 +27,7 @@
|
|
27
27
|
x-runtime:
|
28
28
|
- "1.803755"
|
29
29
|
set-cookie:
|
30
|
-
-
|
30
|
+
- <REDACTED>
|
31
31
|
cache-control:
|
32
32
|
- no-cache
|
33
33
|
status:
|
@@ -39,13 +39,13 @@
|
|
39
39
|
- !ruby/struct:VCR::HTTPInteraction
|
40
40
|
request: !ruby/struct:VCR::Request
|
41
41
|
method: :post
|
42
|
-
uri: http
|
42
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/startup.json
|
43
43
|
body:
|
44
44
|
headers:
|
45
45
|
content-type:
|
46
46
|
- application/json
|
47
47
|
authorization:
|
48
|
-
- Basic
|
48
|
+
- Basic <REDACTED>
|
49
49
|
response: !ruby/struct:VCR::Response
|
50
50
|
status: !ruby/struct:VCR::ResponseStatus
|
51
51
|
code: 201
|
@@ -66,7 +66,7 @@
|
|
66
66
|
date:
|
67
67
|
- Tue, 03 May 2011 13:55:56 GMT
|
68
68
|
set-cookie:
|
69
|
-
-
|
69
|
+
- <REDACTED>
|
70
70
|
status:
|
71
71
|
- "201"
|
72
72
|
cache-control:
|
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/vm_stats.json
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
content-type:
|
9
|
+
- application/json
|
10
|
+
authorization:
|
11
|
+
- Basic <REDACTED>
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
|
+
code: 500
|
15
|
+
message: Internal Server Error
|
16
|
+
headers:
|
17
|
+
x-powered-by:
|
18
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.1
|
19
|
+
content-type:
|
20
|
+
- text/html; charset=UTF-8
|
21
|
+
date:
|
22
|
+
- Thu, 09 Feb 2012 15:43:48 GMT
|
23
|
+
server:
|
24
|
+
- Apache/2.2.3 (CentOS)
|
25
|
+
x-runtime:
|
26
|
+
- "0.007573"
|
27
|
+
status:
|
28
|
+
- "500"
|
29
|
+
transfer-encoding:
|
30
|
+
- chunked
|
31
|
+
body: <html><body><h1>500 Internal Server Error</h1>If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong.</body></html>
|
32
|
+
http_version: "1.1"
|
33
|
+
- !ruby/struct:VCR::HTTPInteraction
|
34
|
+
request: !ruby/struct:VCR::Request
|
35
|
+
method: :post
|
36
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/vm_stats.json
|
37
|
+
body:
|
38
|
+
headers:
|
39
|
+
content-type:
|
40
|
+
- application/json
|
41
|
+
authorization:
|
42
|
+
- Basic <REDACTED>
|
43
|
+
response: !ruby/struct:VCR::Response
|
44
|
+
status: !ruby/struct:VCR::ResponseStatus
|
45
|
+
code: 500
|
46
|
+
message: Internal Server Error
|
47
|
+
headers:
|
48
|
+
x-powered-by:
|
49
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.1
|
50
|
+
content-type:
|
51
|
+
- text/html; charset=UTF-8
|
52
|
+
x-runtime:
|
53
|
+
- "0.007573"
|
54
|
+
server:
|
55
|
+
- Apache/2.2.3 (CentOS)
|
56
|
+
date:
|
57
|
+
- Thu, 09 Feb 2012 15:43:48 GMT
|
58
|
+
status:
|
59
|
+
- "500"
|
60
|
+
transfer-encoding:
|
61
|
+
- chunked
|
62
|
+
body: <html><body><h1>500 Internal Server Error</h1>If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong.</body></html>
|
63
|
+
http_version: "1.1"
|
@@ -2,13 +2,13 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: http
|
5
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/stop.json
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
content-type:
|
9
9
|
- application/json
|
10
10
|
authorization:
|
11
|
-
- Basic
|
11
|
+
- Basic <REDACTED>
|
12
12
|
response: !ruby/struct:VCR::Response
|
13
13
|
status: !ruby/struct:VCR::ResponseStatus
|
14
14
|
code: 404
|
@@ -20,32 +20,32 @@
|
|
20
20
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.1
|
21
21
|
content-type:
|
22
22
|
- application/json; charset=utf-8
|
23
|
-
|
24
|
-
-
|
23
|
+
date:
|
24
|
+
- Thu, 09 Feb 2012 14:46:27 GMT
|
25
25
|
server:
|
26
26
|
- Apache/2.2.3 (CentOS)
|
27
|
-
|
28
|
-
-
|
27
|
+
x-runtime:
|
28
|
+
- "0.027202"
|
29
29
|
set-cookie:
|
30
|
-
-
|
31
|
-
status:
|
32
|
-
- "404"
|
30
|
+
- <REDACTED>
|
33
31
|
cache-control:
|
34
32
|
- no-cache
|
33
|
+
status:
|
34
|
+
- "404"
|
35
35
|
transfer-encoding:
|
36
36
|
- chunked
|
37
|
-
body: "{\"
|
37
|
+
body: "{\"errors\":[\"Resource not found\"]}"
|
38
38
|
http_version: "1.1"
|
39
39
|
- !ruby/struct:VCR::HTTPInteraction
|
40
40
|
request: !ruby/struct:VCR::Request
|
41
41
|
method: :post
|
42
|
-
uri: http
|
42
|
+
uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/stop.json
|
43
43
|
body:
|
44
44
|
headers:
|
45
45
|
content-type:
|
46
46
|
- application/json
|
47
47
|
authorization:
|
48
|
-
- Basic
|
48
|
+
- Basic <REDACTED>
|
49
49
|
response: !ruby/struct:VCR::Response
|
50
50
|
status: !ruby/struct:VCR::ResponseStatus
|
51
51
|
code: 201
|
@@ -53,25 +53,25 @@
|
|
53
53
|
headers:
|
54
54
|
x-ua-compatible:
|
55
55
|
- IE=Edge,chrome=1
|
56
|
+
location:
|
57
|
+
- http://<URL>/virtual_machines/cjiul6p4pljqzy
|
56
58
|
x-powered-by:
|
57
59
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.1
|
58
|
-
location:
|
59
|
-
- http://www.example.com/virtual_machines/1
|
60
60
|
content-type:
|
61
61
|
- application/json; charset=utf-8
|
62
|
-
|
63
|
-
-
|
62
|
+
x-runtime:
|
63
|
+
- "0.064845"
|
64
64
|
server:
|
65
65
|
- Apache/2.2.3 (CentOS)
|
66
|
-
|
67
|
-
-
|
66
|
+
date:
|
67
|
+
- Thu, 09 Feb 2012 14:46:27 GMT
|
68
68
|
set-cookie:
|
69
|
-
-
|
70
|
-
cache-control:
|
71
|
-
- no-cache
|
69
|
+
- <REDACTED>
|
72
70
|
status:
|
73
71
|
- "201"
|
72
|
+
cache-control:
|
73
|
+
- no-cache
|
74
74
|
transfer-encoding:
|
75
75
|
- chunked
|
76
|
-
body: "{\"virtual_machine\":{\"
|
76
|
+
body: "{\"virtual_machine\":{\"monthly_bandwidth_used\":25927,\"aflexi_id\":null,\"cpus\":1,\"label\":\"oscar-vm-do-not-delete\",\"created_at\":\"2011-12-19T16:34:51Z\",\"operating_system_distro\":\"ubuntu\",\"cpu_shares\":34,\"enable_autoscale\":true,\"operating_system\":\"linux\",\"template_id\":264,\"allowed_swap\":true,\"local_remote_access_port\":5905,\"memory\":1000,\"updated_at\":\"2012-02-09T14:46:27Z\",\"allow_resize_without_reboot\":false,\"recovery_mode\":false,\"enable_monitis\":true,\"hypervisor_id\":1,\"id\":1343,\"update_billing_stat\":true,\"xen_id\":517,\"admin_note\":null,\"allowed_hot_migrate\":false,\"user_id\":942,\"note\":null,\"strict_virtual_machine_id\":null,\"suspended\":true,\"vip\":true,\"booted\":true,\"hostname\":\"t\",\"max_memory\":16000,\"template_label\":\"Debian 6.0.0 LAMP x64\",\"total_disk_size\":10,\"add_to_marketplace\":null,\"identifier\":\"cjiul6p4pljqzy\",\"initial_root_password\":\"11111111-t\",\"min_disk_size\":5,\"remote_access_password\":\"2zxybrrq0lyq\",\"built\":true,\"locked\":true,\"state\":\"new\",\"ip_addresses\":[{\"ip_address\":{\"address\":\"109.123.105.212\",\"disallowed_primary\":false,\"netmask\":\"255.255.255.240\",\"created_at\":\"2010-10-27T15:28:22Z\",\"broadcast\":\"109.123.105.223\",\"updated_at\":\"2011-10-10T09:03:14Z\",\"network_id\":1,\"network_address\":\"109.123.105.208\",\"id\":17,\"free\":false,\"gateway\":\"109.123.105.209\"}}]}}"
|
77
77
|
http_version: "1.1"
|