From ed2ed94d3f0a3c523a049c63b65cedcb3255e010 Mon Sep 17 00:00:00 2001 From: geemus Date: Wed, 3 Aug 2011 17:20:39 -0500 Subject: [PATCH] [compute|aws] fix pluralization of modify_image_attribute --- lib/fog/compute/aws.rb | 12 +++++++++++- ...image_attributes.rb => modify_image_attribute.rb} | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) rename lib/fog/compute/requests/aws/{modify_image_attributes.rb => modify_image_attribute.rb} (93%) diff --git a/lib/fog/compute/aws.rb b/lib/fog/compute/aws.rb index a1dd9559b..074a3b068 100644 --- a/lib/fog/compute/aws.rb +++ b/lib/fog/compute/aws.rb @@ -70,7 +70,7 @@ module Fog request :get_console_output request :get_password_data request :import_key_pair - request :modify_image_attributes + request :modify_image_attribute request :modify_snapshot_attribute request :purchase_reserved_instances_offering request :reboot_instances @@ -85,6 +85,16 @@ module Fog request :monitor_instances request :unmonitor_instances + # deprecation + class Real + + def modify_image_attributes(*params) + Formatador.display_line("[yellow][WARN] modify_image_attributes is deprecated, use modify_image_attribute instead[/] [light_black](#{caller.first})[/]") + modify_image_attribute(*params) + end + + end + class Mock def self.data diff --git a/lib/fog/compute/requests/aws/modify_image_attributes.rb b/lib/fog/compute/requests/aws/modify_image_attribute.rb similarity index 93% rename from lib/fog/compute/requests/aws/modify_image_attributes.rb rename to lib/fog/compute/requests/aws/modify_image_attribute.rb index e79c69e17..8263d33fa 100644 --- a/lib/fog/compute/requests/aws/modify_image_attributes.rb +++ b/lib/fog/compute/requests/aws/modify_image_attribute.rb @@ -16,7 +16,7 @@ module Fog # # {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyImageAttribute.html] # - def modify_image_attributes(image_id, attribute, operation_type, options = {}) + def modify_image_attribute(image_id, attribute, operation_type, options = {}) params = {} params.merge!(Fog::AWS.indexed_param('UserId', options['UserId'])) params.merge!(Fog::AWS.indexed_param('UserGroup', options['UserGroup']))