fog 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +5 -5
  2. data/.github/stale.yml +17 -0
  3. data/.travis.yml +1 -0
  4. data/CHANGELOG.md +37 -0
  5. data/README.md +3 -3
  6. data/fog.gemspec +6 -6
  7. data/lib/fog.rb +0 -1
  8. data/lib/fog/bin.rb +0 -1
  9. data/lib/fog/bin/brightbox.rb +2 -2
  10. data/lib/fog/cloudstack/models/compute/server.rb +2 -0
  11. data/lib/fog/linode/requests/compute/avail_datacenters.rb +1 -0
  12. data/lib/fog/opennebula/compute.rb +6 -1
  13. data/lib/fog/opennebula/requests/compute/OpenNebulaVNC.rb +5 -1
  14. data/lib/fog/version.rb +1 -1
  15. data/lib/tasks/changelog_task.rb +1 -0
  16. data/spec/fog/bin/atmos_spec.rb +0 -10
  17. data/spec/fog/bin/aws_spec.rb +0 -18
  18. data/spec/fog/bin/baremetalcloud_spec.rb +0 -10
  19. data/spec/fog/bin/brightbox_spec.rb +2 -2
  20. data/spec/fog/bin_spec.rb +0 -3
  21. data/tests/cloudsigma/models/snapshot_tests.rb +2 -0
  22. data/tests/cloudsigma/models/snapshots_tests.rb +1 -0
  23. data/tests/cloudsigma/requests/snapshots_tests.rb +1 -0
  24. data/tests/cloudsigma/requests/volumes_tests.rb +1 -1
  25. data/tests/cloudstack/compute/models/volume_tests.rb +1 -1
  26. data/tests/compute/helper.rb +0 -9
  27. data/tests/dns/helper.rb +0 -6
  28. data/tests/helpers/mock_helper.rb +0 -2
  29. data/tests/opennebula/compute_tests.rb +5 -2
  30. data/tests/opennebula/models/compute/flavor_tests.rb +5 -1
  31. data/tests/opennebula/models/compute/flavors_tests.rb +5 -2
  32. data/tests/opennebula/models/compute/group_tests.rb +5 -2
  33. data/tests/opennebula/models/compute/groups_tests.rb +5 -2
  34. data/tests/opennebula/models/compute/network_tests.rb +5 -1
  35. data/tests/opennebula/models/compute/networks_tests.rb +5 -2
  36. data/tests/opennebula/requests/compute/vm_allocate_tests.rb +5 -1
  37. data/tests/opennebula/requests/compute/vm_suspend_resume_tests.rb +5 -2
  38. metadata +26 -375
  39. data/lib/fog/bin/bluebox.rb +0 -36
  40. data/lib/fog/bluebox.rb +0 -3
  41. data/lib/fog/bluebox/blb.rb +0 -82
  42. data/lib/fog/bluebox/compute.rb +0 -98
  43. data/lib/fog/bluebox/core.rb +0 -12
  44. data/lib/fog/bluebox/dns.rb +0 -101
  45. data/lib/fog/bluebox/models/blb/lb_application.rb +0 -29
  46. data/lib/fog/bluebox/models/blb/lb_applications.rb +0 -24
  47. data/lib/fog/bluebox/models/blb/lb_backend.rb +0 -19
  48. data/lib/fog/bluebox/models/blb/lb_backends.rb +0 -27
  49. data/lib/fog/bluebox/models/blb/lb_service.rb +0 -32
  50. data/lib/fog/bluebox/models/blb/lb_services.rb +0 -27
  51. data/lib/fog/bluebox/models/compute/flavor.rb +0 -41
  52. data/lib/fog/bluebox/models/compute/flavors.rb +0 -24
  53. data/lib/fog/bluebox/models/compute/image.rb +0 -30
  54. data/lib/fog/bluebox/models/compute/images.rb +0 -24
  55. data/lib/fog/bluebox/models/compute/location.rb +0 -13
  56. data/lib/fog/bluebox/models/compute/locations.rb +0 -24
  57. data/lib/fog/bluebox/models/compute/server.rb +0 -121
  58. data/lib/fog/bluebox/models/compute/servers.rb +0 -32
  59. data/lib/fog/bluebox/models/dns/record.rb +0 -52
  60. data/lib/fog/bluebox/models/dns/records.rb +0 -32
  61. data/lib/fog/bluebox/models/dns/zone.rb +0 -62
  62. data/lib/fog/bluebox/models/dns/zones.rb +0 -24
  63. data/lib/fog/bluebox/parsers/dns/create_record.rb +0 -22
  64. data/lib/fog/bluebox/parsers/dns/create_zone.rb +0 -22
  65. data/lib/fog/bluebox/parsers/dns/get_record.rb +0 -17
  66. data/lib/fog/bluebox/parsers/dns/get_records.rb +0 -24
  67. data/lib/fog/bluebox/parsers/dns/get_zone.rb +0 -22
  68. data/lib/fog/bluebox/parsers/dns/get_zones.rb +0 -26
  69. data/lib/fog/bluebox/requests/blb/add_machine_to_lb_application.rb +0 -33
  70. data/lib/fog/bluebox/requests/blb/add_machine_to_lb_backend.rb +0 -31
  71. data/lib/fog/bluebox/requests/blb/get_lb_application.rb +0 -32
  72. data/lib/fog/bluebox/requests/blb/get_lb_applications.rb +0 -30
  73. data/lib/fog/bluebox/requests/blb/get_lb_backend.rb +0 -35
  74. data/lib/fog/bluebox/requests/blb/get_lb_backends.rb +0 -35
  75. data/lib/fog/bluebox/requests/blb/get_lb_machine.rb +0 -34
  76. data/lib/fog/bluebox/requests/blb/get_lb_machines.rb +0 -34
  77. data/lib/fog/bluebox/requests/blb/get_lb_service.rb +0 -35
  78. data/lib/fog/bluebox/requests/blb/get_lb_services.rb +0 -35
  79. data/lib/fog/bluebox/requests/blb/remove_machine_from_lb_backend.rb +0 -28
  80. data/lib/fog/bluebox/requests/blb/update_lb_backend_machine.rb +0 -29
  81. data/lib/fog/bluebox/requests/compute/create_block.rb +0 -44
  82. data/lib/fog/bluebox/requests/compute/create_template.rb +0 -25
  83. data/lib/fog/bluebox/requests/compute/destroy_block.rb +0 -24
  84. data/lib/fog/bluebox/requests/compute/destroy_template.rb +0 -24
  85. data/lib/fog/bluebox/requests/compute/get_block.rb +0 -24
  86. data/lib/fog/bluebox/requests/compute/get_blocks.rb +0 -26
  87. data/lib/fog/bluebox/requests/compute/get_location.rb +0 -24
  88. data/lib/fog/bluebox/requests/compute/get_locations.rb +0 -22
  89. data/lib/fog/bluebox/requests/compute/get_product.rb +0 -24
  90. data/lib/fog/bluebox/requests/compute/get_products.rb +0 -23
  91. data/lib/fog/bluebox/requests/compute/get_template.rb +0 -24
  92. data/lib/fog/bluebox/requests/compute/get_templates.rb +0 -24
  93. data/lib/fog/bluebox/requests/compute/reboot_block.rb +0 -25
  94. data/lib/fog/bluebox/requests/dns/create_record.rb +0 -44
  95. data/lib/fog/bluebox/requests/dns/create_zone.rb +0 -48
  96. data/lib/fog/bluebox/requests/dns/delete_record.rb +0 -27
  97. data/lib/fog/bluebox/requests/dns/delete_zone.rb +0 -27
  98. data/lib/fog/bluebox/requests/dns/get_record.rb +0 -36
  99. data/lib/fog/bluebox/requests/dns/get_records.rb +0 -37
  100. data/lib/fog/bluebox/requests/dns/get_zone.rb +0 -40
  101. data/lib/fog/bluebox/requests/dns/get_zones.rb +0 -39
  102. data/lib/fog/bluebox/requests/dns/update_record.rb +0 -30
  103. data/lib/fog/bluebox/requests/dns/update_zone.rb +0 -26
  104. data/lib/fog/ovirt.rb +0 -1
  105. data/lib/fog/ovirt/requests/compute/activate_volume.rb +0 -22
  106. data/lib/fog/ovirt/requests/compute/deactivate_volume.rb +0 -22
  107. data/spec/fog/bin/bluebox_spec.rb +0 -55
  108. data/spec/fog/compute_spec.rb +0 -19
  109. data/spec/fog/dns_spec.rb +0 -19
  110. data/tests/bluebox/requests/blb/helper.rb +0 -64
  111. data/tests/bluebox/requests/blb/lb_tests.rb +0 -75
  112. data/tests/bluebox/requests/compute/block_tests.rb +0 -83
  113. data/tests/bluebox/requests/compute/helper.rb +0 -16
  114. data/tests/bluebox/requests/compute/location_tests.rb +0 -32
  115. data/tests/bluebox/requests/compute/product_tests.rb +0 -34
  116. data/tests/bluebox/requests/compute/template_tests.rb +0 -37
  117. data/tests/bluebox/requests/dns/dns_tests.rb +0 -258
@@ -1,24 +0,0 @@
1
- require 'fog/core/collection'
2
- require 'fog/bluebox/models/dns/zone'
3
-
4
- module Fog
5
- module DNS
6
- class Bluebox
7
- class Zones < Fog::Collection
8
- model Fog::DNS::Bluebox::Zone
9
-
10
- def all
11
- data = service.get_zones.body['zones']
12
- load(data)
13
- end
14
-
15
- def get(zone_id)
16
- data = service.get_zone(zone_id).body
17
- new(data)
18
- rescue Fog::Service::NotFound
19
- nil
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,22 +0,0 @@
1
- module Fog
2
- module Parsers
3
- module DNS
4
- module Bluebox
5
- class CreateRecord < Fog::Parsers::Base
6
- def reset
7
- @response = {}
8
- end
9
-
10
- def end_element(name)
11
- case name
12
- when 'serial', 'ttl', 'retry', 'refresh', 'minimum', 'record-count', 'expires'
13
- @response[name] = value.to_i
14
- when 'name', 'id'
15
- @response[name] = value
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,22 +0,0 @@
1
- module Fog
2
- module Parsers
3
- module DNS
4
- module Bluebox
5
- class CreateZone < Fog::Parsers::Base
6
- def reset
7
- @response = {}
8
- end
9
-
10
- def end_element(name)
11
- case name
12
- when 'serial', 'ttl', 'retry', 'refresh', 'minimum', 'record-count', 'expires'
13
- @response[name] = value.to_i
14
- when 'name', 'id'
15
- @response[name] = value
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,17 +0,0 @@
1
- module Fog
2
- module Parsers
3
- module DNS
4
- module Bluebox
5
- class GetRecord < Fog::Parsers::Base
6
- def reset
7
- @response = { }
8
- end
9
-
10
- def end_element(name)
11
- @response[name] = value
12
- end
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Parsers
3
- module DNS
4
- module Bluebox
5
- class GetRecords < Fog::Parsers::Base
6
- def reset
7
- @record = {}
8
- @response = { 'records' => [] }
9
- end
10
-
11
- def end_element(name)
12
- case name
13
- when 'record'
14
- @response['records'] << @record
15
- @record = {}
16
- else
17
- @record[name] = value
18
- end
19
- end
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,22 +0,0 @@
1
- module Fog
2
- module Parsers
3
- module DNS
4
- module Bluebox
5
- class GetZone < Fog::Parsers::Base
6
- def reset
7
- @response = {}
8
- end
9
-
10
- def end_element(name)
11
- case name
12
- when 'serial', 'ttl', 'retry', 'expires', 'record-count', 'refresh', 'minimum'
13
- @response[name] = value.to_i
14
- when 'name', 'id'
15
- @response[name] = value
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,26 +0,0 @@
1
- module Fog
2
- module Parsers
3
- module DNS
4
- module Bluebox
5
- class GetZones < Fog::Parsers::Base
6
- def reset
7
- @zone = {}
8
- @response = { 'zones' => [] }
9
- end
10
-
11
- def end_element(name)
12
- case name
13
- when 'serial', 'ttl', 'retry', 'expires', 'record-count', 'refresh', 'minimum'
14
- @zone[name] = value.to_i
15
- when 'name', 'id'
16
- @zone[name] = value
17
- when 'record'
18
- @response['zones'] << @zone
19
- @zone = {}
20
- end
21
- end
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,33 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Add machine to default lb_backend for each lb_service
6
- # in the application.
7
- #
8
- # === Parameters
9
- # * lb_application_id<~String> - ID of application
10
- # * lb_machine_id<~String> - ID of machine
11
- # * options<~Hash>:
12
- # * port<~Integer> - port machine listens on; defaults to service listening port
13
- # * maxconn<~Integer> - maximum number of connections server can be sent
14
- # * backup<~Boolean> - only send traffic to machine if all others are down
15
- #
16
- def add_machine_to_lb_application(lb_application_id, lb_machine_id, options = {})
17
- # convert to CGI array args
18
- body = Hash[options.map {|k,v| ["lb_options[#{k}]", v] }]
19
- body['lb_machine'] = lb_machine_id
20
- request(
21
- :expects => 200,
22
- :method => 'POST',
23
- :path => "/api/lb_applications/add_machine/#{lb_application_id}.json",
24
- :body => body.map {|k,v| "#{CGI.escape(k)}=#{CGI.escape(v.to_s)}"}.join('&')
25
- )
26
- end
27
- end
28
-
29
- class Mock
30
- end
31
- end
32
- end
33
- end
@@ -1,31 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Add machine to specified lb_backend
6
- #
7
- # === Parameters
8
- # * lb_backend_id<~String> - ID of backend
9
- # * lb_machine_id<~String> - ID of machine
10
- # * options<~Hash>:
11
- # * port<~Integer> - port machine listens on; defaults to service listening port
12
- # * maxconn<~Integer> - maximum number of connections server can be sent
13
- # * backup<~Boolean> - only send traffic to machine if all others are down
14
- def add_machine_to_lb_backend(lb_backend_id, lb_machine_id, options = {})
15
- # convert to CGI array args
16
- body = Hash[options.map {|k,v| ["lb_options[#{k}]", v] }]
17
- body['lb_machine'] = lb_machine_id
18
- request(
19
- :expects => 200,
20
- :method => 'POST',
21
- :path => "/api/lb_backends/#{lb_backend_id}/lb_machines.json",
22
- :body => body.map {|k,v| "#{CGI.escape(k)}=#{CGI.escape(v.to_s)}"}.join('&')
23
- )
24
- end
25
- end
26
-
27
- class Mock
28
- end
29
- end
30
- end
31
- end
@@ -1,32 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get details of an lb_application.
6
- #
7
- # ==== Parameters
8
- # * lb_application_id<~Integer> - ID of application
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Hash>:
13
- # * 'id'<~String> - UUID of application
14
- # * 'ip_v4'<~Array> - IPv4 addresses
15
- # * 'ip_v6'<~String> - IPv6 address
16
- # * 'name'<~String> - The hostname
17
- # * 'lb_services'<~Array> - Listening services
18
- # * 'source_ip_v4'<~String> - address that application connects to pool members from (v1 only)
19
- def get_lb_application(lb_application_id)
20
- request(
21
- :expects => 200,
22
- :method => 'GET',
23
- :path => "api/lb_applications/#{lb_application_id}.json"
24
- )
25
- end
26
- end
27
-
28
- class Mock
29
- end
30
- end
31
- end
32
- end
@@ -1,30 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get list of applications
6
- #
7
- # ==== Returns
8
- # * response<~Excon::Response>:
9
- # * body<~Array>:
10
- # * 'application'<~Hash>:
11
- # * 'id'<~String> - UUID of application
12
- # * 'ip_v4'<~Array> - IPv4 addresses
13
- # * 'ip_v6'<~String> - IPv6 address
14
- # * 'name'<~String> - The hostname
15
- # * 'lb_services'<~Array> - Listening services
16
- # * 'source_ip_v4'<~String> - address that application connects to pool members from (v1 only)
17
- def get_lb_applications
18
- request(
19
- :expects => 200,
20
- :method => 'GET',
21
- :path => 'api/lb_applications.json'
22
- )
23
- end
24
- end
25
-
26
- class Mock
27
- end
28
- end
29
- end
30
- end
@@ -1,35 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get details of an lb_backend.
6
- #
7
- # ==== Parameters
8
- # * lb_service_id<~String> - service backend belongs to
9
- # * lb_backend_id<~String> - backend to look up
10
- #
11
- # ==== Returns
12
- # * response<~Excon::Response>:
13
- # * body<~Hash>:
14
- # * id<~String> - backend ID
15
- # * backend_name<~String>
16
- # * lb_machines<~Array> - array of backend members
17
- # * acl_name<~String> - name of ACL for this backend
18
- # * acl_rule<~String>
19
- # * monitoring_url_hostname<~String> - HTTP host header for health check
20
- # * monitoring_url<~String> - URL for health check
21
- # * check_interval<~Integer> - time between checks, in milliseconds
22
- def get_lb_backend(lb_service_id, lb_backend_id)
23
- request(
24
- :expects => 200,
25
- :method => 'GET',
26
- :path => "api/lb_services/#{lb_service_id}/lb_backends/#{lb_backend_id}.json"
27
- )
28
- end
29
- end
30
-
31
- class Mock
32
- end
33
- end
34
- end
35
- end
@@ -1,35 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get list of backends
6
- #
7
- # ==== Parameters
8
- # * lb_service_id<~String> - service containing backends
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # * backend<~Hash>:
14
- # * id<~String> - backend ID
15
- # * backend_name<~String>
16
- # * lb_machines<~Array> - array of backend members
17
- # * acl_name<~String> - name of ACL for this backend
18
- # * acl_rule<~String>
19
- # * monitoring_url_hostname<~String> - HTTP host header for health check
20
- # * monitoring_url<~String> - URL for health check
21
- # * check_interval<~Integer> - time between checks, in milliseconds
22
- def get_lb_backends(lb_service_id)
23
- request(
24
- :expects => 200,
25
- :method => 'GET',
26
- :path => "api/lb_services/#{lb_service_id}/lb_backends.json"
27
- )
28
- end
29
- end
30
-
31
- class Mock
32
- end
33
- end
34
- end
35
- end
@@ -1,34 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get details of an lb_machine.
6
- #
7
- # ==== Parameters
8
- # * lb_backend_id<~String> - backend machine belongs to
9
- # * lb_machine_id<~String> - machine to look up
10
- #
11
- # ==== Returns
12
- # * response<~Excon::Response>:
13
- # * body<~Hash>:
14
- # * id<~String> - machine ID
15
- # * ip<~String> - machine IP address for this member (v4 or v6)
16
- # * port<~Integer> - service port for this member
17
- # * hostname<~String> - name as registered with Box Panel
18
- # * acl_name<~String> - name of ACL for this machine
19
- # * created<~DateTime> - when machine was added to load balancer backend
20
- # * maxconn<~Integer> - maximum concurrent connections for this member (BLBv2 only)
21
- def get_lb_machine(lb_backend_id, lb_machine_id)
22
- request(
23
- :expects => 200,
24
- :method => 'GET',
25
- :path => "api/lb_backends/#{lb_backend_id}/lb_machines/#{lb_machine_id}.json"
26
- )
27
- end
28
- end
29
-
30
- class Mock
31
- end
32
- end
33
- end
34
- end
@@ -1,34 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get list of machines
6
- #
7
- # ==== Parameters
8
- # * lb_backend_id<~String> - backend containing machines
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # * machine<~Hash>:
14
- # * id<~String> - machine ID
15
- # * ip<~String> - machine IP address for this member (v4 or v6)
16
- # * port<~Integer> - service port for this member
17
- # * hostname<~String> - name as registered with Box Panel
18
- # * acl_name<~String> - name of ACL for this machine
19
- # * created<~DateTime> - when machine was added to load balancer backend
20
- # * maxconn<~Integer> - maximum concurrent connections for this member (BLBv2 only)
21
- def get_lb_machines(lb_backend_id)
22
- request(
23
- :expects => 200,
24
- :method => 'GET',
25
- :path => "api/lb_backends/#{lb_backend_id}/lb_machines.json"
26
- )
27
- end
28
- end
29
-
30
- class Mock
31
- end
32
- end
33
- end
34
- end
@@ -1,35 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get details of a lb_service.
6
- #
7
- # ==== Parameters
8
- # * lb_application_id<~String> - ID of application the service belongs to
9
- # * lb_service_id<~String> - ID of service to look up
10
- #
11
- # ==== Returns
12
- # * response<~Excon::Response>:
13
- # * body<~Hash>:
14
- # * name<~String> - service name
15
- # * port<~Integer> - port of load balanced service
16
- # * private<~Boolean> - whether service is only available internally
17
- # * status_username<~String> - HTTP basic auth username
18
- # * status_password<~String> - HTTP basic auth password
19
- # * status_url<~String> - URL of stats page
20
- # * service_type<~String> - proto being load balanced (e.g. 'http', 'tcp')
21
- # * created<~DateTime> - when service was created
22
- def get_lb_service(lb_application_id, lb_service_id)
23
- request(
24
- :expects => 200,
25
- :method => 'GET',
26
- :path => "api/lb_applications/#{lb_application_id}/lb_services/#{lb_service_id}.json",
27
- )
28
- end
29
- end
30
-
31
- class Mock
32
- end
33
- end
34
- end
35
- end