fog-brightbox 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/fog-brightbox.gemspec +28 -0
- data/lib/fog/brightbox/compute/image_selector.rb +45 -0
- data/lib/fog/brightbox/compute/shared.rb +230 -0
- data/lib/fog/brightbox/compute.rb +305 -0
- data/lib/fog/brightbox/core.rb +11 -0
- data/lib/fog/brightbox/models/compute/account.rb +69 -0
- data/lib/fog/brightbox/models/compute/accounts.rb +29 -0
- data/lib/fog/brightbox/models/compute/api_client.rb +37 -0
- data/lib/fog/brightbox/models/compute/api_clients.rb +24 -0
- data/lib/fog/brightbox/models/compute/application.rb +24 -0
- data/lib/fog/brightbox/models/compute/applications.rb +28 -0
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +68 -0
- data/lib/fog/brightbox/models/compute/cloud_ips.rb +34 -0
- data/lib/fog/brightbox/models/compute/collaboration.rb +49 -0
- data/lib/fog/brightbox/models/compute/collaborations.rb +47 -0
- data/lib/fog/brightbox/models/compute/database_server.rb +97 -0
- data/lib/fog/brightbox/models/compute/database_servers.rb +28 -0
- data/lib/fog/brightbox/models/compute/database_snapshot.rb +52 -0
- data/lib/fog/brightbox/models/compute/database_snapshots.rb +24 -0
- data/lib/fog/brightbox/models/compute/database_type.rb +19 -0
- data/lib/fog/brightbox/models/compute/database_types.rb +26 -0
- data/lib/fog/brightbox/models/compute/firewall_policies.rb +29 -0
- data/lib/fog/brightbox/models/compute/firewall_policy.rb +63 -0
- data/lib/fog/brightbox/models/compute/firewall_rule.rb +54 -0
- data/lib/fog/brightbox/models/compute/firewall_rules.rb +24 -0
- data/lib/fog/brightbox/models/compute/flavor.rb +32 -0
- data/lib/fog/brightbox/models/compute/flavors.rb +28 -0
- data/lib/fog/brightbox/models/compute/image.rb +64 -0
- data/lib/fog/brightbox/models/compute/images.rb +28 -0
- data/lib/fog/brightbox/models/compute/load_balancer.rb +107 -0
- data/lib/fog/brightbox/models/compute/load_balancers.rb +28 -0
- data/lib/fog/brightbox/models/compute/server.rb +217 -0
- data/lib/fog/brightbox/models/compute/server_group.rb +94 -0
- data/lib/fog/brightbox/models/compute/server_groups.rb +29 -0
- data/lib/fog/brightbox/models/compute/servers.rb +61 -0
- data/lib/fog/brightbox/models/compute/user.rb +43 -0
- data/lib/fog/brightbox/models/compute/user_collaboration.rb +44 -0
- data/lib/fog/brightbox/models/compute/user_collaborations.rb +31 -0
- data/lib/fog/brightbox/models/compute/users.rb +27 -0
- data/lib/fog/brightbox/models/compute/zone.rb +22 -0
- data/lib/fog/brightbox/models/compute/zones.rb +29 -0
- data/lib/fog/brightbox/oauth2.rb +166 -0
- data/lib/fog/brightbox/requests/compute/accept_user_collaboration.rb +21 -0
- data/lib/fog/brightbox/requests/compute/activate_console_server.rb +21 -0
- data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +24 -0
- data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +24 -0
- data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +34 -0
- data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +24 -0
- data/lib/fog/brightbox/requests/compute/create_api_client.rb +23 -0
- data/lib/fog/brightbox/requests/compute/create_application.rb +23 -0
- data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +24 -0
- data/lib/fog/brightbox/requests/compute/create_collaboration.rb +23 -0
- data/lib/fog/brightbox/requests/compute/create_database_server.rb +25 -0
- data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +26 -0
- data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +29 -0
- data/lib/fog/brightbox/requests/compute/create_image.rb +30 -0
- data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +26 -0
- data/lib/fog/brightbox/requests/compute/create_server.rb +29 -0
- data/lib/fog/brightbox/requests/compute/create_server_group.rb +23 -0
- data/lib/fog/brightbox/requests/compute/delete_api_client.rb +28 -0
- data/lib/fog/brightbox/requests/compute/delete_application.rb +28 -0
- data/lib/fog/brightbox/requests/compute/delete_cloud_ip.rb +28 -0
- data/lib/fog/brightbox/requests/compute/delete_collaboration.rb +28 -0
- data/lib/fog/brightbox/requests/compute/delete_database_server.rb +26 -0
- data/lib/fog/brightbox/requests/compute/delete_database_snapshot.rb +26 -0
- data/lib/fog/brightbox/requests/compute/delete_firewall_policy.rb +28 -0
- data/lib/fog/brightbox/requests/compute/delete_firewall_rule.rb +28 -0
- data/lib/fog/brightbox/requests/compute/delete_image.rb +28 -0
- data/lib/fog/brightbox/requests/compute/delete_load_balancer.rb +28 -0
- data/lib/fog/brightbox/requests/compute/delete_server.rb +28 -0
- data/lib/fog/brightbox/requests/compute/delete_server_group.rb +28 -0
- data/lib/fog/brightbox/requests/compute/delete_user_collaboration.rb +28 -0
- data/lib/fog/brightbox/requests/compute/get_account.rb +29 -0
- data/lib/fog/brightbox/requests/compute/get_api_client.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_application.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +17 -0
- data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_collaboration.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_database_server.rb +19 -0
- data/lib/fog/brightbox/requests/compute/get_database_snapshot.rb +19 -0
- data/lib/fog/brightbox/requests/compute/get_database_type.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_image.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_interface.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +15 -0
- data/lib/fog/brightbox/requests/compute/get_server.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_server_group.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_server_type.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_user.rb +29 -0
- data/lib/fog/brightbox/requests/compute/get_user_collaboration.rb +21 -0
- data/lib/fog/brightbox/requests/compute/get_zone.rb +21 -0
- data/lib/fog/brightbox/requests/compute/list_accounts.rb +17 -0
- data/lib/fog/brightbox/requests/compute/list_api_clients.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_applications.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_collaborations.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_database_servers.rb +17 -0
- data/lib/fog/brightbox/requests/compute/list_database_snapshots.rb +17 -0
- data/lib/fog/brightbox/requests/compute/list_database_types.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_images.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_server_groups.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_server_types.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_servers.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_user_collaborations.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_users.rb +19 -0
- data/lib/fog/brightbox/requests/compute/list_zones.rb +19 -0
- data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +24 -0
- data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +36 -0
- data/lib/fog/brightbox/requests/compute/reject_user_collaboration.rb +21 -0
- data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +24 -0
- data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +24 -0
- data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +24 -0
- data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +34 -0
- data/lib/fog/brightbox/requests/compute/resend_collaboration.rb +21 -0
- data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +32 -0
- data/lib/fog/brightbox/requests/compute/reset_ftp_password_scoped_account.rb +18 -0
- data/lib/fog/brightbox/requests/compute/reset_password_database_server.rb +19 -0
- data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +25 -0
- data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +21 -0
- data/lib/fog/brightbox/requests/compute/shutdown_server.rb +21 -0
- data/lib/fog/brightbox/requests/compute/snapshot_database_server.rb +19 -0
- data/lib/fog/brightbox/requests/compute/snapshot_server.rb +21 -0
- data/lib/fog/brightbox/requests/compute/start_server.rb +21 -0
- data/lib/fog/brightbox/requests/compute/stop_server.rb +21 -0
- data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +21 -0
- data/lib/fog/brightbox/requests/compute/update_account.rb +61 -0
- data/lib/fog/brightbox/requests/compute/update_api_client.rb +26 -0
- data/lib/fog/brightbox/requests/compute/update_application.rb +26 -0
- data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +27 -0
- data/lib/fog/brightbox/requests/compute/update_database_server.rb +25 -0
- data/lib/fog/brightbox/requests/compute/update_database_snapshot.rb +26 -0
- data/lib/fog/brightbox/requests/compute/update_firewall_policy.rb +26 -0
- data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +31 -0
- data/lib/fog/brightbox/requests/compute/update_image.rb +31 -0
- data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +29 -0
- data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +31 -0
- data/lib/fog/brightbox/requests/compute/update_server.rb +28 -0
- data/lib/fog/brightbox/requests/compute/update_server_group.rb +26 -0
- data/lib/fog/brightbox/requests/compute/update_user.rb +29 -0
- data/lib/fog/brightbox/version.rb +5 -0
- data/lib/fog/brightbox.rb +1 -0
- metadata +261 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Destroy the API client.
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#api_client_delete_api_client
|
12
|
+
#
|
13
|
+
def delete_api_client(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("delete", "/1.0/api_clients/#{identifier}", [200])
|
16
|
+
end
|
17
|
+
|
18
|
+
# Old format of the delete request.
|
19
|
+
#
|
20
|
+
# @deprecated Use +#delete_api_client+ instead
|
21
|
+
#
|
22
|
+
def destroy_api_client(identifier)
|
23
|
+
delete_api_client(identifier)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Destroy the application.
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#application_delete_application
|
12
|
+
#
|
13
|
+
def delete_application(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("delete", "/1.0/applications/#{identifier}", [200])
|
16
|
+
end
|
17
|
+
|
18
|
+
# Old format of the delete request.
|
19
|
+
#
|
20
|
+
# @deprecated Use +#delete_application+ instead
|
21
|
+
#
|
22
|
+
def destroy_application(identifier)
|
23
|
+
delete_application(identifier)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Release the cloud IP address from the account's ownership.
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#cloud_ip_delete_cloud_ip
|
12
|
+
#
|
13
|
+
def delete_cloud_ip(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("delete", "/1.0/cloud_ips/#{identifier}", [200])
|
16
|
+
end
|
17
|
+
|
18
|
+
# Old format of the delete request.
|
19
|
+
#
|
20
|
+
# @deprecated Use +#delete_cloud_ip+ instead
|
21
|
+
#
|
22
|
+
def destroy_cloud_ip(identifier)
|
23
|
+
delete_cloud_ip(identifier)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Cancels or completes the collaboration
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#collaboration_delete_collaboration
|
12
|
+
#
|
13
|
+
def delete_collaboration(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("delete", "/1.0/collaborations/#{identifier}", [200])
|
16
|
+
end
|
17
|
+
|
18
|
+
# Old format of the delete request.
|
19
|
+
#
|
20
|
+
# @deprecated Use +#delete_collaboration+ instead
|
21
|
+
#
|
22
|
+
def destroy_collaboration(identifier)
|
23
|
+
delete_collaboration(identifier)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# @param [String] identifier Unique reference to identify the resource
|
6
|
+
#
|
7
|
+
# @return [Hash] if successful Hash version of JSON object
|
8
|
+
#
|
9
|
+
# @see https://api.gb1.brightbox.com/1.0/#database_server_delete_database_server
|
10
|
+
#
|
11
|
+
def delete_database_server(identifier)
|
12
|
+
return nil if identifier.nil? || identifier == ""
|
13
|
+
wrapped_request("delete", "/1.0/database_servers/#{identifier}", [202])
|
14
|
+
end
|
15
|
+
|
16
|
+
# Old format of the delete request.
|
17
|
+
#
|
18
|
+
# @deprecated Use +#delete_database_server+ instead
|
19
|
+
#
|
20
|
+
def destroy_database_server(identifier)
|
21
|
+
delete_database_server(identifier)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# @param [String] identifier Unique reference to identify the resource
|
6
|
+
#
|
7
|
+
# @return [Hash] if successful Hash version of JSON object
|
8
|
+
#
|
9
|
+
# @see https://api.gb1.brightbox.com/1.0/#database_snapshot_delete_database_snapshot
|
10
|
+
#
|
11
|
+
def delete_database_snapshot(identifier)
|
12
|
+
return nil if identifier.nil? || identifier == ""
|
13
|
+
wrapped_request("delete", "/1.0/database_snapshots/#{identifier}", [202])
|
14
|
+
end
|
15
|
+
|
16
|
+
# Old format of the delete request.
|
17
|
+
#
|
18
|
+
# @deprecated Use +#delete_database_snapshot+ instead
|
19
|
+
#
|
20
|
+
def destroy_database_snapshot(identifier)
|
21
|
+
delete_database_snapshot(identifier)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Destroy the firewall policy if not in use.
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#firewall_policy_delete_firewall_policy
|
12
|
+
#
|
13
|
+
def delete_firewall_policy(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("delete", "/1.0/firewall_policies/#{identifier}", [202])
|
16
|
+
end
|
17
|
+
|
18
|
+
# Old format of the delete request.
|
19
|
+
#
|
20
|
+
# @deprecated Use +#delete_firewall_policy+ instead
|
21
|
+
#
|
22
|
+
def destroy_firewall_policy(identifier)
|
23
|
+
delete_firewall_policy(identifier)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Destroy the firewall rule.
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#firewall_rule_delete_firewall_rule
|
12
|
+
#
|
13
|
+
def delete_firewall_rule(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("delete", "/1.0/firewall_rules/#{identifier}", [202])
|
16
|
+
end
|
17
|
+
|
18
|
+
# Old format of the delete request.
|
19
|
+
#
|
20
|
+
# @deprecated Use +#delete_firewall_rule+ instead
|
21
|
+
#
|
22
|
+
def destroy_firewall_rule(identifier)
|
23
|
+
delete_firewall_rule(identifier)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Destroy the image.
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#image_delete_image
|
12
|
+
#
|
13
|
+
def delete_image(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("delete", "/1.0/images/#{identifier}", [202])
|
16
|
+
end
|
17
|
+
|
18
|
+
# Old format of the delete request.
|
19
|
+
#
|
20
|
+
# @deprecated Use +#delete_image+ instead
|
21
|
+
#
|
22
|
+
def destroy_image(identifier)
|
23
|
+
delete_image(identifier)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Destroy the LoadBalancer
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#load_balancer_delete_load_balancer
|
12
|
+
#
|
13
|
+
def delete_load_balancer(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("delete", "/1.0/load_balancers/#{identifier}", [202])
|
16
|
+
end
|
17
|
+
|
18
|
+
# Old format of the delete request.
|
19
|
+
#
|
20
|
+
# @deprecated Use +#delete_load_balancer+ instead
|
21
|
+
#
|
22
|
+
def destroy_load_balancer(identifier)
|
23
|
+
delete_load_balancer(identifier)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Destroy the server and free up the resources.
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#server_delete_server
|
12
|
+
#
|
13
|
+
def delete_server(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("delete", "/1.0/servers/#{identifier}", [202])
|
16
|
+
end
|
17
|
+
|
18
|
+
# Old format of the delete request.
|
19
|
+
#
|
20
|
+
# @deprecated Use +#delete_server+ instead
|
21
|
+
#
|
22
|
+
def destroy_server(identifier)
|
23
|
+
delete_server(identifier)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Destroy the server group if not in use.
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#server_group_delete_server_group
|
12
|
+
#
|
13
|
+
def delete_server_group(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("delete", "/1.0/server_groups/#{identifier}", [202])
|
16
|
+
end
|
17
|
+
|
18
|
+
# Old format of the delete request.
|
19
|
+
#
|
20
|
+
# @deprecated Use +#delete_server_group+ instead
|
21
|
+
#
|
22
|
+
def destroy_server_group(identifier)
|
23
|
+
delete_server_group(identifier)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Ends an existing 'accepted' collaboration
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#user_collaboration_delete_user_collaboration
|
12
|
+
#
|
13
|
+
def delete_user_collaboration(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("delete", "/1.0/user/collaborations/#{identifier}", [200])
|
16
|
+
end
|
17
|
+
|
18
|
+
# Old format of the delete request.
|
19
|
+
#
|
20
|
+
# @deprecated Use +#delete_user_collaboration+ instead
|
21
|
+
#
|
22
|
+
def destroy_user_collaboration(identifier)
|
23
|
+
delete_user_collaboration(identifier)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Get full details of the account.
|
6
|
+
#
|
7
|
+
# @overload get_account(identifier)
|
8
|
+
# @param [String] identifier Unique reference to identify the resource
|
9
|
+
#
|
10
|
+
# @overload get_account()
|
11
|
+
# @deprecated Use {Fog::Compute::Brightbox::Real#get_scoped_account} instead
|
12
|
+
#
|
13
|
+
# @return [Hash] if successful Hash version of JSON object
|
14
|
+
#
|
15
|
+
# @see https://api.gb1.brightbox.com/1.0/#account_get_account
|
16
|
+
#
|
17
|
+
def get_account(identifier = nil)
|
18
|
+
if identifier.nil? || identifier.empty?
|
19
|
+
Fog::Logger.deprecation("get_account() without a parameter is deprecated, use get_scoped_account instead [light_black](#{caller.first})[/]")
|
20
|
+
get_scoped_account
|
21
|
+
else
|
22
|
+
wrapped_request("get", "/1.0/accounts/#{identifier}", [200])
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Get full details of the API client.
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#api_client_get_api_client
|
12
|
+
#
|
13
|
+
def get_api_client(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("get", "/1.0/api_clients/#{identifier}", [200])
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Brightbox
|
4
|
+
class Real
|
5
|
+
# Get full details of the application.
|
6
|
+
#
|
7
|
+
# @param [String] identifier Unique reference to identify the resource
|
8
|
+
#
|
9
|
+
# @return [Hash] if successful Hash version of JSON object
|
10
|
+
#
|
11
|
+
# @see https://api.gb1.brightbox.com/1.0/#application_get_application
|
12
|
+
#
|
13
|
+
def get_application(identifier)
|
14
|
+
return nil if identifier.nil? || identifier == ""
|
15
|
+
wrapped_request("get", "/1.0/applications/#{identifier}", [200])
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|