1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[compute|aws] - Change modify_instance_attribute name to match EC2 API method, and actually make it do something

This commit is contained in:
Caleb Tennis 2011-08-31 04:18:43 -04:00
parent c6b9e73369
commit 93b56df04d

View file

@ -20,10 +20,11 @@ module Fog
# 'GroupId'<~Array> - One or more groups to add instance to (VPC only) # 'GroupId'<~Array> - One or more groups to add instance to (VPC only)
# #
# {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyInstanceAttribute.html] # {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyInstanceAttribute.html]
# #
def modify_instance_attributes(instance_id, attributes) def modify_instance_attribute(instance_id, attributes)
params = {} params = {}
params.merge!(Fog::AWS.indexed_param('GroupId', attributes['GroupId'] || [])) params.merge!(Fog::AWS.indexed_param('GroupId', attributes.delete('GroupId') || []))
params.merge!(attributes)
request({ request({
'Action' => 'ModifyInstanceAttribute', 'Action' => 'ModifyInstanceAttribute',
'InstanceId' => instance_id, 'InstanceId' => instance_id,
@ -31,6 +32,11 @@ module Fog
:parser => Fog::Parsers::Compute::AWS::Basic.new :parser => Fog::Parsers::Compute::AWS::Basic.new
}.merge!(params)) }.merge!(params))
end end
def modify_instance_attributes(instance_id, attributes)
Formatador.display_line("[yellow][WARN] modify_instance_attributes method is deprecated, use 'modify_instance_attribute' instead[/]")
modify_instance_attribute(instance_id, attributes)
end
end end
end end