rackconnect 0.0.1

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.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +44 -0
  6. data/Rakefile +5 -0
  7. data/lib/rackconnect.rb +14 -0
  8. data/lib/rackconnect/lib/auth.rb +27 -0
  9. data/lib/rackconnect/lib/bulk_nodes.rb +48 -0
  10. data/lib/rackconnect/lib/bulkable_model.rb +22 -0
  11. data/lib/rackconnect/lib/constants.rb +6 -0
  12. data/lib/rackconnect/lib/model.rb +72 -0
  13. data/lib/rackconnect/lib/request.rb +52 -0
  14. data/lib/rackconnect/lib/singleton_model.rb +19 -0
  15. data/lib/rackconnect/models/cloud_network.rb +7 -0
  16. data/lib/rackconnect/models/load_balancer_pool.rb +8 -0
  17. data/lib/rackconnect/models/load_balancer_pool_details.rb +8 -0
  18. data/lib/rackconnect/models/load_balancer_pool_node.rb +8 -0
  19. data/lib/rackconnect/models/load_balancer_pool_node_details.rb +10 -0
  20. data/lib/rackconnect/models/public_ip.rb +8 -0
  21. data/lib/rackconnect/models/server_group.rb +8 -0
  22. data/lib/rackconnect/models/server_group_details.rb +8 -0
  23. data/lib/rackconnect/models/server_group_node.rb +8 -0
  24. data/lib/rackconnect/models/server_group_node_details.rb +10 -0
  25. data/lib/rackconnect/version.rb +3 -0
  26. data/rackconnect.gemspec +29 -0
  27. data/spec/rackconnect/models/cloud_network_spec.rb +25 -0
  28. data/spec/rackconnect/models/load_balancer_pool_details_spec.rb +25 -0
  29. data/spec/rackconnect/models/load_balancer_pool_node_details.rb +23 -0
  30. data/spec/rackconnect/models/load_balancer_pool_node_details_spec.rb +45 -0
  31. data/spec/rackconnect/models/load_balancer_pool_node_spec.rb +37 -0
  32. data/spec/rackconnect/models/load_balancer_pool_spec.rb +39 -0
  33. data/spec/rackconnect/models/public_ip_spec.rb +45 -0
  34. data/spec/rackconnect/models/server_group_details_spec.rb +14 -0
  35. data/spec/rackconnect/models/server_group_node_details_spec.rb +45 -0
  36. data/spec/rackconnect/models/server_group_node_spec.rb +38 -0
  37. data/spec/rackconnect/models/server_group_spec.rb +53 -0
  38. data/spec/spec_helper.rb +25 -0
  39. data/spec/vcr/apiary/auth.yml +76 -0
  40. data/spec/vcr/apiary/lbpn_create.yml +52 -0
  41. data/spec/vcr/apiary/lbpnd_get_details.yml +86 -0
  42. data/spec/vcr/apiary/load_balancer_bulk_add_nodes.yml +58 -0
  43. data/spec/vcr/apiary/load_balancer_bulk_remove_nodes.yml +97 -0
  44. data/spec/vcr/apiary/load_balancer_pool.yml +57 -0
  45. data/spec/vcr/apiary/load_balancer_pool_details.yml +57 -0
  46. data/spec/vcr/apiary/load_balancer_pool_node.yml +48 -0
  47. data/spec/vcr/apiary/load_balancer_pool_node_destroy.yml +42 -0
  48. data/spec/vcr/apiary/load_balancer_pool_node_details.yml +57 -0
  49. data/spec/vcr/apiary/load_balancer_pool_nodes.yml +60 -0
  50. data/spec/vcr/apiary/load_balancer_pools.yml +85 -0
  51. data/spec/vcr/apiary/network.yml +51 -0
  52. data/spec/vcr/apiary/networks.yml +53 -0
  53. data/spec/vcr/apiary/pool.yml +57 -0
  54. data/spec/vcr/apiary/pools.yml +85 -0
  55. data/spec/vcr/apiary/public_ip.yml +66 -0
  56. data/spec/vcr/apiary/public_ip_create.yml +70 -0
  57. data/spec/vcr/apiary/public_ip_destroy.yml +42 -0
  58. data/spec/vcr/apiary/public_ips.yml +68 -0
  59. data/spec/vcr/apiary/public_ips_for_server.yml +68 -0
  60. data/spec/vcr/apiary/server_group.yml +57 -0
  61. data/spec/vcr/apiary/server_group_bulk_add_nodes.yml +58 -0
  62. data/spec/vcr/apiary/server_group_bulk_remove_nodes.yml +97 -0
  63. data/spec/vcr/apiary/server_group_create.yml +60 -0
  64. data/spec/vcr/apiary/server_group_destroy.yml +42 -0
  65. data/spec/vcr/apiary/server_group_details.yml +92 -0
  66. data/spec/vcr/apiary/server_group_node.yml +48 -0
  67. data/spec/vcr/apiary/server_group_node_destroy.yml +42 -0
  68. data/spec/vcr/apiary/server_group_node_details.yml +57 -0
  69. data/spec/vcr/apiary/server_group_nodes.yml +60 -0
  70. data/spec/vcr/apiary/server_groups.yml +85 -0
  71. data/spec/vcr/apiary/sgnd_for_server.yml +66 -0
  72. data/spec/vcr/apiary/sgnn_create.yml +52 -0
  73. metadata +260 -0
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://private-12275-rcv3.apiary-mock.com/v3/930035/load_balancer_pools/d6d3aa7c-dfa5-4e61-96ee-1d54ac1075d2
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - Cowboy
23
+ Connection:
24
+ - keep-alive
25
+ X-Apiary-Ratelimit-Limit:
26
+ - '120'
27
+ X-Apiary-Ratelimit-Remaining:
28
+ - '115'
29
+ Content-Type:
30
+ - application/json
31
+ X-Apiary-Transaction-Id:
32
+ - 54e62895c54b07030021d136
33
+ Date:
34
+ - Thu, 19 Feb 2015 18:16:53 GMT
35
+ Transfer-Encoding:
36
+ - chunked
37
+ Via:
38
+ - 1.1 vegur
39
+ body:
40
+ encoding: UTF-8
41
+ string: |-
42
+ {
43
+ "id": "d6d3aa7c-dfa5-4e61-96ee-1d54ac1075d2",
44
+ "name": "RCv3Test",
45
+ "node_counts": {
46
+ "cloud_servers": 3,
47
+ "external": 4,
48
+ "total": 7
49
+ },
50
+ "port": 80,
51
+ "status": "ACTIVE",
52
+ "status_detail": null,
53
+ "virtual_ip": "203.0.113.5"
54
+ }
55
+ http_version:
56
+ recorded_at: Thu, 19 Feb 2015 18:16:53 GMT
57
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,85 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://private-12275-rcv3.apiary-mock.com/v3/930035/load_balancer_pools
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - Cowboy
23
+ Connection:
24
+ - keep-alive
25
+ X-Apiary-Ratelimit-Limit:
26
+ - '120'
27
+ X-Apiary-Ratelimit-Remaining:
28
+ - '116'
29
+ Content-Type:
30
+ - application/json
31
+ X-Apiary-Transaction-Id:
32
+ - 54e62894ab018303006243de
33
+ Date:
34
+ - Thu, 19 Feb 2015 18:16:52 GMT
35
+ Transfer-Encoding:
36
+ - chunked
37
+ Via:
38
+ - 1.1 vegur
39
+ body:
40
+ encoding: UTF-8
41
+ string: |-
42
+ [
43
+ {
44
+ "id": "d6d3aa7c-dfa5-4e61-96ee-1d54ac1075d2",
45
+ "name": "RCv3Test",
46
+ "node_counts": {
47
+ "cloud_servers": 3,
48
+ "external": 4,
49
+ "total": 7
50
+ },
51
+ "port": 80,
52
+ "status": "ACTIVE",
53
+ "status_detail": null,
54
+ "virtual_ip": "203.0.113.5"
55
+ },
56
+ {
57
+ "id": "33021100-4abf-4836-9080-465a6d87ab68",
58
+ "name": "RCv3Test2",
59
+ "node_counts": {
60
+ "cloud_servers": 1,
61
+ "external": 0,
62
+ "total": 1
63
+ },
64
+ "port": 80,
65
+ "status": "ACTIVE",
66
+ "status_detail": null,
67
+ "virtual_ip": "203.0.113.7"
68
+ },
69
+ {
70
+ "id": "b644350a-301b-47b5-a411-c6e0f933c347",
71
+ "name": "RCv3Test3",
72
+ "node_counts": {
73
+ "cloud_servers": 2,
74
+ "external": 3,
75
+ "total": 5
76
+ },
77
+ "port": 443,
78
+ "status": "ACTIVE,
79
+ "status_detail": null",
80
+ "virtual_ip": "203.0.113.15"
81
+ }
82
+ ]
83
+ http_version:
84
+ recorded_at: Thu, 19 Feb 2015 18:16:52 GMT
85
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,66 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://private-12275-rcv3.apiary-mock.com/v3/930035/public_ips/2d0f586b-37a7-4ae0-adac-2743d5feb450
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - Cowboy
23
+ Connection:
24
+ - keep-alive
25
+ X-Apiary-Ratelimit-Limit:
26
+ - '120'
27
+ X-Apiary-Ratelimit-Remaining:
28
+ - '104'
29
+ Content-Type:
30
+ - application/json
31
+ X-Apiary-Transaction-Id:
32
+ - 54e62897ab018303006243e3
33
+ Date:
34
+ - Thu, 19 Feb 2015 18:16:55 GMT
35
+ Transfer-Encoding:
36
+ - chunked
37
+ Via:
38
+ - 1.1 vegur
39
+ body:
40
+ encoding: UTF-8
41
+ string: |-
42
+ {
43
+ "created": "2014-05-30T03:23:42Z",
44
+ "cloud_server": {
45
+ "cloud_network": {
46
+ "cidr": "192.168.100.0/24",
47
+ "created": "2014-05-25T01:23:42Z",
48
+ "id": "07426958-1ebf-4c38-b032-d456820ca21a",
49
+ "name": "RC-CLOUD",
50
+ "private_ip_v4": "192.168.100.5",
51
+ "updated": "2014-05-25T02:28:44Z"
52
+ },
53
+ "created": "2014-05-30T02:18:42Z",
54
+ "id": "d95ae0c4-6ab8-4873-b82f-f8433840cff2",
55
+ "name": "RCv3TestServer1",
56
+ "updated": "2014-05-30T02:19:18Z"
57
+ },
58
+ "id": "2d0f586b-37a7-4ae0-adac-2743d5feb450",
59
+ "public_ip_v4": "203.0.113.110",
60
+ "status": "ACTIVE",
61
+ "status_detail": null,
62
+ "updated": "2014-05-30T03:24:18Z"
63
+ }
64
+ http_version:
65
+ recorded_at: Thu, 19 Feb 2015 18:16:56 GMT
66
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,70 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://private-12275-rcv3.apiary-mock.com/v3/930035/public_ips
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ Content-Length:
17
+ - '2'
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ Server:
26
+ - Cowboy
27
+ Connection:
28
+ - keep-alive
29
+ X-Apiary-Ratelimit-Limit:
30
+ - '120'
31
+ X-Apiary-Ratelimit-Remaining:
32
+ - '102'
33
+ Content-Type:
34
+ - application/json
35
+ X-Apiary-Transaction-Id:
36
+ - 54e62899ab018303006243e5
37
+ Date:
38
+ - Thu, 19 Feb 2015 18:16:57 GMT
39
+ Transfer-Encoding:
40
+ - chunked
41
+ Via:
42
+ - 1.1 vegur
43
+ body:
44
+ encoding: UTF-8
45
+ string: |-
46
+ {
47
+ "created": "2014-05-30T03:23:42Z",
48
+ "cloud_server": {
49
+ "cloud_network": {
50
+ "cidr": "192.168.100.0/24",
51
+ "created": "2014-05-25T01:23:42Z",
52
+ "id": "07426958-1ebf-4c38-b032-d456820ca21a",
53
+ "name": "RC-CLOUD",
54
+ "private_ip_v4": "192.168.100.5",
55
+ "updated": "2014-05-25T02:28:44Z"
56
+ },
57
+ "created": "2014-05-30T02:18:42Z",
58
+ "id": "d95ae0c4-6ab8-4873-b82f-f8433840cff2",
59
+ "name": "RCv3TestServer1",
60
+ "updated": "2014-05-30T02:19:18Z"
61
+ },
62
+ "id": "2d0f586b-37a7-4ae0-adac-2743d5feb450",
63
+ "public_ip_v4": null,
64
+ "status": "ADDING",
65
+ "status_detail": null,
66
+ "updated": null
67
+ }
68
+ http_version:
69
+ recorded_at: Thu, 19 Feb 2015 18:16:57 GMT
70
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,42 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://private-12275-rcv3.apiary-mock.com/v3/930035/public_ips/2d0f586b-37a7-4ae0-adac-2743d5feb450
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 204
19
+ message: No Content
20
+ headers:
21
+ Server:
22
+ - Cowboy
23
+ Connection:
24
+ - keep-alive
25
+ X-Apiary-Ratelimit-Limit:
26
+ - '120'
27
+ X-Apiary-Ratelimit-Remaining:
28
+ - '101'
29
+ X-Apiary-Transaction-Id:
30
+ - 54e62899ab018303006243e6
31
+ Date:
32
+ - Thu, 19 Feb 2015 18:16:57 GMT
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Via:
36
+ - 1.1 vegur
37
+ body:
38
+ encoding: UTF-8
39
+ string: ''
40
+ http_version:
41
+ recorded_at: Thu, 19 Feb 2015 18:16:57 GMT
42
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://private-12275-rcv3.apiary-mock.com/v3/930035/public_ips
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - Cowboy
23
+ Connection:
24
+ - keep-alive
25
+ X-Apiary-Ratelimit-Limit:
26
+ - '120'
27
+ X-Apiary-Ratelimit-Remaining:
28
+ - '105'
29
+ Content-Type:
30
+ - application/json
31
+ X-Apiary-Transaction-Id:
32
+ - 54e62897c54b07030021d13b
33
+ Date:
34
+ - Thu, 19 Feb 2015 18:16:55 GMT
35
+ Transfer-Encoding:
36
+ - chunked
37
+ Via:
38
+ - 1.1 vegur
39
+ body:
40
+ encoding: UTF-8
41
+ string: |-
42
+ [
43
+ {
44
+ "created": "2014-05-30T03:23:42Z",
45
+ "cloud_server": {
46
+ "cloud_network": {
47
+ "cidr": "192.168.100.0/24",
48
+ "created": "2014-05-25T01:23:42Z",
49
+ "id": "07426958-1ebf-4c38-b032-d456820ca21a",
50
+ "name": "RC-CLOUD",
51
+ "private_ip_v4": "192.168.100.5",
52
+ "updated": "2014-05-25T02:28:44Z"
53
+ },
54
+ "created": "2014-05-30T02:18:42Z",
55
+ "id": "d95ae0c4-6ab8-4873-b82f-f8433840cff2",
56
+ "name": "RCv3TestServer1",
57
+ "updated": "2014-05-30T02:19:18Z"
58
+ },
59
+ "id": "2d0f586b-37a7-4ae0-adac-2743d5feb450",
60
+ "public_ip_v4": "203.0.113.110",
61
+ "status": "ACTIVE",
62
+ "status_detail": null,
63
+ "updated": "2014-05-30T03:24:18Z"
64
+ }
65
+ ]
66
+ http_version:
67
+ recorded_at: Thu, 19 Feb 2015 18:16:55 GMT
68
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://private-12275-rcv3.apiary-mock.com/v3/930035/public_ips?cloud_server_id=07426958-1ebf-4c38-b032-d456820ca21a
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - Cowboy
23
+ Connection:
24
+ - keep-alive
25
+ X-Apiary-Ratelimit-Limit:
26
+ - '120'
27
+ X-Apiary-Ratelimit-Remaining:
28
+ - '103'
29
+ Content-Type:
30
+ - application/json
31
+ X-Apiary-Transaction-Id:
32
+ - 54e628981bd66f0300687c49
33
+ Date:
34
+ - Thu, 19 Feb 2015 18:16:56 GMT
35
+ Transfer-Encoding:
36
+ - chunked
37
+ Via:
38
+ - 1.1 vegur
39
+ body:
40
+ encoding: UTF-8
41
+ string: |-
42
+ [
43
+ {
44
+ "created": "2014-05-30T03:23:42Z",
45
+ "cloud_server": {
46
+ "cloud_network": {
47
+ "cidr": "192.168.100.0/24",
48
+ "created": "2014-05-25T01:23:42Z",
49
+ "id": "07426958-1ebf-4c38-b032-d456820ca21a",
50
+ "name": "RC-CLOUD",
51
+ "private_ip_v4": "192.168.100.5",
52
+ "updated": "2014-05-25T02:28:44Z"
53
+ },
54
+ "created": "2014-05-30T02:18:42Z",
55
+ "id": "d95ae0c4-6ab8-4873-b82f-f8433840cff2",
56
+ "name": "RCv3TestServer1",
57
+ "updated": "2014-05-30T02:19:18Z"
58
+ },
59
+ "id": "2d0f586b-37a7-4ae0-adac-2743d5feb450",
60
+ "public_ip_v4": "203.0.113.110",
61
+ "status": "ACTIVE",
62
+ "status_detail": null,
63
+ "updated": "2014-05-30T03:24:18Z"
64
+ }
65
+ ]
66
+ http_version:
67
+ recorded_at: Thu, 19 Feb 2015 18:16:56 GMT
68
+ recorded_with: VCR 2.9.3