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