fog 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/stale.yml +17 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +37 -0
- data/README.md +3 -3
- data/fog.gemspec +6 -6
- data/lib/fog.rb +0 -1
- data/lib/fog/bin.rb +0 -1
- data/lib/fog/bin/brightbox.rb +2 -2
- data/lib/fog/cloudstack/models/compute/server.rb +2 -0
- data/lib/fog/linode/requests/compute/avail_datacenters.rb +1 -0
- data/lib/fog/opennebula/compute.rb +6 -1
- data/lib/fog/opennebula/requests/compute/OpenNebulaVNC.rb +5 -1
- data/lib/fog/version.rb +1 -1
- data/lib/tasks/changelog_task.rb +1 -0
- data/spec/fog/bin/atmos_spec.rb +0 -10
- data/spec/fog/bin/aws_spec.rb +0 -18
- data/spec/fog/bin/baremetalcloud_spec.rb +0 -10
- data/spec/fog/bin/brightbox_spec.rb +2 -2
- data/spec/fog/bin_spec.rb +0 -3
- data/tests/cloudsigma/models/snapshot_tests.rb +2 -0
- data/tests/cloudsigma/models/snapshots_tests.rb +1 -0
- data/tests/cloudsigma/requests/snapshots_tests.rb +1 -0
- data/tests/cloudsigma/requests/volumes_tests.rb +1 -1
- data/tests/cloudstack/compute/models/volume_tests.rb +1 -1
- data/tests/compute/helper.rb +0 -9
- data/tests/dns/helper.rb +0 -6
- data/tests/helpers/mock_helper.rb +0 -2
- data/tests/opennebula/compute_tests.rb +5 -2
- data/tests/opennebula/models/compute/flavor_tests.rb +5 -1
- data/tests/opennebula/models/compute/flavors_tests.rb +5 -2
- data/tests/opennebula/models/compute/group_tests.rb +5 -2
- data/tests/opennebula/models/compute/groups_tests.rb +5 -2
- data/tests/opennebula/models/compute/network_tests.rb +5 -1
- data/tests/opennebula/models/compute/networks_tests.rb +5 -2
- data/tests/opennebula/requests/compute/vm_allocate_tests.rb +5 -1
- data/tests/opennebula/requests/compute/vm_suspend_resume_tests.rb +5 -2
- metadata +26 -375
- data/lib/fog/bin/bluebox.rb +0 -36
- data/lib/fog/bluebox.rb +0 -3
- data/lib/fog/bluebox/blb.rb +0 -82
- data/lib/fog/bluebox/compute.rb +0 -98
- data/lib/fog/bluebox/core.rb +0 -12
- data/lib/fog/bluebox/dns.rb +0 -101
- data/lib/fog/bluebox/models/blb/lb_application.rb +0 -29
- data/lib/fog/bluebox/models/blb/lb_applications.rb +0 -24
- data/lib/fog/bluebox/models/blb/lb_backend.rb +0 -19
- data/lib/fog/bluebox/models/blb/lb_backends.rb +0 -27
- data/lib/fog/bluebox/models/blb/lb_service.rb +0 -32
- data/lib/fog/bluebox/models/blb/lb_services.rb +0 -27
- data/lib/fog/bluebox/models/compute/flavor.rb +0 -41
- data/lib/fog/bluebox/models/compute/flavors.rb +0 -24
- data/lib/fog/bluebox/models/compute/image.rb +0 -30
- data/lib/fog/bluebox/models/compute/images.rb +0 -24
- data/lib/fog/bluebox/models/compute/location.rb +0 -13
- data/lib/fog/bluebox/models/compute/locations.rb +0 -24
- data/lib/fog/bluebox/models/compute/server.rb +0 -121
- data/lib/fog/bluebox/models/compute/servers.rb +0 -32
- data/lib/fog/bluebox/models/dns/record.rb +0 -52
- data/lib/fog/bluebox/models/dns/records.rb +0 -32
- data/lib/fog/bluebox/models/dns/zone.rb +0 -62
- data/lib/fog/bluebox/models/dns/zones.rb +0 -24
- data/lib/fog/bluebox/parsers/dns/create_record.rb +0 -22
- data/lib/fog/bluebox/parsers/dns/create_zone.rb +0 -22
- data/lib/fog/bluebox/parsers/dns/get_record.rb +0 -17
- data/lib/fog/bluebox/parsers/dns/get_records.rb +0 -24
- data/lib/fog/bluebox/parsers/dns/get_zone.rb +0 -22
- data/lib/fog/bluebox/parsers/dns/get_zones.rb +0 -26
- data/lib/fog/bluebox/requests/blb/add_machine_to_lb_application.rb +0 -33
- data/lib/fog/bluebox/requests/blb/add_machine_to_lb_backend.rb +0 -31
- data/lib/fog/bluebox/requests/blb/get_lb_application.rb +0 -32
- data/lib/fog/bluebox/requests/blb/get_lb_applications.rb +0 -30
- data/lib/fog/bluebox/requests/blb/get_lb_backend.rb +0 -35
- data/lib/fog/bluebox/requests/blb/get_lb_backends.rb +0 -35
- data/lib/fog/bluebox/requests/blb/get_lb_machine.rb +0 -34
- data/lib/fog/bluebox/requests/blb/get_lb_machines.rb +0 -34
- data/lib/fog/bluebox/requests/blb/get_lb_service.rb +0 -35
- data/lib/fog/bluebox/requests/blb/get_lb_services.rb +0 -35
- data/lib/fog/bluebox/requests/blb/remove_machine_from_lb_backend.rb +0 -28
- data/lib/fog/bluebox/requests/blb/update_lb_backend_machine.rb +0 -29
- data/lib/fog/bluebox/requests/compute/create_block.rb +0 -44
- data/lib/fog/bluebox/requests/compute/create_template.rb +0 -25
- data/lib/fog/bluebox/requests/compute/destroy_block.rb +0 -24
- data/lib/fog/bluebox/requests/compute/destroy_template.rb +0 -24
- data/lib/fog/bluebox/requests/compute/get_block.rb +0 -24
- data/lib/fog/bluebox/requests/compute/get_blocks.rb +0 -26
- data/lib/fog/bluebox/requests/compute/get_location.rb +0 -24
- data/lib/fog/bluebox/requests/compute/get_locations.rb +0 -22
- data/lib/fog/bluebox/requests/compute/get_product.rb +0 -24
- data/lib/fog/bluebox/requests/compute/get_products.rb +0 -23
- data/lib/fog/bluebox/requests/compute/get_template.rb +0 -24
- data/lib/fog/bluebox/requests/compute/get_templates.rb +0 -24
- data/lib/fog/bluebox/requests/compute/reboot_block.rb +0 -25
- data/lib/fog/bluebox/requests/dns/create_record.rb +0 -44
- data/lib/fog/bluebox/requests/dns/create_zone.rb +0 -48
- data/lib/fog/bluebox/requests/dns/delete_record.rb +0 -27
- data/lib/fog/bluebox/requests/dns/delete_zone.rb +0 -27
- data/lib/fog/bluebox/requests/dns/get_record.rb +0 -36
- data/lib/fog/bluebox/requests/dns/get_records.rb +0 -37
- data/lib/fog/bluebox/requests/dns/get_zone.rb +0 -40
- data/lib/fog/bluebox/requests/dns/get_zones.rb +0 -39
- data/lib/fog/bluebox/requests/dns/update_record.rb +0 -30
- data/lib/fog/bluebox/requests/dns/update_zone.rb +0 -26
- data/lib/fog/ovirt.rb +0 -1
- data/lib/fog/ovirt/requests/compute/activate_volume.rb +0 -22
- data/lib/fog/ovirt/requests/compute/deactivate_volume.rb +0 -22
- data/spec/fog/bin/bluebox_spec.rb +0 -55
- data/spec/fog/compute_spec.rb +0 -19
- data/spec/fog/dns_spec.rb +0 -19
- data/tests/bluebox/requests/blb/helper.rb +0 -64
- data/tests/bluebox/requests/blb/lb_tests.rb +0 -75
- data/tests/bluebox/requests/compute/block_tests.rb +0 -83
- data/tests/bluebox/requests/compute/helper.rb +0 -16
- data/tests/bluebox/requests/compute/location_tests.rb +0 -32
- data/tests/bluebox/requests/compute/product_tests.rb +0 -34
- data/tests/bluebox/requests/compute/template_tests.rb +0 -37
- data/tests/bluebox/requests/dns/dns_tests.rb +0 -258
@@ -1,44 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module DNS
|
3
|
-
class Bluebox
|
4
|
-
class Real
|
5
|
-
require 'fog/bluebox/parsers/dns/create_record'
|
6
|
-
|
7
|
-
# Create a new record in a DNS zone
|
8
|
-
# ==== Parameters
|
9
|
-
# * type<~String> - type of DNS record to create (A, CNAME, etc)
|
10
|
-
# * name<~String> - host name this DNS record is for
|
11
|
-
# * content<~String> - data for the DNS record (ie for an A record, the IP address)
|
12
|
-
# ==== Returns
|
13
|
-
# * response<~Excon::Response>:
|
14
|
-
# * body<~Hash>:
|
15
|
-
# * 'name'<~String> - as above
|
16
|
-
# * 'id'<~Integer> - Id of zone/domain - used in future API calls for this zone
|
17
|
-
# * 'ttl'<~Integer> - as above
|
18
|
-
# * 'data'<~String> - as above
|
19
|
-
# * 'active'<~String> - as above
|
20
|
-
# * 'aux'<~String> - as above
|
21
|
-
def create_record(zone_id, type, name, content, options={})
|
22
|
-
body = %Q{<?xml version="1.0" encoding="UTF-8"?><record><type>#{type}</type><name>#{name}</name><content>#{content}</content>}
|
23
|
-
options.each do |k,v|
|
24
|
-
body += %Q{<#{k}>#{v}</#{k}>}
|
25
|
-
end
|
26
|
-
body += %Q{</record>}
|
27
|
-
request(
|
28
|
-
:body => body,
|
29
|
-
:expects => 202,
|
30
|
-
:method => 'POST',
|
31
|
-
:parser => Fog::Parsers::DNS::Bluebox::CreateRecord.new,
|
32
|
-
:path => "/api/domains/#{zone_id}/records.xml"
|
33
|
-
)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
class Mock
|
38
|
-
def create_record(zone_id, type, name, content)
|
39
|
-
Fog::Mock.not_implemented
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module DNS
|
3
|
-
class Bluebox
|
4
|
-
class Real
|
5
|
-
require 'fog/bluebox/parsers/dns/create_zone'
|
6
|
-
|
7
|
-
# Create a new DNS zone
|
8
|
-
# ==== Parameters
|
9
|
-
# * 'name'<~String> - The name of the zone
|
10
|
-
# * 'ttl'<~Integer> - TimeToLive (ttl) for the domain, in seconds
|
11
|
-
# * 'retry'<~Integer> - Retry interval for the domain, in seconds
|
12
|
-
# * 'refresh'<~Integer> - Refresh interval for the zone
|
13
|
-
# * 'minimum'<~Integer> - Minimum refresh interval for the zone
|
14
|
-
# ==== Returns
|
15
|
-
# * response<~Excon::Response>:
|
16
|
-
# * body<~Hash>:
|
17
|
-
# * 'name'<~String> - The name of the zone
|
18
|
-
# * 'serial'<~Integer> - Serial number of the zone
|
19
|
-
# * 'ttl'<~Integer> - TimeToLive (ttl) for the domain, in seconds
|
20
|
-
# * 'retry'<~Integer> - Retry interval for the domain, in seconds
|
21
|
-
# * 'record-count'<~Integer> - Number of records in the zone
|
22
|
-
# * 'id'<~String> - Id for the zone
|
23
|
-
# * 'refresh'<~Integer> - Refresh interval for the zone
|
24
|
-
# * 'minimum'<~Integer> - Minimum refresh interval for the zone
|
25
|
-
def create_zone(options)
|
26
|
-
body = %Q{<?xml version="1.0" encoding="UTF-8"?><domain><name>#{options[:name]}</name><ttl>#{options[:ttl]}</ttl>}
|
27
|
-
body += %Q{<retry>#{options[:retry]}</retry>} if options[:retry]
|
28
|
-
body += %Q{<refresh>#{options[:retry]}</refresh>} if options[:refresh]
|
29
|
-
body += %Q{<minimum>#{options[:minimum]}</minimum>} if options[:minimum]
|
30
|
-
body += %Q{</domain>}
|
31
|
-
request(
|
32
|
-
:body => body,
|
33
|
-
:expects => 202,
|
34
|
-
:method => 'POST',
|
35
|
-
:parser => Fog::Parsers::DNS::Bluebox::CreateZone.new,
|
36
|
-
:path => "/api/domains.xml"
|
37
|
-
)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
class Mock
|
42
|
-
def create_zone(options)
|
43
|
-
Fog::Mock.not_implemented
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module DNS
|
3
|
-
class Bluebox
|
4
|
-
class Real
|
5
|
-
# Delete a record from the specified DNS zone
|
6
|
-
# ==== Parameters
|
7
|
-
# * record_id<~Integer> - Id of DNS record to delete
|
8
|
-
#
|
9
|
-
# ==== Returns
|
10
|
-
# * response<~Excon::Response>: - HTTP status code will be result
|
11
|
-
def delete_record(zone_id, record_id)
|
12
|
-
request(
|
13
|
-
:expects => 200,
|
14
|
-
:method => 'DELETE',
|
15
|
-
:path => "/api/domains/#{zone_id}/records/#{record_id}.xml"
|
16
|
-
)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
class Mock
|
21
|
-
def delete_record(zone_id, record_id)
|
22
|
-
Fog::Mock.not_implemented
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module DNS
|
3
|
-
class Bluebox
|
4
|
-
class Real
|
5
|
-
# Delete a zone from DNS
|
6
|
-
# ==== Parameters
|
7
|
-
# * zone_id<~Integer> - Id of zone to delete
|
8
|
-
#
|
9
|
-
# ==== Returns
|
10
|
-
# * response<~Excon::Response>: - HTTP status code will be result
|
11
|
-
def delete_zone(zone_id)
|
12
|
-
request(
|
13
|
-
:expects => 200,
|
14
|
-
:method => 'DELETE',
|
15
|
-
:path => "/api/domains/#{zone_id}.xml"
|
16
|
-
)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
class Mock
|
21
|
-
def delete_zone(zone_id)
|
22
|
-
Fog::Mock.not_implemented
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module DNS
|
3
|
-
class Bluebox
|
4
|
-
class Real
|
5
|
-
require 'fog/bluebox/parsers/dns/get_record'
|
6
|
-
|
7
|
-
# Get an individual DNS record from the specified zone
|
8
|
-
#
|
9
|
-
# ==== Returns
|
10
|
-
# * response<~Excon::Response>:
|
11
|
-
# * hash<~Hash>:
|
12
|
-
# * 'id'<~String> - The id of this record
|
13
|
-
# * 'type'<~String> - type of DNS record to create (A, CNAME, etc)
|
14
|
-
# * 'domain-id'<~Integer> - ID of the zone
|
15
|
-
# * 'name'<~String> - empty?
|
16
|
-
# * 'domain'<~String> - The domain name
|
17
|
-
# * 'type'<~String> - The type of DNS record (e.g. A, MX, NS, etc.)
|
18
|
-
# * 'content'<~String> - data for the DNS record (ie for an A record, the IP address)
|
19
|
-
def get_record(zone_id, record_id)
|
20
|
-
request(
|
21
|
-
:expects => 200,
|
22
|
-
:method => 'GET',
|
23
|
-
:parser => Fog::Parsers::DNS::Bluebox::GetRecord.new,
|
24
|
-
:path => "/api/domains/#{zone_id}/records/#{record_id}.xml"
|
25
|
-
)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
class Mock
|
30
|
-
def get_record(record_id)
|
31
|
-
Fog::Mock.not_implemented
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module DNS
|
3
|
-
class Bluebox
|
4
|
-
class Real
|
5
|
-
require 'fog/bluebox/parsers/dns/get_records'
|
6
|
-
|
7
|
-
# Get all the DNS records across all the DNS zones for this account
|
8
|
-
#
|
9
|
-
# ==== Returns
|
10
|
-
# * response<~Excon::Response>:
|
11
|
-
# * body<~Array>:
|
12
|
-
# * 'addresses'<~Array> - Ip addresses for the slice
|
13
|
-
# * 'backup-id'<~Integer> - Id of backup slice was booted from
|
14
|
-
# * 'flavor_id'<~Integer> - Id of flavor slice was booted from
|
15
|
-
# * 'id'<~Integer> - Id of the slice
|
16
|
-
# * 'image-id'<~Integer> - Id of image slice was booted from
|
17
|
-
# * 'name'<~String> - Name of the slice
|
18
|
-
# * 'progress'<~Integer> - Progress of current action, in percentage
|
19
|
-
# * 'status'<~String> - Current status of the slice
|
20
|
-
def get_records(zone_id)
|
21
|
-
request(
|
22
|
-
:expects => 200,
|
23
|
-
:method => 'GET',
|
24
|
-
:parser => Fog::Parsers::DNS::Bluebox::GetRecords.new,
|
25
|
-
:path => "/api/domains/#{zone_id}/records.xml"
|
26
|
-
)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
class Mock
|
31
|
-
def get_records
|
32
|
-
Fog::Mock.not_implemented
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module DNS
|
3
|
-
class Bluebox
|
4
|
-
class Real
|
5
|
-
require 'fog/bluebox/parsers/dns/get_zone'
|
6
|
-
|
7
|
-
# Get details of a DNS zone
|
8
|
-
#
|
9
|
-
# ==== Parameters
|
10
|
-
# * zone_id<~Integer> - Id of zone to lookup
|
11
|
-
#
|
12
|
-
# ==== Returns
|
13
|
-
# * response<~Excon::Response>:
|
14
|
-
# * hash<~Hash>:
|
15
|
-
# * 'name'<~String> - The name of the zone
|
16
|
-
# * 'serial'<~Integer> - Serial number of the zone
|
17
|
-
# * 'ttl'<~Integer> - TimeToLive (ttl) for the domain, in seconds
|
18
|
-
# * 'retry'<~Integer> - Retry interval for the domain, in seconds
|
19
|
-
# * 'record-count'<~Integer> - Number of records in the zone
|
20
|
-
# * 'id'<~String> - Id for the zone
|
21
|
-
# * 'refresh'<~Integer> - Refresh interval for the zone
|
22
|
-
# * 'minimum'<~Integer> - Minimum refresh interval for the zone
|
23
|
-
def get_zone(zone_id)
|
24
|
-
request(
|
25
|
-
:expects => 200,
|
26
|
-
:method => 'GET',
|
27
|
-
:parser => Fog::Parsers::DNS::Bluebox::GetZone.new,
|
28
|
-
:path => "/api/domains/#{zone_id}.xml"
|
29
|
-
)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
class Mock
|
34
|
-
def get_zone(zone_id)
|
35
|
-
Fog::Mock.not_implemented
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module DNS
|
3
|
-
class Bluebox
|
4
|
-
class Real
|
5
|
-
require 'fog/bluebox/parsers/dns/get_zones'
|
6
|
-
|
7
|
-
# Get list of all DNS zones hosted on Bluebox (for this account)
|
8
|
-
#
|
9
|
-
# ==== Returns
|
10
|
-
# * response<~Excon::Response>:
|
11
|
-
# * 'records'<~Array>
|
12
|
-
# * 'record'
|
13
|
-
# * 'name'<~String> - name of the zone
|
14
|
-
# * 'serial'<~Integer> - Serial # for the zone
|
15
|
-
# * 'ttl'<~Integer> - TTL for the zone record in seconds
|
16
|
-
# * 'retry'<~Integer> - Retry interval for the zone record in seconds
|
17
|
-
# * 'expires'<~Integer> - Expiration interval for the zone record in seconds
|
18
|
-
# * 'record-count'<~Integer> - # of records in this zone
|
19
|
-
# * 'id'<~String> - Id for the zone record
|
20
|
-
# * 'refresh'<~Integer> - default refresh interval for this zone, in seconds
|
21
|
-
# * 'minimum'<~Integer> - minimum value for intervals for this zone, in seconds
|
22
|
-
def get_zones
|
23
|
-
request(
|
24
|
-
:expects => 200,
|
25
|
-
:method => 'GET',
|
26
|
-
:parser => Fog::Parsers::DNS::Bluebox::GetZones.new,
|
27
|
-
:path => '/api/domains.xml'
|
28
|
-
)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
class Mock
|
33
|
-
def get_zones
|
34
|
-
Fog::Mock.not_implemented
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Bluebox
|
3
|
-
class DNS
|
4
|
-
class Real
|
5
|
-
# Updates an existing record in a DNS zone
|
6
|
-
# ==== Parameters
|
7
|
-
# * type<~String> - type of DNS record (A, CNAME, etc)
|
8
|
-
# * name<~String> - host name for this DNS record
|
9
|
-
# * content<~String> - data for the DNS record (ie for an A record, the IP address)
|
10
|
-
def update_record(zone_id, record_id, options)
|
11
|
-
body = %Q{<?xml version="1.0" encoding="UTF-8"?><record>}
|
12
|
-
options.each {|k,v| body += "<#{k}>#{v}</#{k}>"}
|
13
|
-
body += "</record>"
|
14
|
-
request(
|
15
|
-
:body => body,
|
16
|
-
:expects => 202,
|
17
|
-
:method => 'PUT',
|
18
|
-
:path => "/api/domains/#{zone_id}/records/#{record_id}.xml"
|
19
|
-
)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
class Mock
|
24
|
-
def create_record(zone_id, type, domain, content)
|
25
|
-
Fog::Mock.not_implemented
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module DNS
|
3
|
-
class Bluebox
|
4
|
-
class Real
|
5
|
-
# Updates an existing DNS zone
|
6
|
-
def update_zone(zone_id, options)
|
7
|
-
body = %Q{<?xml version="1.0" encoding="UTF-8"?><domain>}
|
8
|
-
options.each {|k,v| body += "<#{k}>#{v}</#{k}>"}
|
9
|
-
body += "</domain>"
|
10
|
-
request(
|
11
|
-
:body => body,
|
12
|
-
:expects => 202,
|
13
|
-
:method => 'PUT',
|
14
|
-
:path => "/api/domains/#{zone_id}.xml"
|
15
|
-
)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
class Mock
|
20
|
-
def create_record(zone_id, type, domain, content)
|
21
|
-
Fog::Mock.not_implemented
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
data/lib/fog/ovirt.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'fog/ovirt/compute'
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Ovirt
|
4
|
-
class Real
|
5
|
-
def activate_volume(id, options)
|
6
|
-
raise ArgumentError, "instance id is a required parameter" unless id
|
7
|
-
raise ArgumentError, "volume id is a required parameter for activate-volume" unless options.key? :id
|
8
|
-
|
9
|
-
client.activate_volume(id, options[:id])
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
class Mock
|
14
|
-
def activate_volume(id, options)
|
15
|
-
raise ArgumentError, "instance id is a required parameter" unless id
|
16
|
-
raise ArgumentError, "volume id is a required parameter for activate-volume" unless options.key? :id
|
17
|
-
true
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class Ovirt
|
4
|
-
class Real
|
5
|
-
def deactivate_volume(id, options)
|
6
|
-
raise ArgumentError, "instance id is a required parameter" unless id
|
7
|
-
raise ArgumentError, "volume id is a required parameter for deactivate-volume" unless options.key? :id
|
8
|
-
|
9
|
-
client.deactivate_volume(id, options[:id])
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
class Mock
|
14
|
-
def deactivate_volume(id, options)
|
15
|
-
raise ArgumentError, "instance id is a required parameter" unless id
|
16
|
-
raise ArgumentError, "volume id is a required parameter for deactivate-volume" unless options.key? :id
|
17
|
-
true
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
require "fog/bin"
|
3
|
-
require "helpers/bin"
|
4
|
-
|
5
|
-
describe Bluebox do
|
6
|
-
include Fog::BinSpec
|
7
|
-
|
8
|
-
let(:subject) { Bluebox }
|
9
|
-
|
10
|
-
describe "#services" do
|
11
|
-
it "includes all services" do
|
12
|
-
assert_includes Bluebox.services, :compute
|
13
|
-
assert_includes Bluebox.services, :dns
|
14
|
-
assert_includes Bluebox.services, :blb
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
describe "#class_for" do
|
19
|
-
describe "when requesting compute service" do
|
20
|
-
it "returns correct class" do
|
21
|
-
assert_equal Fog::Compute::Bluebox, Bluebox.class_for(:compute)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe "when requesting dns service" do
|
26
|
-
it "returns correct class" do
|
27
|
-
assert_equal Fog::DNS::Bluebox, Bluebox.class_for(:dns)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
describe "when requesting blb service" do
|
32
|
-
it "returns correct class" do
|
33
|
-
assert_equal Fog::Bluebox::BLB, Bluebox.class_for(:blb)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
describe "#[]" do
|
39
|
-
describe "when requesting compute service" do
|
40
|
-
it "returns instance" do
|
41
|
-
Fog::Compute::Bluebox.stub(:new, "instance") do
|
42
|
-
assert_equal "instance", Bluebox[:compute]
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
describe "when requesting dns service" do
|
48
|
-
it "returns instance" do
|
49
|
-
Fog::DNS::Bluebox.stub(:new, "instance") do
|
50
|
-
assert_equal "instance", Bluebox[:dns]
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|