From 768fcafaa9092c70719cc0b8cab4cd50da7ca345 Mon Sep 17 00:00:00 2001 From: geemus Date: Mon, 20 Jun 2011 13:49:37 -0700 Subject: [PATCH] [compute|aws] fix helpers to use Fog::AWS --- lib/fog/aws/cloud_formation.rb | 2 +- lib/fog/aws/elb.rb | 2 +- lib/fog/aws/iam.rb | 2 +- lib/fog/aws/rds.rb | 2 +- lib/fog/aws/requests/cloud_formation/create_stack.rb | 2 +- lib/fog/aws/requests/elb/create_load_balancer.rb | 10 +++++----- .../aws/requests/elb/create_load_balancer_listeners.rb | 8 ++++---- .../aws/requests/elb/delete_load_balancer_listeners.rb | 2 +- .../elb/deregister_instances_from_load_balancer.rb | 2 +- lib/fog/aws/requests/elb/describe_instance_health.rb | 2 +- lib/fog/aws/requests/elb/describe_load_balancers.rb | 2 +- .../disable_availability_zones_for_load_balancer.rb | 2 +- .../elb/enable_availability_zones_for_load_balancer.rb | 2 +- .../elb/register_instances_with_load_balancer.rb | 2 +- .../elb/set_load_balancer_policies_of_listener.rb | 2 +- lib/fog/aws/requests/rds/create_db_instance.rb | 2 +- lib/fog/aws/requests/rds/modify_db_instance.rb | 2 +- lib/fog/aws/requests/rds/modify_db_parameter_group.rb | 6 +++--- lib/fog/aws/requests/ses/send_email.rb | 4 ++-- lib/fog/aws/requests/ses/send_raw_email.rb | 2 +- lib/fog/aws/simpledb.rb | 4 ++-- lib/fog/compute/aws.rb | 2 +- lib/fog/compute/requests/aws/describe_addresses.rb | 2 +- .../requests/aws/describe_availability_zones.rb | 2 +- lib/fog/compute/requests/aws/describe_images.rb | 2 +- lib/fog/compute/requests/aws/describe_instances.rb | 2 +- lib/fog/compute/requests/aws/describe_key_pairs.rb | 2 +- lib/fog/compute/requests/aws/describe_regions.rb | 2 +- .../requests/aws/describe_reserved_instances.rb | 2 +- .../aws/describe_reserved_instances_offerings.rb | 2 +- .../compute/requests/aws/describe_security_groups.rb | 2 +- lib/fog/compute/requests/aws/describe_snapshots.rb | 2 +- lib/fog/compute/requests/aws/describe_tags.rb | 2 +- lib/fog/compute/requests/aws/describe_volumes.rb | 2 +- .../compute/requests/aws/modify_image_attributes.rb | 6 +++--- lib/fog/compute/requests/aws/stop_instances.rb | 2 +- 36 files changed, 49 insertions(+), 49 deletions(-) diff --git a/lib/fog/aws/cloud_formation.rb b/lib/fog/aws/cloud_formation.rb index 4a68ceb39..d8bf6ad00 100644 --- a/lib/fog/aws/cloud_formation.rb +++ b/lib/fog/aws/cloud_formation.rb @@ -80,7 +80,7 @@ module Fog idempotent = params.delete(:idempotent) parser = params.delete(:parser) - body = AWS.signed_params( + body = Fog::AWS.signed_params( params, { :aws_access_key_id => @aws_access_key_id, diff --git a/lib/fog/aws/elb.rb b/lib/fog/aws/elb.rb index d513b0925..85ce18f6d 100644 --- a/lib/fog/aws/elb.rb +++ b/lib/fog/aws/elb.rb @@ -100,7 +100,7 @@ module Fog idempotent = params.delete(:idempotent) parser = params.delete(:parser) - body = AWS.signed_params( + body = Fog::AWS.signed_params( params, { :aws_access_key_id => @aws_access_key_id, diff --git a/lib/fog/aws/iam.rb b/lib/fog/aws/iam.rb index 1fd85a1a0..d6ff7430f 100644 --- a/lib/fog/aws/iam.rb +++ b/lib/fog/aws/iam.rb @@ -93,7 +93,7 @@ module Fog idempotent = params.delete(:idempotent) parser = params.delete(:parser) - body = AWS.signed_params( + body = Fog::AWS.signed_params( params, { :aws_access_key_id => @aws_access_key_id, diff --git a/lib/fog/aws/rds.rb b/lib/fog/aws/rds.rb index dd010f941..63a320997 100644 --- a/lib/fog/aws/rds.rb +++ b/lib/fog/aws/rds.rb @@ -115,7 +115,7 @@ module Fog idempotent = params.delete(:idempotent) parser = params.delete(:parser) - body = AWS.signed_params( + body = Fog::AWS.signed_params( params, { :aws_access_key_id => @aws_access_key_id, diff --git a/lib/fog/aws/requests/cloud_formation/create_stack.rb b/lib/fog/aws/requests/cloud_formation/create_stack.rb index 62211ce7c..ffd39cada 100644 --- a/lib/fog/aws/requests/cloud_formation/create_stack.rb +++ b/lib/fog/aws/requests/cloud_formation/create_stack.rb @@ -36,7 +36,7 @@ module Fog end if options['NotificationARNs'] - params.merge!(AWS.indexed_param("NotificationARNs.member", [*options['NotificationARNs']])) + params.merge!(Fog::AWS.indexed_param("NotificationARNs.member", [*options['NotificationARNs']])) end if options['Parameters'] diff --git a/lib/fog/aws/requests/elb/create_load_balancer.rb b/lib/fog/aws/requests/elb/create_load_balancer.rb index af47d5c0c..bfed845a8 100644 --- a/lib/fog/aws/requests/elb/create_load_balancer.rb +++ b/lib/fog/aws/requests/elb/create_load_balancer.rb @@ -23,7 +23,7 @@ module Fog # * 'CreateLoadBalancerResult'<~Hash>: # * 'DNSName'<~String> - DNS name for the newly created ELB def create_load_balancer(availability_zones, lb_name, listeners) - params = AWS.indexed_param('AvailabilityZones.member', [*availability_zones]) + params = Fog::AWS.indexed_param('AvailabilityZones.member', [*availability_zones]) listener_protocol = [] listener_lb_port = [] @@ -36,10 +36,10 @@ module Fog listener_ssl_certificate_id.push(listener['SSLCertificateId']) end - params.merge!(AWS.indexed_param('Listeners.member.%d.Protocol', listener_protocol)) - params.merge!(AWS.indexed_param('Listeners.member.%d.LoadBalancerPort', listener_lb_port)) - params.merge!(AWS.indexed_param('Listeners.member.%d.InstancePort', listener_instance_port)) - params.merge!(AWS.indexed_param('Listeners.member.%d.SSLCertificateId', listener_ssl_certificate_id)) + params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.Protocol', listener_protocol)) + params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.LoadBalancerPort', listener_lb_port)) + params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.InstancePort', listener_instance_port)) + params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.SSLCertificateId', listener_ssl_certificate_id)) request({ 'Action' => 'CreateLoadBalancer', diff --git a/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb b/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb index b5e86c7cd..90ce58243 100644 --- a/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb +++ b/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb @@ -33,10 +33,10 @@ module Fog listener_ssl_certificate_id.push(listener['SSLCertificateId']) end - params.merge!(AWS.indexed_param('Listeners.member.%d.Protocol', listener_protocol)) - params.merge!(AWS.indexed_param('Listeners.member.%d.LoadBalancerPort', listener_lb_port)) - params.merge!(AWS.indexed_param('Listeners.member.%d.InstancePort', listener_instance_port)) - params.merge!(AWS.indexed_param('Listeners.member.%d.SSLCertificateId', listener_ssl_certificate_id)) + params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.Protocol', listener_protocol)) + params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.LoadBalancerPort', listener_lb_port)) + params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.InstancePort', listener_instance_port)) + params.merge!(Fog::AWS.indexed_param('Listeners.member.%d.SSLCertificateId', listener_ssl_certificate_id)) request({ 'Action' => 'CreateLoadBalancerListeners', diff --git a/lib/fog/aws/requests/elb/delete_load_balancer_listeners.rb b/lib/fog/aws/requests/elb/delete_load_balancer_listeners.rb index b9c357523..ce3fe3cdc 100644 --- a/lib/fog/aws/requests/elb/delete_load_balancer_listeners.rb +++ b/lib/fog/aws/requests/elb/delete_load_balancer_listeners.rb @@ -16,7 +16,7 @@ module Fog # * 'ResponseMetadata'<~Hash>: # * 'RequestId'<~String> - Id of request def delete_load_balancer_listeners(lb_name, load_balancer_ports) - params = AWS.indexed_param('LoadBalancerPorts.memeber.%d', load_balancer_ports) + params = Fog::AWS.indexed_param('LoadBalancerPorts.memeber.%d', load_balancer_ports) request({ 'Action' => 'DeleteLoadBalancerListeners', diff --git a/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb b/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb index 56f08b0f6..89293d278 100644 --- a/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb +++ b/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb @@ -20,7 +20,7 @@ module Fog # * 'Instances'<~Array> - array of hashes describing instances currently enabled # * 'InstanceId'<~String> def deregister_instances_from_load_balancer(instance_ids, lb_name) - params = AWS.indexed_param('Instances.member.%d.InstanceId', [*instance_ids]) + params = Fog::AWS.indexed_param('Instances.member.%d.InstanceId', [*instance_ids]) request({ 'Action' => 'DeregisterInstancesFromLoadBalancer', 'LoadBalancerName' => lb_name, diff --git a/lib/fog/aws/requests/elb/describe_instance_health.rb b/lib/fog/aws/requests/elb/describe_instance_health.rb index 8220010fc..21f2aaaee 100644 --- a/lib/fog/aws/requests/elb/describe_instance_health.rb +++ b/lib/fog/aws/requests/elb/describe_instance_health.rb @@ -23,7 +23,7 @@ module Fog # * 'InstanceId'<~String> # * 'ReasonCode'<~String> def describe_instance_health(lb_name, instance_ids = []) - params = AWS.indexed_param('Instances.member.%d.InstanceId', [*instance_ids]) + params = Fog::AWS.indexed_param('Instances.member.%d.InstanceId', [*instance_ids]) request({ 'Action' => 'DescribeInstanceHealth', 'LoadBalancerName' => lb_name, diff --git a/lib/fog/aws/requests/elb/describe_load_balancers.rb b/lib/fog/aws/requests/elb/describe_load_balancers.rb index a828c9961..6edcdcc6c 100644 --- a/lib/fog/aws/requests/elb/describe_load_balancers.rb +++ b/lib/fog/aws/requests/elb/describe_load_balancers.rb @@ -43,7 +43,7 @@ module Fog # * 'GroupName'<~String> - Name of the source security group to use with inbound security group rules # * 'OwnerAlias'<~String> - Owner of the source security group def describe_load_balancers(lb_name = []) - params = AWS.indexed_param('LoadBalancerNames.member', [*lb_name]) + params = Fog::AWS.indexed_param('LoadBalancerNames.member', [*lb_name]) request({ 'Action' => 'DescribeLoadBalancers', :parser => Fog::Parsers::AWS::ELB::DescribeLoadBalancers.new diff --git a/lib/fog/aws/requests/elb/disable_availability_zones_for_load_balancer.rb b/lib/fog/aws/requests/elb/disable_availability_zones_for_load_balancer.rb index ab1e87255..2d9ef0059 100644 --- a/lib/fog/aws/requests/elb/disable_availability_zones_for_load_balancer.rb +++ b/lib/fog/aws/requests/elb/disable_availability_zones_for_load_balancer.rb @@ -19,7 +19,7 @@ module Fog # * 'DisableAvailabilityZonesForLoadBalancerResult'<~Hash>: # * 'AvailabilityZones'<~Array> - array of strings describing instances currently enabled def disable_availability_zones_for_load_balancer(availability_zones, lb_name) - params = AWS.indexed_param('AvailabilityZones.member', [*availability_zones]) + params = Fog::AWS.indexed_param('AvailabilityZones.member', [*availability_zones]) request({ 'Action' => 'DisableAvailabilityZonesForLoadBalancer', 'LoadBalancerName' => lb_name, diff --git a/lib/fog/aws/requests/elb/enable_availability_zones_for_load_balancer.rb b/lib/fog/aws/requests/elb/enable_availability_zones_for_load_balancer.rb index 5711d036b..0faf24bb2 100644 --- a/lib/fog/aws/requests/elb/enable_availability_zones_for_load_balancer.rb +++ b/lib/fog/aws/requests/elb/enable_availability_zones_for_load_balancer.rb @@ -19,7 +19,7 @@ module Fog # * 'EnableAvailabilityZonesForLoadBalancerResult'<~Hash>: # * 'AvailabilityZones'<~Array> - array of strings describing instances currently enabled def enable_availability_zones_for_load_balancer(availability_zones, lb_name) - params = AWS.indexed_param('AvailabilityZones.member', [*availability_zones]) + params = Fog::AWS.indexed_param('AvailabilityZones.member', [*availability_zones]) request({ 'Action' => 'EnableAvailabilityZonesForLoadBalancer', 'LoadBalancerName' => lb_name, diff --git a/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb b/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb index 9d4445da3..58286b59e 100644 --- a/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +++ b/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb @@ -20,7 +20,7 @@ module Fog # * 'Instances'<~Array> - array of hashes describing instances currently enabled # * 'InstanceId'<~String> def register_instances_with_load_balancer(instance_ids, lb_name) - params = AWS.indexed_param('Instances.member.%d.InstanceId', [*instance_ids]) + params = Fog::AWS.indexed_param('Instances.member.%d.InstanceId', [*instance_ids]) request({ 'Action' => 'RegisterInstancesWithLoadBalancer', 'LoadBalancerName' => lb_name, diff --git a/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb b/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb index f8b209b68..073c741db 100644 --- a/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb +++ b/lib/fog/aws/requests/elb/set_load_balancer_policies_of_listener.rb @@ -25,7 +25,7 @@ module Fog def set_load_balancer_policies_of_listener(lb_name, load_balancer_port, policy_names) params = {'LoadBalancerPort' => load_balancer_port} if policy_names.any? - params.merge!(AWS.indexed_param('PolicyNames.member', policy_names)) + params.merge!(Fog::AWS.indexed_param('PolicyNames.member', policy_names)) else params['PolicyNames'] = '' end diff --git a/lib/fog/aws/requests/rds/create_db_instance.rb b/lib/fog/aws/requests/rds/create_db_instance.rb index 91efb2db4..9332f30f0 100644 --- a/lib/fog/aws/requests/rds/create_db_instance.rb +++ b/lib/fog/aws/requests/rds/create_db_instance.rb @@ -32,7 +32,7 @@ module Fog def create_db_instance(db_name, options={}) if security_groups = options.delete('DBSecurityGroups') - options.merge!(AWS.indexed_param('DBSecurityGroups.member.%d', [*security_groups])) + options.merge!(Fog::AWS.indexed_param('DBSecurityGroups.member.%d', [*security_groups])) end request({ diff --git a/lib/fog/aws/requests/rds/modify_db_instance.rb b/lib/fog/aws/requests/rds/modify_db_instance.rb index 084e64831..c6e51282e 100644 --- a/lib/fog/aws/requests/rds/modify_db_instance.rb +++ b/lib/fog/aws/requests/rds/modify_db_instance.rb @@ -29,7 +29,7 @@ module Fog def modify_db_instance(db_name, apply_immediately, options={}) if security_groups = options.delete('DBSecurityGroups') - options.merge!(AWS.indexed_param('DBSecurityGroups.member.%d', [*security_groups])) + options.merge!(Fog::AWS.indexed_param('DBSecurityGroups.member.%d', [*security_groups])) end request({ diff --git a/lib/fog/aws/requests/rds/modify_db_parameter_group.rb b/lib/fog/aws/requests/rds/modify_db_parameter_group.rb index 7cb001584..cab76c174 100644 --- a/lib/fog/aws/requests/rds/modify_db_parameter_group.rb +++ b/lib/fog/aws/requests/rds/modify_db_parameter_group.rb @@ -29,9 +29,9 @@ module Fog parameter_apply_methods.push(parameter['ApplyMethod']) end params = {} - params.merge!(AWS.indexed_param('Parameters.member.%d.ParameterName', parameter_names)) - params.merge!(AWS.indexed_param('Parameters.member.%d.ParameterValue', parameter_values)) - params.merge!(AWS.indexed_param('Parameters.member.%d.ApplyMethod', parameter_apply_methods)) + params.merge!(Fog::AWS.indexed_param('Parameters.member.%d.ParameterName', parameter_names)) + params.merge!(Fog::AWS.indexed_param('Parameters.member.%d.ParameterValue', parameter_values)) + params.merge!(Fog::AWS.indexed_param('Parameters.member.%d.ApplyMethod', parameter_apply_methods)) request({ 'Action' => 'ModifyDBParameterGroup', diff --git a/lib/fog/aws/requests/ses/send_email.rb b/lib/fog/aws/requests/ses/send_email.rb index a3e39ede8..6db1d7b3a 100644 --- a/lib/fog/aws/requests/ses/send_email.rb +++ b/lib/fog/aws/requests/ses/send_email.rb @@ -40,7 +40,7 @@ module Fog } for key, values in destination - params.merge!(AWS.indexed_param("Destination.#{key}.member", [*values])) + params.merge!(Fog::AWS.indexed_param("Destination.#{key}.member", [*values])) end for key, value in message['Subject'] @@ -54,7 +54,7 @@ module Fog end if options.has_key?('ReplyToAddresses') - params.merge!(AWS.indexed_param("ReplyToAddresses.member", [*options['ReplyToAddresses']])) + params.merge!(Fog::AWS.indexed_param("ReplyToAddresses.member", [*options['ReplyToAddresses']])) end if options.has_key?('ReturnPath') diff --git a/lib/fog/aws/requests/ses/send_raw_email.rb b/lib/fog/aws/requests/ses/send_raw_email.rb index 34f6457ff..73c3a555c 100644 --- a/lib/fog/aws/requests/ses/send_raw_email.rb +++ b/lib/fog/aws/requests/ses/send_raw_email.rb @@ -22,7 +22,7 @@ module Fog def send_raw_email(raw_message, options = {}) params = {} if options.has_key?('Destinations') - params.merge!(AWS.indexed_param('Destinations.member', [*options['Destinations']])) + params.merge!(Fog::AWS.indexed_param('Destinations.member', [*options['Destinations']])) end if options.has_key?('Source') params['Source'] = options['Source'] diff --git a/lib/fog/aws/simpledb.rb b/lib/fog/aws/simpledb.rb index 1b773a2d1..189dde6ee 100644 --- a/lib/fog/aws/simpledb.rb +++ b/lib/fog/aws/simpledb.rb @@ -121,7 +121,7 @@ module Fog end def encode_attribute_names(attributes) - AWS.indexed_param('AttributeName', attributes.map {|attribute| attributes.to_s}) + Fog::AWS.indexed_param('AttributeName', attributes.map {|attribute| attributes.to_s}) end def encode_batch_attributes(items, replace_attributes = Hash.new([])) @@ -155,7 +155,7 @@ module Fog idempotent = params.delete(:idempotent) parser = params.delete(:parser) - body = AWS.signed_params( + body = Fog::AWS.signed_params( params, { :aws_access_key_id => @aws_access_key_id, diff --git a/lib/fog/compute/aws.rb b/lib/fog/compute/aws.rb index d095c8dd5..92299022e 100644 --- a/lib/fog/compute/aws.rb +++ b/lib/fog/compute/aws.rb @@ -241,7 +241,7 @@ module Fog idempotent = params.delete(:idempotent) parser = params.delete(:parser) - body = AWS.signed_params( + body = Fog::AWS.signed_params( params, { :aws_access_key_id => @aws_access_key_id, diff --git a/lib/fog/compute/requests/aws/describe_addresses.rb b/lib/fog/compute/requests/aws/describe_addresses.rb index f2d034a28..891e7a9da 100644 --- a/lib/fog/compute/requests/aws/describe_addresses.rb +++ b/lib/fog/compute/requests/aws/describe_addresses.rb @@ -24,7 +24,7 @@ module Fog Formatador.display_line("[yellow][WARN] describe_addresses with #{filters.class} param is deprecated, use describe_addresses('public-ip' => []) instead[/] [light_black](#{caller.first})[/]") filters = {'public-ip' => [*filters]} end - params = AWS.indexed_filters(filters) + params = Fog::AWS.indexed_filters(filters) request({ 'Action' => 'DescribeAddresses', :idempotent => true, diff --git a/lib/fog/compute/requests/aws/describe_availability_zones.rb b/lib/fog/compute/requests/aws/describe_availability_zones.rb index 90b5507b0..b99c41bbf 100644 --- a/lib/fog/compute/requests/aws/describe_availability_zones.rb +++ b/lib/fog/compute/requests/aws/describe_availability_zones.rb @@ -25,7 +25,7 @@ module Fog Formatador.display_line("[yellow][WARN] describe_availability_zones with #{filters.class} param is deprecated, use describe_availability_zones('zone-name' => []) instead[/] [light_black](#{caller.first})[/]") filters = {'public-ip' => [*filters]} end - params = AWS.indexed_filters(filters) + params = Fog::AWS.indexed_filters(filters) request({ 'Action' => 'DescribeAvailabilityZones', :idempotent => true, diff --git a/lib/fog/compute/requests/aws/describe_images.rb b/lib/fog/compute/requests/aws/describe_images.rb index 4f1fa1bc5..46c4f3882 100644 --- a/lib/fog/compute/requests/aws/describe_images.rb +++ b/lib/fog/compute/requests/aws/describe_images.rb @@ -45,7 +45,7 @@ module Fog options[key] = filters.delete(key) end end - params = AWS.indexed_filters(filters).merge!(options) + params = Fog::AWS.indexed_filters(filters).merge!(options) request({ 'Action' => 'DescribeImages', :idempotent => true, diff --git a/lib/fog/compute/requests/aws/describe_instances.rb b/lib/fog/compute/requests/aws/describe_instances.rb index 3c644d6b4..48adfe8db 100644 --- a/lib/fog/compute/requests/aws/describe_instances.rb +++ b/lib/fog/compute/requests/aws/describe_instances.rb @@ -62,7 +62,7 @@ module Fog if filters['instance-id'] && !filters['instance-id'].is_a?(Array) params.merge!('InstanceId' => filters.delete('instance-id')) end - params.merge!(AWS.indexed_filters(filters)) + params.merge!(Fog::AWS.indexed_filters(filters)) request({ 'Action' => 'DescribeInstances', diff --git a/lib/fog/compute/requests/aws/describe_key_pairs.rb b/lib/fog/compute/requests/aws/describe_key_pairs.rb index 732cd8c56..d5bcb9cd8 100644 --- a/lib/fog/compute/requests/aws/describe_key_pairs.rb +++ b/lib/fog/compute/requests/aws/describe_key_pairs.rb @@ -24,7 +24,7 @@ module Fog Formatador.display_line("[yellow][WARN] describe_key_pairs with #{filters.class} param is deprecated, use describe_key_pairs('key-name' => []) instead[/] [light_black](#{caller.first})[/]") filters = {'key-name' => [*filters]} end - params = AWS.indexed_filters(filters) + params = Fog::AWS.indexed_filters(filters) request({ 'Action' => 'DescribeKeyPairs', :idempotent => true, diff --git a/lib/fog/compute/requests/aws/describe_regions.rb b/lib/fog/compute/requests/aws/describe_regions.rb index 47d9aff6f..be145d8be 100644 --- a/lib/fog/compute/requests/aws/describe_regions.rb +++ b/lib/fog/compute/requests/aws/describe_regions.rb @@ -24,7 +24,7 @@ module Fog Formatador.display_line("[yellow][WARN] describe_regions with #{filters.class} param is deprecated, use describe_regions('region-name' => []) instead[/] [light_black](#{caller.first})[/]") filters = {'region-name' => [*filters]} end - params = AWS.indexed_filters(filters) + params = Fog::AWS.indexed_filters(filters) request({ 'Action' => 'DescribeRegions', :idempotent => true, diff --git a/lib/fog/compute/requests/aws/describe_reserved_instances.rb b/lib/fog/compute/requests/aws/describe_reserved_instances.rb index 20e1bca39..565b9fe2d 100644 --- a/lib/fog/compute/requests/aws/describe_reserved_instances.rb +++ b/lib/fog/compute/requests/aws/describe_reserved_instances.rb @@ -32,7 +32,7 @@ module Fog Formatador.display_line("[yellow][WARN] describe_reserved_instances with #{filters.class} param is deprecated, use describe_reserved_instances('reserved-instances-id' => []) instead[/] [light_black](#{caller.first})[/]") filters = {'reserved-instances-id' => [*filters]} end - params = AWS.indexed_filters(filters) + params = Fog::AWS.indexed_filters(filters) request({ 'Action' => 'DescribeReservedInstances', :idempotent => true, diff --git a/lib/fog/compute/requests/aws/describe_reserved_instances_offerings.rb b/lib/fog/compute/requests/aws/describe_reserved_instances_offerings.rb index c689626d5..d4cadeecf 100644 --- a/lib/fog/compute/requests/aws/describe_reserved_instances_offerings.rb +++ b/lib/fog/compute/requests/aws/describe_reserved_instances_offerings.rb @@ -25,7 +25,7 @@ module Fog # # {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeReservedInstancesOfferings.html] def describe_reserved_instances_offerings(filters = {}) - params = AWS.indexed_filters(filters) + params = Fog::AWS.indexed_filters(filters) request({ 'Action' => 'DescribeReservedInstancesOfferings', :idempotent => true, diff --git a/lib/fog/compute/requests/aws/describe_security_groups.rb b/lib/fog/compute/requests/aws/describe_security_groups.rb index 3942b3823..c06efa05c 100644 --- a/lib/fog/compute/requests/aws/describe_security_groups.rb +++ b/lib/fog/compute/requests/aws/describe_security_groups.rb @@ -34,7 +34,7 @@ module Fog Formatador.display_line("[yellow][WARN] describe_security_groups with #{filters.class} param is deprecated, use describe_security_groups('group-name' => []) instead[/] [light_black](#{caller.first})[/]") filters = {'group-name' => [*filters]} end - params = AWS.indexed_filters(filters) + params = Fog::AWS.indexed_filters(filters) request({ 'Action' => 'DescribeSecurityGroups', :idempotent => true, diff --git a/lib/fog/compute/requests/aws/describe_snapshots.rb b/lib/fog/compute/requests/aws/describe_snapshots.rb index a72e1d73d..0c86febf9 100644 --- a/lib/fog/compute/requests/aws/describe_snapshots.rb +++ b/lib/fog/compute/requests/aws/describe_snapshots.rb @@ -40,7 +40,7 @@ module Fog end end options['RestorableBy'] ||= 'self' - params = AWS.indexed_filters(filters).merge!(options) + params = Fog::AWS.indexed_filters(filters).merge!(options) request({ 'Action' => 'DescribeSnapshots', :idempotent => true, diff --git a/lib/fog/compute/requests/aws/describe_tags.rb b/lib/fog/compute/requests/aws/describe_tags.rb index a2593e78f..7aa303251 100644 --- a/lib/fog/compute/requests/aws/describe_tags.rb +++ b/lib/fog/compute/requests/aws/describe_tags.rb @@ -22,7 +22,7 @@ module Fog # # {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeTags.html] def describe_tags(filters = {}) - params = AWS.indexed_filters(filters) + params = Fog::AWS.indexed_filters(filters) request({ 'Action' => 'DescribeTags', :idempotent => true, diff --git a/lib/fog/compute/requests/aws/describe_volumes.rb b/lib/fog/compute/requests/aws/describe_volumes.rb index 16fee6e46..965b7449c 100644 --- a/lib/fog/compute/requests/aws/describe_volumes.rb +++ b/lib/fog/compute/requests/aws/describe_volumes.rb @@ -34,7 +34,7 @@ module Fog Formatador.display_line("[yellow][WARN] describe_volumes with #{filters.class} param is deprecated, use describe_volumes('volume-id' => []) instead[/] [light_black](#{caller.first})[/]") filters = {'volume-id' => [*filters]} end - params = AWS.indexed_filters(filters) + params = Fog::AWS.indexed_filters(filters) request({ 'Action' => 'DescribeVolumes', :idempotent => true, diff --git a/lib/fog/compute/requests/aws/modify_image_attributes.rb b/lib/fog/compute/requests/aws/modify_image_attributes.rb index 14a3c2f2f..e79c69e17 100644 --- a/lib/fog/compute/requests/aws/modify_image_attributes.rb +++ b/lib/fog/compute/requests/aws/modify_image_attributes.rb @@ -18,9 +18,9 @@ module Fog # def modify_image_attributes(image_id, attribute, operation_type, options = {}) params = {} - params.merge!(AWS.indexed_param('UserId', options['UserId'])) - params.merge!(AWS.indexed_param('UserGroup', options['UserGroup'])) - params.merge!(AWS.indexed_param('ProductCode', options['ProductCode'])) + params.merge!(Fog::AWS.indexed_param('UserId', options['UserId'])) + params.merge!(Fog::AWS.indexed_param('UserGroup', options['UserGroup'])) + params.merge!(Fog::AWS.indexed_param('ProductCode', options['ProductCode'])) request({ 'Action' => 'ModifyImageAttribute', 'Attribute' => attribute, diff --git a/lib/fog/compute/requests/aws/stop_instances.rb b/lib/fog/compute/requests/aws/stop_instances.rb index 9c19a14c6..03f28782a 100644 --- a/lib/fog/compute/requests/aws/stop_instances.rb +++ b/lib/fog/compute/requests/aws/stop_instances.rb @@ -18,7 +18,7 @@ module Fog # # {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-StopInstances.html] def stop_instances(instance_id) - params = AWS.indexed_param('InstanceId', instance_id) + params = Fog::AWS.indexed_param('InstanceId', instance_id) request({ 'Action' => 'StopInstances', :idempotent => true,