fog-brightbox 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/.travis.yml +2 -1
  2. data/CHANGELOG.md +12 -0
  3. data/gemfiles/Gemfile.1.8.7 +1 -0
  4. data/gemfiles/Gemfile.1.9.3 +5 -0
  5. data/lib/fog/brightbox/compute.rb +5 -1
  6. data/lib/fog/brightbox/models/compute/accounts.rb +2 -2
  7. data/lib/fog/brightbox/requests/compute/accept_user_collaboration.rb +4 -2
  8. data/lib/fog/brightbox/requests/compute/activate_console_server.rb +4 -2
  9. data/lib/fog/brightbox/requests/compute/add_listeners_load_balancer.rb +1 -0
  10. data/lib/fog/brightbox/requests/compute/add_nodes_load_balancer.rb +1 -0
  11. data/lib/fog/brightbox/requests/compute/add_servers_server_group.rb +1 -0
  12. data/lib/fog/brightbox/requests/compute/apply_to_firewall_policy.rb +1 -0
  13. data/lib/fog/brightbox/requests/compute/create_api_client.rb +1 -0
  14. data/lib/fog/brightbox/requests/compute/create_application.rb +1 -0
  15. data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +1 -0
  16. data/lib/fog/brightbox/requests/compute/create_collaboration.rb +1 -0
  17. data/lib/fog/brightbox/requests/compute/create_database_server.rb +1 -0
  18. data/lib/fog/brightbox/requests/compute/create_firewall_policy.rb +1 -0
  19. data/lib/fog/brightbox/requests/compute/create_firewall_rule.rb +1 -0
  20. data/lib/fog/brightbox/requests/compute/create_image.rb +2 -1
  21. data/lib/fog/brightbox/requests/compute/create_load_balancer.rb +3 -1
  22. data/lib/fog/brightbox/requests/compute/create_server.rb +1 -0
  23. data/lib/fog/brightbox/requests/compute/create_server_group.rb +1 -0
  24. data/lib/fog/brightbox/requests/compute/delete_api_client.rb +4 -2
  25. data/lib/fog/brightbox/requests/compute/delete_application.rb +4 -2
  26. data/lib/fog/brightbox/requests/compute/delete_cloud_ip.rb +4 -2
  27. data/lib/fog/brightbox/requests/compute/delete_collaboration.rb +4 -2
  28. data/lib/fog/brightbox/requests/compute/delete_database_server.rb +4 -2
  29. data/lib/fog/brightbox/requests/compute/delete_database_snapshot.rb +4 -2
  30. data/lib/fog/brightbox/requests/compute/delete_firewall_policy.rb +4 -2
  31. data/lib/fog/brightbox/requests/compute/delete_firewall_rule.rb +4 -2
  32. data/lib/fog/brightbox/requests/compute/delete_image.rb +4 -2
  33. data/lib/fog/brightbox/requests/compute/delete_load_balancer.rb +4 -2
  34. data/lib/fog/brightbox/requests/compute/delete_server.rb +4 -2
  35. data/lib/fog/brightbox/requests/compute/delete_server_group.rb +4 -2
  36. data/lib/fog/brightbox/requests/compute/delete_user_collaboration.rb +4 -2
  37. data/lib/fog/brightbox/requests/compute/get_account.rb +5 -3
  38. data/lib/fog/brightbox/requests/compute/get_api_client.rb +4 -2
  39. data/lib/fog/brightbox/requests/compute/get_application.rb +4 -2
  40. data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +2 -2
  41. data/lib/fog/brightbox/requests/compute/get_cloud_ip.rb +4 -2
  42. data/lib/fog/brightbox/requests/compute/get_collaboration.rb +4 -2
  43. data/lib/fog/brightbox/requests/compute/get_database_server.rb +4 -2
  44. data/lib/fog/brightbox/requests/compute/get_database_snapshot.rb +4 -2
  45. data/lib/fog/brightbox/requests/compute/get_database_type.rb +4 -2
  46. data/lib/fog/brightbox/requests/compute/get_firewall_policy.rb +4 -2
  47. data/lib/fog/brightbox/requests/compute/get_firewall_rule.rb +4 -2
  48. data/lib/fog/brightbox/requests/compute/get_image.rb +4 -2
  49. data/lib/fog/brightbox/requests/compute/get_interface.rb +4 -2
  50. data/lib/fog/brightbox/requests/compute/get_load_balancer.rb +4 -2
  51. data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +2 -2
  52. data/lib/fog/brightbox/requests/compute/get_server.rb +4 -2
  53. data/lib/fog/brightbox/requests/compute/get_server_group.rb +4 -2
  54. data/lib/fog/brightbox/requests/compute/get_server_type.rb +4 -2
  55. data/lib/fog/brightbox/requests/compute/get_user.rb +4 -2
  56. data/lib/fog/brightbox/requests/compute/get_user_collaboration.rb +4 -2
  57. data/lib/fog/brightbox/requests/compute/get_zone.rb +4 -2
  58. data/lib/fog/brightbox/requests/compute/list_accounts.rb +5 -2
  59. data/lib/fog/brightbox/requests/compute/list_api_clients.rb +4 -2
  60. data/lib/fog/brightbox/requests/compute/list_applications.rb +4 -2
  61. data/lib/fog/brightbox/requests/compute/list_cloud_ips.rb +4 -2
  62. data/lib/fog/brightbox/requests/compute/list_collaborations.rb +4 -2
  63. data/lib/fog/brightbox/requests/compute/list_database_servers.rb +4 -2
  64. data/lib/fog/brightbox/requests/compute/list_database_snapshots.rb +4 -2
  65. data/lib/fog/brightbox/requests/compute/list_database_types.rb +4 -2
  66. data/lib/fog/brightbox/requests/compute/list_events.rb +1 -0
  67. data/lib/fog/brightbox/requests/compute/list_firewall_policies.rb +4 -2
  68. data/lib/fog/brightbox/requests/compute/list_images.rb +4 -2
  69. data/lib/fog/brightbox/requests/compute/list_load_balancers.rb +4 -2
  70. data/lib/fog/brightbox/requests/compute/list_server_groups.rb +4 -2
  71. data/lib/fog/brightbox/requests/compute/list_server_types.rb +4 -2
  72. data/lib/fog/brightbox/requests/compute/list_servers.rb +4 -2
  73. data/lib/fog/brightbox/requests/compute/list_user_collaborations.rb +4 -2
  74. data/lib/fog/brightbox/requests/compute/list_users.rb +4 -2
  75. data/lib/fog/brightbox/requests/compute/list_zones.rb +4 -2
  76. data/lib/fog/brightbox/requests/compute/lock_resource_database_server.rb +4 -2
  77. data/lib/fog/brightbox/requests/compute/lock_resource_database_snapshot.rb +4 -2
  78. data/lib/fog/brightbox/requests/compute/lock_resource_image.rb +4 -2
  79. data/lib/fog/brightbox/requests/compute/lock_resource_load_balancer.rb +4 -2
  80. data/lib/fog/brightbox/requests/compute/lock_resource_server.rb +4 -2
  81. data/lib/fog/brightbox/requests/compute/map_cloud_ip.rb +1 -0
  82. data/lib/fog/brightbox/requests/compute/move_servers_server_group.rb +1 -0
  83. data/lib/fog/brightbox/requests/compute/reboot_server.rb +5 -3
  84. data/lib/fog/brightbox/requests/compute/reject_user_collaboration.rb +4 -2
  85. data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +1 -0
  86. data/lib/fog/brightbox/requests/compute/remove_listeners_load_balancer.rb +1 -0
  87. data/lib/fog/brightbox/requests/compute/remove_nodes_load_balancer.rb +1 -0
  88. data/lib/fog/brightbox/requests/compute/remove_servers_server_group.rb +1 -0
  89. data/lib/fog/brightbox/requests/compute/resend_collaboration.rb +4 -2
  90. data/lib/fog/brightbox/requests/compute/reset_ftp_password_account.rb +5 -3
  91. data/lib/fog/brightbox/requests/compute/reset_password_database_server.rb +4 -2
  92. data/lib/fog/brightbox/requests/compute/reset_secret_api_client.rb +4 -2
  93. data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +4 -2
  94. data/lib/fog/brightbox/requests/compute/reset_server.rb +5 -3
  95. data/lib/fog/brightbox/requests/compute/shutdown_server.rb +4 -2
  96. data/lib/fog/brightbox/requests/compute/snapshot_database_server.rb +1 -0
  97. data/lib/fog/brightbox/requests/compute/snapshot_server.rb +1 -0
  98. data/lib/fog/brightbox/requests/compute/start_server.rb +4 -2
  99. data/lib/fog/brightbox/requests/compute/stop_server.rb +4 -2
  100. data/lib/fog/brightbox/requests/compute/unlock_resource_database_server.rb +4 -2
  101. data/lib/fog/brightbox/requests/compute/unlock_resource_database_snapshot.rb +4 -2
  102. data/lib/fog/brightbox/requests/compute/unlock_resource_image.rb +4 -2
  103. data/lib/fog/brightbox/requests/compute/unlock_resource_load_balancer.rb +4 -2
  104. data/lib/fog/brightbox/requests/compute/unlock_resource_server.rb +4 -2
  105. data/lib/fog/brightbox/requests/compute/unmap_cloud_ip.rb +4 -2
  106. data/lib/fog/brightbox/requests/compute/update_account.rb +2 -0
  107. data/lib/fog/brightbox/requests/compute/update_api_client.rb +2 -0
  108. data/lib/fog/brightbox/requests/compute/update_application.rb +1 -0
  109. data/lib/fog/brightbox/requests/compute/update_cloud_ip.rb +1 -0
  110. data/lib/fog/brightbox/requests/compute/update_database_server.rb +1 -0
  111. data/lib/fog/brightbox/requests/compute/update_database_snapshot.rb +1 -0
  112. data/lib/fog/brightbox/requests/compute/update_firewall_policy.rb +1 -0
  113. data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +1 -0
  114. data/lib/fog/brightbox/requests/compute/update_image.rb +1 -0
  115. data/lib/fog/brightbox/requests/compute/update_load_balancer.rb +3 -1
  116. data/lib/fog/brightbox/requests/compute/update_server.rb +1 -0
  117. data/lib/fog/brightbox/requests/compute/update_server_group.rb +1 -0
  118. data/lib/fog/brightbox/requests/compute/update_user.rb +1 -0
  119. data/lib/fog/brightbox/version.rb +1 -1
  120. data/spec/fog/compute/brightbox/database_server_spec.rb +6 -4
  121. data/spec/fog/compute/brightbox/server_spec.rb +6 -4
  122. data/spec/supports_resource_locking.rb +6 -2
  123. data/tests/brightbox/requests/compute/account_tests.rb +1 -1
  124. metadata +159 -135
  125. checksums.yaml +0 -7
data/.travis.yml CHANGED
@@ -4,8 +4,9 @@ rvm:
4
4
  - 2.2.0
5
5
  - 2.1.5
6
6
  - 2.0.0
7
- - 1.9.3
8
7
  matrix:
9
8
  include:
10
9
  - rvm: 1.8.7
11
10
  gemfile: gemfiles/Gemfile.1.8.7
11
+ - rvm: 1.9.3
12
+ gemfile: gemfiles/Gemfile.1.9.3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ### 0.10.0 / 2015-11-30
2
+
3
+ Changes:
4
+
5
+ * Updated auto-generated documentation for requests
6
+ * Added `options` to all requests. Select options are passed through to the API
7
+ to alter behaviour for all requests.
8
+ * Allow requests to use `nested=false` option to collapse nested (or children)
9
+ resources from the JSON which is faster to render and less content.
10
+ * Make `list_accounts` default to `nested=false` because it is very slow for
11
+ large accounts and the nested resources are rarely used.
12
+
1
13
  ### 0.9.0 / 2015-08-18
2
14
 
3
15
  Changes:
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "fog-core", :github => "fog/fog-core"
4
+ gem "json"
4
5
  gem "mime-types", "~> 1.22"
5
6
  gem "inflecto", "~> 0.0.2"
6
7
 
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "net-ssh", "< 3.0"
4
+
5
+ gemspec :path => ".."
@@ -282,9 +282,13 @@ module Fog
282
282
  :expects => expected_responses
283
283
  }
284
284
 
285
+ query = {}
286
+
285
287
  # Select the account to scope for this request
286
288
  account = scoped_account(parameters.fetch(:account_id, nil))
287
- request_options[:query] = { :account_id => account } if account
289
+ query.merge!(:account_id => account) if account
290
+ query.merge!(:nested => parameters[:nested]) if parameters.key?(:nested)
291
+ request_options[:query] = query unless query.empty?
288
292
 
289
293
  request_options[:body] = Fog::JSON.encode(parameters) unless parameters.empty?
290
294
 
@@ -6,8 +6,8 @@ module Fog
6
6
  class Accounts < Fog::Collection
7
7
  model Fog::Compute::Brightbox::Account
8
8
 
9
- def all
10
- data = service.list_accounts
9
+ def all(options = {})
10
+ data = service.list_accounts(options)
11
11
  load(data)
12
12
  end
13
13
 
@@ -5,14 +5,16 @@ module Fog
5
5
  # Accepts the collaboration giving access to the account
6
6
  #
7
7
  # @param [String] identifier Unique reference to identify the resource
8
+ # @param [Hash] options
9
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
8
10
  #
9
11
  # @return [Hash] if successful Hash version of JSON object
10
12
  #
11
13
  # @see https://api.gb1.brightbox.com/1.0/#user_collaboration_accept_user_collaboration
12
14
  #
13
- def accept_user_collaboration(identifier)
15
+ def accept_user_collaboration(identifier, options = {})
14
16
  return nil if identifier.nil? || identifier == ""
15
- wrapped_request("post", "/1.0/user/collaborations/#{identifier}/accept", [200])
17
+ wrapped_request("post", "/1.0/user/collaborations/#{identifier}/accept", [200], options)
16
18
  end
17
19
  end
18
20
  end
@@ -5,14 +5,16 @@ module Fog
5
5
  # Enable console access via VNC to the server for 15 minutes.
6
6
  #
7
7
  # @param [String] identifier Unique reference to identify the resource
8
+ # @param [Hash] options
9
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
8
10
  #
9
11
  # @return [Hash] if successful Hash version of JSON object
10
12
  #
11
13
  # @see https://api.gb1.brightbox.com/1.0/#server_activate_console_server
12
14
  #
13
- def activate_console_server(identifier)
15
+ def activate_console_server(identifier, options = {})
14
16
  return nil if identifier.nil? || identifier == ""
15
- wrapped_request("post", "/1.0/servers/#{identifier}/activate_console", [202])
17
+ wrapped_request("post", "/1.0/servers/#{identifier}/activate_console", [202], options)
16
18
  end
17
19
  end
18
20
  end
@@ -7,6 +7,7 @@ module Fog
7
7
  # @param [String] identifier Unique reference to identify the resource
8
8
  # @param [Hash] options
9
9
  # @option options [Array] :listeners Array of Listener parameters. Timeout is optional and specified in milliseconds.
10
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
10
11
  #
11
12
  # @return [Hash] if successful Hash version of JSON object
12
13
  # @return [NilClass] if no options were passed
@@ -7,6 +7,7 @@ module Fog
7
7
  # @param [String] identifier Unique reference to identify the resource
8
8
  # @param [Hash] options
9
9
  # @option options [Array] :nodes Array of Node parameters
10
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
10
11
  #
11
12
  # @return [Hash] if successful Hash version of JSON object
12
13
  # @return [NilClass] if no options were passed
@@ -8,6 +8,7 @@ module Fog
8
8
  # @param [Hash] options
9
9
  # @option options [Array<Hash>] :servers Array of Hashes containing
10
10
  # +{"server" => server_id}+ for each server to add
11
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
11
12
  #
12
13
  # @return [Hash] if successful Hash version of JSON object
13
14
  # @return [NilClass] if no options were passed
@@ -7,6 +7,7 @@ module Fog
7
7
  # @param [String] identifier Unique reference to identify the resource
8
8
  # @param [Hash] options
9
9
  # @option options [String] :server_group Server Group to apply to
10
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
10
11
  #
11
12
  # @return [Hash] if successful Hash version of JSON object
12
13
  # @return [NilClass] if no options were passed
@@ -7,6 +7,7 @@ module Fog
7
7
  # @param [Hash] options
8
8
  # @option options [String] :name
9
9
  # @option options [String] :description
10
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
10
11
  #
11
12
  # @return [Hash] if successful Hash version of JSON object
12
13
  # @return [NilClass] if no options were passed
@@ -7,6 +7,7 @@ module Fog
7
7
  # @param [Hash] options
8
8
  # @option options [String] :name
9
9
  # @option options [String] :description
10
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
10
11
  #
11
12
  # @return [Hash] if successful Hash version of JSON object
12
13
  # @return [NilClass] if no options were passed
@@ -8,6 +8,7 @@ module Fog
8
8
  # @option options [String] :reverse_dns Reverse DNS hostname
9
9
  # @option options [String] :name Name for Cloud IP
10
10
  # @option options [Array] :port_translators Port on which external clients connect and port on which your service is listening.
11
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
11
12
  #
12
13
  # @return [Hash] if successful Hash version of JSON object
13
14
  # @return [NilClass] if no options were passed
@@ -9,6 +9,7 @@ module Fog
9
9
  # @param [Hash] options
10
10
  # @option options [String] :email Email address of user to invite
11
11
  # @option options [String] :role Role to grant to the user. Currently only `admin`
12
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
12
13
  #
13
14
  # @return [Hash] if successful Hash version of JSON object
14
15
  # @return [NilClass] if no options were passed
@@ -10,6 +10,7 @@ module Fog
10
10
  # @option options [Array] :allow_access ...
11
11
  # @option options [String] :snapshot
12
12
  # @option options [String] :zone
13
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
13
14
  #
14
15
  # @return [Hash] if successful Hash version of JSON object
15
16
  # @return [NilClass] if no options were passed
@@ -10,6 +10,7 @@ module Fog
10
10
  # @option options [String] :server_group
11
11
  # @option options [String] :name Editable label
12
12
  # @option options [String] :description Longer editable description
13
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
13
14
  #
14
15
  # @return [Hash] if successful Hash version of JSON object
15
16
  # @return [NilClass] if no options were passed
@@ -13,6 +13,7 @@ module Fog
13
13
  # @option options [String] :destination_port
14
14
  # @option options [String] :icmp_type_name
15
15
  # @option options [String] :description
16
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
16
17
  #
17
18
  # @return [Hash] if successful Hash version of JSON object
18
19
  # @return [NilClass] if no options were passed
@@ -7,13 +7,14 @@ module Fog
7
7
  # The disk image must be in place before you can attempt to create a reference in the API.
8
8
  #
9
9
  # @param [Hash] options
10
- # @option options [String] :source Filename of the image file uploaded to /incoming via FTP
10
+ # @option options [String] :source Filename of the image uploaded to /images within Orbit. Can consist of letters, numbers or '-_+.~^'
11
11
  # @option options [String] :arch OS architecture this image is built for
12
12
  # @option options [String] :name Name for this image. If no name is specified, a name will be autogenerated based on the source filename &amp; current time. Can be modified later.
13
13
  # @option options [String] :username Username for the image
14
14
  # @option options [Boolean] :public
15
15
  # @option options [Boolean] :compatibility_mode
16
16
  # @option options [String] :description
17
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
17
18
  #
18
19
  # @return [Hash] if successful Hash version of JSON object
19
20
  # @return [NilClass] if no options were passed
@@ -6,13 +6,15 @@ module Fog
6
6
  #
7
7
  # @param [Hash] options
8
8
  # @option options [String] :name Editable label
9
- # @option options [Integer] :buffer_size Buffer size of load balancer. Default is 4096.
10
9
  # @option options [Array] :nodes Array of Node parameters
11
10
  # @option options [String] :policy Method of Load balancing to use
12
11
  # @option options [String] :certificate_pem A X509 SSL certificate in PEM format. Must be included along with 'certificate_key'. If intermediate certificates are required they should be concatenated after the main certificate
13
12
  # @option options [String] :certificate_key The RSA private key used to sign the certificate in PEM format. Must be included along with 'certificate_pem'
13
+ # @option options [Boolean] :sslv3 Allow SSL v3 to be used (default: false)
14
14
  # @option options [Array] :listeners What port to listen on, port to pass through to and protocol (tcp, http or http+ws) of listener. Timeout is optional and specified in milliseconds (default is 50000).
15
15
  # @option options [String] :healthcheck Healthcheck options - only "port" and "type" required
16
+ # @option options [String] :buffer_size Buffer size in bytes
17
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
16
18
  #
17
19
  # @return [Hash] if successful Hash version of JSON object
18
20
  # @return [NilClass] if no options were passed
@@ -13,6 +13,7 @@ module Fog
13
13
  # @option options [String] :zone Zone in which to create new Server
14
14
  # @option options [String] :user_data
15
15
  # @option options [Array] :server_groups Array of server groups to add server to
16
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
16
17
  #
17
18
  # @return [Hash] if successful Hash version of JSON object
18
19
  # @return [NilClass] if no options were passed
@@ -7,6 +7,7 @@ module Fog
7
7
  # @param [Hash] options
8
8
  # @option options [String] :name Editable user label
9
9
  # @option options [String] :description Editable user description
10
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
10
11
  #
11
12
  # @return [Hash] if successful Hash version of JSON object
12
13
  # @return [NilClass] if no options were passed
@@ -5,14 +5,16 @@ module Fog
5
5
  # Destroy the API client.
6
6
  #
7
7
  # @param [String] identifier Unique reference to identify the resource
8
+ # @param [Hash] options
9
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
8
10
  #
9
11
  # @return [Hash] if successful Hash version of JSON object
10
12
  #
11
13
  # @see https://api.gb1.brightbox.com/1.0/#api_client_delete_api_client
12
14
  #
13
- def delete_api_client(identifier)
15
+ def delete_api_client(identifier, options = {})
14
16
  return nil if identifier.nil? || identifier == ""
15
- wrapped_request("delete", "/1.0/api_clients/#{identifier}", [200])
17
+ wrapped_request("delete", "/1.0/api_clients/#{identifier}", [200], options)
16
18
  end
17
19
 
18
20
  # Old format of the delete request.
@@ -5,14 +5,16 @@ module Fog
5
5
  # Destroy the application.
6
6
  #
7
7
  # @param [String] identifier Unique reference to identify the resource
8
+ # @param [Hash] options
9
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
8
10
  #
9
11
  # @return [Hash] if successful Hash version of JSON object
10
12
  #
11
13
  # @see https://api.gb1.brightbox.com/1.0/#application_delete_application
12
14
  #
13
- def delete_application(identifier)
15
+ def delete_application(identifier, options = {})
14
16
  return nil if identifier.nil? || identifier == ""
15
- wrapped_request("delete", "/1.0/applications/#{identifier}", [200])
17
+ wrapped_request("delete", "/1.0/applications/#{identifier}", [200], options)
16
18
  end
17
19
 
18
20
  # Old format of the delete request.
@@ -5,14 +5,16 @@ module Fog
5
5
  # Release the cloud IP address from the account's ownership.
6
6
  #
7
7
  # @param [String] identifier Unique reference to identify the resource
8
+ # @param [Hash] options
9
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
8
10
  #
9
11
  # @return [Hash] if successful Hash version of JSON object
10
12
  #
11
13
  # @see https://api.gb1.brightbox.com/1.0/#cloud_ip_delete_cloud_ip
12
14
  #
13
- def delete_cloud_ip(identifier)
15
+ def delete_cloud_ip(identifier, options = {})
14
16
  return nil if identifier.nil? || identifier == ""
15
- wrapped_request("delete", "/1.0/cloud_ips/#{identifier}", [200])
17
+ wrapped_request("delete", "/1.0/cloud_ips/#{identifier}", [200], options)
16
18
  end
17
19
 
18
20
  # Old format of the delete request.
@@ -5,14 +5,16 @@ module Fog
5
5
  # Cancels or completes the collaboration
6
6
  #
7
7
  # @param [String] identifier Unique reference to identify the resource
8
+ # @param [Hash] options
9
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
8
10
  #
9
11
  # @return [Hash] if successful Hash version of JSON object
10
12
  #
11
13
  # @see https://api.gb1.brightbox.com/1.0/#collaboration_delete_collaboration
12
14
  #
13
- def delete_collaboration(identifier)
15
+ def delete_collaboration(identifier, options = {})
14
16
  return nil if identifier.nil? || identifier == ""
15
- wrapped_request("delete", "/1.0/collaborations/#{identifier}", [200])
17
+ wrapped_request("delete", "/1.0/collaborations/#{identifier}", [200], options)
16
18
  end
17
19
 
18
20
  # Old format of the delete request.
@@ -3,14 +3,16 @@ module Fog
3
3
  class Brightbox
4
4
  class Real
5
5
  # @param [String] identifier Unique reference to identify the resource
6
+ # @param [Hash] options
7
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
6
8
  #
7
9
  # @return [Hash] if successful Hash version of JSON object
8
10
  #
9
11
  # @see https://api.gb1.brightbox.com/1.0/#database_server_delete_database_server
10
12
  #
11
- def delete_database_server(identifier)
13
+ def delete_database_server(identifier, options = {})
12
14
  return nil if identifier.nil? || identifier == ""
13
- wrapped_request("delete", "/1.0/database_servers/#{identifier}", [202])
15
+ wrapped_request("delete", "/1.0/database_servers/#{identifier}", [202], options)
14
16
  end
15
17
 
16
18
  # Old format of the delete request.
@@ -3,14 +3,16 @@ module Fog
3
3
  class Brightbox
4
4
  class Real
5
5
  # @param [String] identifier Unique reference to identify the resource
6
+ # @param [Hash] options
7
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
6
8
  #
7
9
  # @return [Hash] if successful Hash version of JSON object
8
10
  #
9
11
  # @see https://api.gb1.brightbox.com/1.0/#database_snapshot_delete_database_snapshot
10
12
  #
11
- def delete_database_snapshot(identifier)
13
+ def delete_database_snapshot(identifier, options = {})
12
14
  return nil if identifier.nil? || identifier == ""
13
- wrapped_request("delete", "/1.0/database_snapshots/#{identifier}", [202])
15
+ wrapped_request("delete", "/1.0/database_snapshots/#{identifier}", [202], options)
14
16
  end
15
17
 
16
18
  # Old format of the delete request.
@@ -5,14 +5,16 @@ module Fog
5
5
  # Destroy the firewall policy if not in use.
6
6
  #
7
7
  # @param [String] identifier Unique reference to identify the resource
8
+ # @param [Hash] options
9
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
8
10
  #
9
11
  # @return [Hash] if successful Hash version of JSON object
10
12
  #
11
13
  # @see https://api.gb1.brightbox.com/1.0/#firewall_policy_delete_firewall_policy
12
14
  #
13
- def delete_firewall_policy(identifier)
15
+ def delete_firewall_policy(identifier, options = {})
14
16
  return nil if identifier.nil? || identifier == ""
15
- wrapped_request("delete", "/1.0/firewall_policies/#{identifier}", [202])
17
+ wrapped_request("delete", "/1.0/firewall_policies/#{identifier}", [202], options)
16
18
  end
17
19
 
18
20
  # Old format of the delete request.
@@ -5,14 +5,16 @@ module Fog
5
5
  # Destroy the firewall rule.
6
6
  #
7
7
  # @param [String] identifier Unique reference to identify the resource
8
+ # @param [Hash] options
9
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
8
10
  #
9
11
  # @return [Hash] if successful Hash version of JSON object
10
12
  #
11
13
  # @see https://api.gb1.brightbox.com/1.0/#firewall_rule_delete_firewall_rule
12
14
  #
13
- def delete_firewall_rule(identifier)
15
+ def delete_firewall_rule(identifier, options = {})
14
16
  return nil if identifier.nil? || identifier == ""
15
- wrapped_request("delete", "/1.0/firewall_rules/#{identifier}", [202])
17
+ wrapped_request("delete", "/1.0/firewall_rules/#{identifier}", [202], options)
16
18
  end
17
19
 
18
20
  # Old format of the delete request.
@@ -5,14 +5,16 @@ module Fog
5
5
  # Destroy the image.
6
6
  #
7
7
  # @param [String] identifier Unique reference to identify the resource
8
+ # @param [Hash] options
9
+ # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded.
8
10
  #
9
11
  # @return [Hash] if successful Hash version of JSON object
10
12
  #
11
13
  # @see https://api.gb1.brightbox.com/1.0/#image_delete_image
12
14
  #
13
- def delete_image(identifier)
15
+ def delete_image(identifier, options = {})
14
16
  return nil if identifier.nil? || identifier == ""
15
- wrapped_request("delete", "/1.0/images/#{identifier}", [202])
17
+ wrapped_request("delete", "/1.0/images/#{identifier}", [202], options)
16
18
  end
17
19
 
18
20
  # Old format of the delete request.