fog 1.41.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 -8
- data/CHANGELOG.md +78 -0
- data/README.md +4 -5
- data/Rakefile +0 -3
- data/fog.gemspec +13 -13
- data/lib/fog/bin/brightbox.rb +2 -2
- data/lib/fog/bin.rb +0 -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/vcloud_director/compute.rb +3 -2
- data/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb +2 -2
- data/lib/fog/vcloud_director/generators/compute/network_config_section.rb +68 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp.rb +0 -4
- data/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb +11 -11
- data/lib/fog/vcloud_director/requests/compute/post_power_on_vapp.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/put_config_network_section_vapp.rb +26 -0
- data/lib/fog/version.rb +1 -1
- data/lib/fog.rb +0 -2
- data/lib/tasks/changelog_task.rb +4 -1
- data/lib/tasks/github_release_task.rb +1 -1
- 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 -6
- 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 -9
- data/tests/helpers/collection_helper.rb +0 -6
- data/tests/helpers/mock_helper.rb +0 -7
- 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 +37 -546
- data/gemfiles/Gemfile-1.9 +0 -16
- data/gemfiles/Gemfile-edge-1.9 +0 -20
- data/lib/fog/bin/bluebox.rb +0 -36
- data/lib/fog/bin/ovirt.rb +0 -28
- data/lib/fog/bin/zerigo.rb +0 -29
- 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/bluebox.rb +0 -3
- data/lib/fog/ovirt/compute.rb +0 -155
- data/lib/fog/ovirt/core.rb +0 -16
- data/lib/fog/ovirt/models/compute/affinity_group.rb +0 -25
- data/lib/fog/ovirt/models/compute/affinity_groups.rb +0 -20
- data/lib/fog/ovirt/models/compute/cluster.rb +0 -20
- data/lib/fog/ovirt/models/compute/clusters.rb +0 -20
- data/lib/fog/ovirt/models/compute/instance_type.rb +0 -39
- data/lib/fog/ovirt/models/compute/instance_types.rb +0 -20
- data/lib/fog/ovirt/models/compute/interface.rb +0 -19
- data/lib/fog/ovirt/models/compute/interfaces.rb +0 -29
- data/lib/fog/ovirt/models/compute/quota.rb +0 -16
- data/lib/fog/ovirt/models/compute/quotas.rb +0 -20
- data/lib/fog/ovirt/models/compute/server.rb +0 -175
- data/lib/fog/ovirt/models/compute/servers.rb +0 -27
- data/lib/fog/ovirt/models/compute/template.rb +0 -58
- data/lib/fog/ovirt/models/compute/templates.rb +0 -20
- data/lib/fog/ovirt/models/compute/volume.rb +0 -36
- data/lib/fog/ovirt/models/compute/volumes.rb +0 -28
- data/lib/fog/ovirt/requests/compute/activate_volume.rb +0 -22
- data/lib/fog/ovirt/requests/compute/add_interface.rb +0 -20
- data/lib/fog/ovirt/requests/compute/add_to_affinity_group.rb +0 -21
- data/lib/fog/ovirt/requests/compute/add_volume.rb +0 -21
- data/lib/fog/ovirt/requests/compute/attach_volume.rb +0 -22
- data/lib/fog/ovirt/requests/compute/create_affinity_group.rb +0 -18
- data/lib/fog/ovirt/requests/compute/create_vm.rb +0 -18
- data/lib/fog/ovirt/requests/compute/datacenters.rb +0 -20
- data/lib/fog/ovirt/requests/compute/deactivate_volume.rb +0 -22
- data/lib/fog/ovirt/requests/compute/destroy_affinity_group.rb +0 -19
- data/lib/fog/ovirt/requests/compute/destroy_interface.rb +0 -22
- data/lib/fog/ovirt/requests/compute/destroy_vm.rb +0 -19
- data/lib/fog/ovirt/requests/compute/destroy_volume.rb +0 -22
- data/lib/fog/ovirt/requests/compute/detach_volume.rb +0 -22
- data/lib/fog/ovirt/requests/compute/get_affinity_group.rb +0 -18
- data/lib/fog/ovirt/requests/compute/get_api_version.rb +0 -16
- data/lib/fog/ovirt/requests/compute/get_cluster.rb +0 -17
- data/lib/fog/ovirt/requests/compute/get_instance_type.rb +0 -17
- data/lib/fog/ovirt/requests/compute/get_quota.rb +0 -17
- data/lib/fog/ovirt/requests/compute/get_template.rb +0 -17
- data/lib/fog/ovirt/requests/compute/get_virtual_machine.rb +0 -17
- data/lib/fog/ovirt/requests/compute/list_affinity_group_vms.rb +0 -22
- data/lib/fog/ovirt/requests/compute/list_affinity_groups.rb +0 -20
- data/lib/fog/ovirt/requests/compute/list_clusters.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_instance_types.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_networks.rb +0 -16
- data/lib/fog/ovirt/requests/compute/list_quotas.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_template_interfaces.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_template_volumes.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_templates.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_virtual_machines.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_vm_interfaces.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_vm_volumes.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_volumes.rb +0 -19
- data/lib/fog/ovirt/requests/compute/mock_files/affinitygroup.xml +0 -8
- data/lib/fog/ovirt/requests/compute/mock_files/affinitygroup_vms.xml +0 -9
- data/lib/fog/ovirt/requests/compute/mock_files/affinitygroups.xml +0 -17
- data/lib/fog/ovirt/requests/compute/mock_files/cluster.xml +0 -20
- data/lib/fog/ovirt/requests/compute/mock_files/clusters.xml +0 -39
- data/lib/fog/ovirt/requests/compute/mock_files/data_centers.xml +0 -17
- data/lib/fog/ovirt/requests/compute/mock_files/disks.xml +0 -58
- data/lib/fog/ovirt/requests/compute/mock_files/instance_type.xml +0 -42
- data/lib/fog/ovirt/requests/compute/mock_files/instance_types.xml +0 -197
- data/lib/fog/ovirt/requests/compute/mock_files/nics.xml +0 -10
- data/lib/fog/ovirt/requests/compute/mock_files/quotas.xml +0 -7
- data/lib/fog/ovirt/requests/compute/mock_files/storage_domains.xml +0 -36
- data/lib/fog/ovirt/requests/compute/mock_files/template.xml +0 -39
- data/lib/fog/ovirt/requests/compute/mock_files/templates.xml +0 -110
- data/lib/fog/ovirt/requests/compute/mock_files/vm.xml +0 -52
- data/lib/fog/ovirt/requests/compute/mock_files/vms.xml +0 -152
- data/lib/fog/ovirt/requests/compute/mock_files/volumes.xml +0 -40
- data/lib/fog/ovirt/requests/compute/remove_from_affinity_group.rb +0 -21
- data/lib/fog/ovirt/requests/compute/storage_domains.rb +0 -20
- data/lib/fog/ovirt/requests/compute/update_interface.rb +0 -35
- data/lib/fog/ovirt/requests/compute/update_vm.rb +0 -18
- data/lib/fog/ovirt/requests/compute/update_volume.rb +0 -39
- data/lib/fog/ovirt/requests/compute/vm_action.rb +0 -22
- data/lib/fog/ovirt/requests/compute/vm_start_with_cloudinit.rb +0 -19
- data/lib/fog/ovirt/requests/compute/vm_ticket.rb +0 -17
- data/lib/fog/ovirt.rb +0 -1
- data/lib/fog/zerigo/core.rb +0 -10
- data/lib/fog/zerigo/dns.rb +0 -114
- data/lib/fog/zerigo/models/dns/record.rb +0 -66
- data/lib/fog/zerigo/models/dns/records.rb +0 -45
- data/lib/fog/zerigo/models/dns/zone.rb +0 -84
- data/lib/fog/zerigo/models/dns/zones.rb +0 -26
- data/lib/fog/zerigo/parsers/dns/count_hosts.rb +0 -20
- data/lib/fog/zerigo/parsers/dns/count_zones.rb +0 -20
- data/lib/fog/zerigo/parsers/dns/create_host.rb +0 -24
- data/lib/fog/zerigo/parsers/dns/create_zone.rb +0 -22
- data/lib/fog/zerigo/parsers/dns/find_hosts.rb +0 -28
- data/lib/fog/zerigo/parsers/dns/get_host.rb +0 -24
- data/lib/fog/zerigo/parsers/dns/get_zone.rb +0 -53
- data/lib/fog/zerigo/parsers/dns/get_zone_stats.rb +0 -22
- data/lib/fog/zerigo/parsers/dns/list_hosts.rb +0 -28
- data/lib/fog/zerigo/parsers/dns/list_zones.rb +0 -26
- data/lib/fog/zerigo/requests/dns/count_hosts.rb +0 -45
- data/lib/fog/zerigo/requests/dns/count_zones.rb +0 -37
- data/lib/fog/zerigo/requests/dns/create_host.rb +0 -125
- data/lib/fog/zerigo/requests/dns/create_zone.rb +0 -128
- data/lib/fog/zerigo/requests/dns/delete_host.rb +0 -41
- data/lib/fog/zerigo/requests/dns/delete_zone.rb +0 -40
- data/lib/fog/zerigo/requests/dns/find_hosts.rb +0 -74
- data/lib/fog/zerigo/requests/dns/get_host.rb +0 -54
- data/lib/fog/zerigo/requests/dns/get_zone.rb +0 -64
- data/lib/fog/zerigo/requests/dns/get_zone_stats.rb +0 -57
- data/lib/fog/zerigo/requests/dns/list_hosts.rb +0 -73
- data/lib/fog/zerigo/requests/dns/list_zones.rb +0 -62
- data/lib/fog/zerigo/requests/dns/update_host.rb +0 -68
- data/lib/fog/zerigo/requests/dns/update_zone.rb +0 -86
- data/lib/fog/zerigo.rb +0 -1
- data/spec/fog/bin/bluebox_spec.rb +0 -55
- data/spec/fog/bin/ovirt_spec.rb +0 -10
- data/spec/fog/bin/zerigo_spec.rb +0 -10
- 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
- data/tests/ovirt/compute_tests.rb +0 -25
- data/tests/ovirt/models/compute/cluster_tests.rb +0 -31
- data/tests/ovirt/models/compute/clusters_tests.rb +0 -9
- data/tests/ovirt/models/compute/interface_tests.rb +0 -27
- data/tests/ovirt/models/compute/interfaces_tests.rb +0 -9
- data/tests/ovirt/models/compute/server_tests.rb +0 -51
- data/tests/ovirt/models/compute/servers_tests.rb +0 -14
- data/tests/ovirt/models/compute/template_tests.rb +0 -28
- data/tests/ovirt/models/compute/templates_tests.rb +0 -9
- data/tests/ovirt/requests/compute/create_vm_tests.rb +0 -26
- data/tests/ovirt/requests/compute/destroy_vm_tests.rb +0 -18
- data/tests/ovirt/requests/compute/list_datacenters_tests.rb +0 -13
- data/tests/ovirt/requests/compute/list_quotas_tests.rb +0 -12
- data/tests/ovirt/requests/compute/list_storage_domains_tests.rb +0 -13
- data/tests/ovirt/requests/compute/update_vm_tests.rb +0 -18
- data/tests/ovirt/requests/compute/update_volume_tests.rb +0 -20
- data/tests/zerigo/requests/dns/dns_tests.rb +0 -440
@@ -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
|
@@ -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
|
@@ -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
|