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,35 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # Get list of load balancing services
6
- #
7
- # ==== Parameters
8
- # * lb_application_id<~String> - Id of application services to list
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # * backend<~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_services(lb_application_id)
23
- request(
24
- :expects => 200,
25
- :method => 'GET',
26
- :path => "api/lb_applications/#{lb_application_id}/lb_services.json"
27
- )
28
- end
29
- end
30
-
31
- class Mock
32
- end
33
- end
34
- end
35
- end
@@ -1,28 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # remove machine from single backend
6
- #
7
- # === Parameters
8
- # * lb_backend_id<~String> - ID of backend
9
- # * lb_machine_id<~String> - ID of machine
10
- #
11
- # ==== Returns
12
- # * response<~Excon::Response>:
13
- # * body<~String> - success or failure message
14
- def remove_machine_from_lb_backend(lb_backend_id, lb_machine_id)
15
- request(
16
- :expects => 200,
17
- :method => 'DELETE',
18
- :path => "/api/lb_backends/#{lb_backend_id}/lb_machines/#{lb_machine_id}",
19
- :headers => {"Accept" => "text/plain"},
20
- )
21
- end
22
- end
23
-
24
- class Mock
25
- end
26
- end
27
- end
28
- end
@@ -1,29 +0,0 @@
1
- module Fog
2
- module Bluebox
3
- class BLB
4
- class Real
5
- # change machine attributes (port &c) in a single 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
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 update_lb_backend_machine(lb_backend_id, lb_machine_id, options = {})
15
- # inconsistent, no?
16
- request(
17
- :expects => 202,
18
- :method => 'PUT',
19
- :path => "/api/lb_backends/#{lb_backend_id}/lb_machines/#{lb_machine_id}",
20
- :body => options.map {|k,v| "#{CGI.escape(k)}=#{CGI.escape(v.to_s)}"}.join('&')
21
- )
22
- end
23
- end
24
-
25
- class Mock
26
- end
27
- end
28
- end
29
- end
@@ -1,44 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Create a new block
6
- #
7
- # ==== Parameters
8
- # * product_id<~String> - ID of block product (size)
9
- # * template_id<~String> - ID of block OS/build template
10
- # * location_id<~String> - ID of deployment location
11
- # * options<~Hash>:
12
- # * password<~String> - Password for block
13
- # or
14
- # * ssh_public_key<~String> - SSH public key
15
- # * username<~String> - Defaults to deploy
16
- #
17
- # ==== Returns
18
- # * response<~Excon::Response>:
19
- # * body<~Hash>:
20
- def create_block(product_id, template_id, location_id, options = {})
21
- unless options.key?('password') || options.key?('ssh_public_key')
22
- raise ArgumentError, 'Either password or public_key must be supplied'
23
- end
24
-
25
- query = {
26
- 'product' => product_id,
27
- 'template' => template_id,
28
- 'location' => location_id
29
- }
30
-
31
- query['ipv6_only'] = options.delete('ipv6_only') if options['ipv6_only']
32
-
33
- request(
34
- :expects => 200,
35
- :method => 'POST',
36
- :path => '/api/blocks.json',
37
- :query => query,
38
- :body => options.map {|k,v| "#{CGI.escape(k)}=#{CGI.escape(v)}"}.join('&')
39
- )
40
- end
41
- end
42
- end
43
- end
44
- end
@@ -1,25 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Create a template from block
6
- #
7
- # ==== Parameters
8
- # * block_id<~Integer> - Id of block to create template from
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # TODO
14
- def create_template(block_id, options={})
15
- request(
16
- :expects => 202,
17
- :method => 'POST',
18
- :path => "api/block_templates.json",
19
- :query => {'id' => block_id}.merge!(options)
20
- )
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Destroy a block
6
- #
7
- # ==== Parameters
8
- # * block_id<~Integer> - Id of block to destroy
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Hash>:
13
- # TODO
14
- def destroy_block(block_id)
15
- request(
16
- :expects => 200,
17
- :method => 'DELETE',
18
- :path => "api/blocks/#{block_id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Create a template from block
6
- #
7
- # ==== Parameters
8
- # * id<~Integer> - Id of image to destroy
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # TODO
14
- def destroy_template(id)
15
- request(
16
- :expects => 200,
17
- :method => 'DELETE',
18
- :path => "api/block_templates/#{id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get details of a block.
6
- #
7
- # ==== Parameters
8
- # * block_id<~Integer> - Id of block to lookup
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Hash>:
13
- # TODO
14
- def get_block(block_id)
15
- request(
16
- :expects => 200,
17
- :method => 'GET',
18
- :path => "api/blocks/#{block_id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,26 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get list of blocks
6
- #
7
- # ==== Returns
8
- # * response<~Excon::Response>:
9
- # * body<~Array>:
10
- # * 'ips'<~Array> - Ip addresses for the block
11
- # * 'id'<~String> - Id of the block
12
- # * 'storage'<~Integer> - Disk space quota for the block
13
- # * 'memory'<~Integer> - RAM quota for the block
14
- # * 'cpu'<~Float> - The fractional CPU quota for this block
15
- # * 'hostname'<~String> - The hostname for the block
16
- def get_blocks
17
- request(
18
- :expects => 200,
19
- :method => 'GET',
20
- :path => 'api/blocks.json'
21
- )
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get details of a location
6
- #
7
- # ==== Parameters
8
- # * location_id<~Integer> - Id of location to lookup
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # TODO
14
- def get_location(location_id)
15
- request(
16
- :expects => 200,
17
- :method => 'GET',
18
- :path => "api/locations/#{location_id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,22 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get list of locations
6
- #
7
- # ==== Returns
8
- # * response<~Excon::Response>:
9
- # * body<~Array>:
10
- # * 'id'<~String> - UUID of the location
11
- # * 'description'<~String> - Description of the location
12
- def get_locations
13
- request(
14
- :expects => 200,
15
- :method => 'GET',
16
- :path => 'api/locations.json'
17
- )
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get details of a product
6
- #
7
- # ==== Parameters
8
- # * product_id<~Integer> - Id of flavor to lookup
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # TODO
14
- def get_product(product_id)
15
- request(
16
- :expects => 200,
17
- :method => 'GET',
18
- :path => "api/block_products/#{product_id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,23 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get list of products
6
- #
7
- # ==== Returns
8
- # * response<~Excon::Response>:
9
- # * body<~Array>:
10
- # * 'id'<~String> - UUID of the product
11
- # * 'description'<~String> - Description of the product
12
- # * 'cost'<~Decimal> - Hourly cost of the product
13
- def get_products
14
- request(
15
- :expects => 200,
16
- :method => 'GET',
17
- :path => 'api/block_products.json'
18
- )
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get details of a template
6
- #
7
- # ==== Parameters
8
- # * template_id<~Integer> - Id of template to lookup
9
- #
10
- # ==== Returns
11
- # * response<~Excon::Response>:
12
- # * body<~Array>:
13
- # TODO
14
- def get_template(template_id)
15
- request(
16
- :expects => 200,
17
- :method => 'GET',
18
- :path => "api/block_templates/#{template_id}.json"
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Get list of OS templates
6
- #
7
- # ==== Returns
8
- # * response<~Excon::Response>:
9
- # * body<~Array>:
10
- # * 'id'<~String> - UUID of the image
11
- # * 'description'<~String> - Description of the image
12
- # * 'public'<~Boolean> - Public / Private image
13
- # * 'created'<~Datetime> - Timestamp of when the image was created
14
- def get_templates
15
- request(
16
- :expects => 200,
17
- :method => 'GET',
18
- :path => 'api/block_templates.json'
19
- )
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,25 +0,0 @@
1
- module Fog
2
- module Compute
3
- class Bluebox
4
- class Real
5
- # Reboot block
6
- #
7
- # ==== Parameters
8
- # * block_id<~String> - Id of block to reboot
9
- # * type<~String> - Type of reboot, must be in ['HARD', 'SOFT']
10
- #
11
- # ==== Returns
12
- # * response<~Excon::Response>:
13
- # * body<~Hash>:
14
- # TODO
15
- def reboot_block(block_id, type = 'SOFT')
16
- request(
17
- :expects => 200,
18
- :method => 'PUT',
19
- :path => "api/blocks/#{block_id}/#{'soft_' if type == 'SOFT'}reboot.json"
20
- )
21
- end
22
- end
23
- end
24
- end
25
- end