2011-08-17 17:03:45 +01:00
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class Brightbox
|
|
|
|
class Real
|
2012-11-15 13:48:32 +00:00
|
|
|
# Add a number of servers to the server group.
|
2011-08-17 17:03:45 +01:00
|
|
|
#
|
2012-11-15 13:48:32 +00:00
|
|
|
# @param [String] identifier Unique reference to identify the resource
|
|
|
|
# @param [Hash] options
|
|
|
|
# @option options [Array<Hash>] :servers Array of Hashes containing `{"server" => server_id}` for each server to add
|
2011-08-17 17:03:45 +01:00
|
|
|
#
|
2012-11-15 13:48:32 +00:00
|
|
|
# @return [Hash, nil] The JSON response parsed to a Hash or nil if no options passed
|
2011-08-17 17:03:45 +01:00
|
|
|
#
|
2012-11-15 13:48:32 +00:00
|
|
|
# @see https://api.gb1.brightbox.com/1.0/#server_group_add_servers_server_group
|
2011-08-17 17:03:45 +01:00
|
|
|
#
|
2012-11-15 13:48:32 +00:00
|
|
|
# @example
|
|
|
|
# Compute[:brightbox].add_servers_server_group "grp-12345", :servers => [{"server" => "srv-abcde"}, {"server" => "srv-fghij"}]
|
2011-08-17 17:03:45 +01:00
|
|
|
#
|
|
|
|
def add_servers_server_group(identifier, options)
|
|
|
|
return nil if identifier.nil? || identifier == ""
|
2012-12-18 15:00:26 +00:00
|
|
|
wrapped_request("post", "/1.0/server_groups/#{identifier}/add_servers", [202], options)
|
2011-08-17 17:03:45 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2012-11-16 12:48:16 +00:00
|
|
|
end
|