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:
parent
c6b9e73369
commit
93b56df04d
1 changed files with 9 additions and 3 deletions
|
@ -20,10 +20,11 @@ module Fog
|
|||
# '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]
|
||||
#
|
||||
def modify_instance_attributes(instance_id, attributes)
|
||||
#
|
||||
def modify_instance_attribute(instance_id, attributes)
|
||||
params = {}
|
||||
params.merge!(Fog::AWS.indexed_param('GroupId', attributes['GroupId'] || []))
|
||||
params.merge!(Fog::AWS.indexed_param('GroupId', attributes.delete('GroupId') || []))
|
||||
params.merge!(attributes)
|
||||
request({
|
||||
'Action' => 'ModifyInstanceAttribute',
|
||||
'InstanceId' => instance_id,
|
||||
|
@ -31,6 +32,11 @@ module Fog
|
|||
:parser => Fog::Parsers::Compute::AWS::Basic.new
|
||||
}.merge!(params))
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue