diff --git a/lib/fog/aws.rb b/lib/fog/aws.rb index dac4f06a59..b537890ef3 100644 --- a/lib/fog/aws.rb +++ b/lib/fog/aws.rb @@ -1,32 +1,382 @@ -require 'fog/aws/version' +require 'fog/core' +require 'fog/xml' +require 'fog/json' + +require File.expand_path('../aws/version', __FILE__) +require File.expand_path('../aws/credential_fetcher', __FILE__) +require File.expand_path('../aws/region_methods', __FILE__) +require File.expand_path('../aws/signaturev4', __FILE__) module Fog + module CDN + autoload :AWS, File.expand_path('../aws/cdn', __FILE__) + end + + module Compute + autoload :AWS, File.expand_path('../aws/compute', __FILE__) + end + + module DNS + autoload :AWS, File.expand_path('../aws/dns', __FILE__) + end + + module Storage + autoload :AWS, File.expand_path('../aws/storage', __FILE__) + end + module AWS + extend Fog::Provider + + autoload :AutoScaling, File.expand_path('../aws/auto_scaling', __FILE__) + autoload :ElasticBeanstalk, File.expand_path('../aws/beanstalk', __FILE__) + autoload :CloudFormation, File.expand_path('../aws/cloud_formation', __FILE__) + autoload :CloudWatch, File.expand_path('../aws/cloud_watch', __FILE__) + autoload :DataPipeline, File.expand_path('../aws/data_pipeline', __FILE__) + autoload :DynamoDB, File.expand_path('../aws/dynamodb', __FILE__) + autoload :Elasticache, File.expand_path('../aws/elasticache', __FILE__) + autoload :ELB, File.expand_path('../aws/elb', __FILE__) + autoload :EMR, File.expand_path('../aws/emr', __FILE__) + autoload :Federation, File.expand_path('../aws/federation', __FILE__) + autoload :Glacier, File.expand_path('../aws/glacier', __FILE__) + autoload :IAM, File.expand_path('../aws/iam', __FILE__) + autoload :RDS, File.expand_path('../aws/rds', __FILE__) + autoload :Redshift, File.expand_path('../aws/redshift', __FILE__) + autoload :SES, File.expand_path('../aws/ses', __FILE__) + autoload :SimpleDB, File.expand_path('../aws/simpledb', __FILE__) + autoload :SNS, File.expand_path('../aws/sns', __FILE__) + autoload :SQS, File.expand_path('../aws/sqs', __FILE__) + autoload :STS, File.expand_path('../aws/sts', __FILE__) + + service(:auto_scaling, 'AutoScaling') + service(:beanstalk, 'ElasticBeanstalk') + service(:cdn, 'CDN') + service(:compute, 'Compute') + service(:cloud_formation, 'CloudFormation') + service(:cloud_watch, 'CloudWatch') + service(:data_pipeline, 'DataPipeline') + service(:dynamodb, 'DynamoDB') + service(:dns, 'DNS') + service(:elasticache, 'Elasticache') + service(:elb, 'ELB') + service(:emr, 'EMR') + service(:federation, 'Federation') + service(:glacier, 'Glacier') + service(:iam, 'IAM') + service(:rds, 'RDS') + service(:redshift, 'Redshift') + service(:ses, 'SES') + service(:simpledb, 'SimpleDB') + service(:sns, 'SNS') + service(:sqs, 'SQS') + service(:sts, 'STS') + service(:storage, 'Storage') + + def self.indexed_param(key, values) + params = {} + unless key.include?('%d') + key << '.%d' + end + [*values].each_with_index do |value, index| + if value.respond_to?('keys') + k = format(key, index + 1) + value.each do | vkey, vvalue | + params["#{k}.#{vkey}"] = vvalue + end + else + params[format(key, index + 1)] = value + end + end + params + end + + def self.serialize_keys(key, value, options = {}) + case value + when Hash + value.each do | k, v | + options.merge!(serialize_keys("#{key}.#{k}", v)) + end + return options + when Array + value.each_with_index do | it, idx | + options.merge!(serialize_keys("#{key}.member.#{(idx + 1)}", it)) + end + return options + else + return {key => value} + end + end + + def self.indexed_request_param(name, values) + idx = -1 + Array(values).reduce({}) do |params, value| + params["#{name}.#{idx += 1}"] = value + params + end + end + + def self.indexed_filters(filters) + params = {} + filters.keys.each_with_index do |key, key_index| + key_index += 1 + params[format('Filter.%d.Name', key_index)] = key + [*filters[key]].each_with_index do |value, value_index| + value_index += 1 + params[format('Filter.%d.Value.%d', key_index, value_index)] = value + end + end + params + end + + def self.escape(string) + string.gsub(/([^a-zA-Z0-9_.\-~]+)/) { + "%" + $1.unpack("H2" * $1.bytesize).join("%").upcase + } + end + + def self.signed_params_v4(params, headers, options={}) + date = Fog::Time.now + + params = params.merge('Version' => options[:version]) + + headers = headers.merge('Host' => options[:host], 'x-amz-date' => date.to_iso8601_basic) + headers['x-amz-security-token'] = options[:aws_session_token] if options[:aws_session_token] + + body = '' + for key in params.keys.sort + unless (value = params[key]).nil? + body << "#{key}=#{escape(value.to_s)}&" + end + end + body.chop! + + headers['Authorization'] = options[:signer].sign({:method => options[:method], :headers => headers, :body => body, :query => {}, :path => options[:path]}, date) + + return body, headers + end + + def self.signed_params(params, options = {}) + params.merge!({ + 'AWSAccessKeyId' => options[:aws_access_key_id], + 'SignatureMethod' => 'HmacSHA256', + 'SignatureVersion' => '2', + 'Timestamp' => Time.now.utc.strftime("%Y-%m-%dT%H:%M:%SZ"), + 'Version' => options[:version] + }) + + params.merge!({ + 'SecurityToken' => options[:aws_session_token] + }) if options[:aws_session_token] + + body = '' + for key in params.keys.sort + unless (value = params[key]).nil? + body << "#{key}=#{escape(value.to_s)}&" + end + end + string_to_sign = "POST\n#{options[:host]}:#{options[:port]}\n#{options[:path]}\n" << body.chop + signed_string = options[:hmac].sign(string_to_sign) + body << "Signature=#{escape(Base64.encode64(signed_string).chomp!)}" + + body + end + + class Mock + def self.arn(vendor, account_id, path, region = nil) + "arn:aws:#{vendor}:#{region}:#{account_id}:#{path}" + end + + def self.availability_zone(region) + "#{region}#{Fog::Mock.random_selection('abcd', 1)}" + end + + def self.box_usage + sprintf("%0.10f", rand / 100).to_f + end + + def self.console_output + # "[ 0.000000] Linux version 2.6.18-xenU-ec2-v1.2 (root@domU-12-31-39-07-51-82) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)) #2 SMP Wed Aug 19 09:04:38 EDT 2009" + Base64.decode64("WyAwLjAwMDAwMF0gTGludXggdmVyc2lvbiAyLjYuMTgteGVuVS1lYzItdjEu\nMiAocm9vdEBkb21VLTEyLTMxLTM5LTA3LTUxLTgyKSAoZ2NjIHZlcnNpb24g\nNC4xLjIgMjAwNzA2MjYgKFJlZCBIYXQgNC4xLjItMTMpKSAjMiBTTVAgV2Vk\nIEF1ZyAxOSAwOTowNDozOCBFRFQgMjAwOQ==\n") + end + + def self.dns_name_for(ip_address) + "ec2-#{ip_address.gsub('.','-')}.compute-1.amazonaws.com" + end + + def self.private_dns_name_for(ip_address) + "ip-#{ip_address.gsub('.','-')}.ec2.internal" + end + + def self.image + path = [] + (rand(3) + 2).times do + path << Fog::Mock.random_letters(rand(9) + 8) + end + { + "imageOwnerId" => Fog::Mock.random_letters(rand(5) + 4), + "blockDeviceMapping" => [], + "productCodes" => [], + "kernelId" => kernel_id, + "ramdiskId" => ramdisk_id, + "imageState" => "available", + "imageId" => image_id, + "architecture" => "i386", + "isPublic" => true, + "imageLocation" => path.join('/'), + "imageType" => "machine", + "rootDeviceType" => ["ebs","instance-store"][rand(2)], + "rootDeviceName" => "/dev/sda1" + } + end + + def self.image_id + "ami-#{Fog::Mock.random_hex(8)}" + end + + def self.key_fingerprint + fingerprint = [] + 20.times do + fingerprint << Fog::Mock.random_hex(2) + end + fingerprint.join(':') + end + + def self.instance_id + "i-#{Fog::Mock.random_hex(8)}" + end + + def self.ip_address + Fog::Mock.random_ip + end + + def self.private_ip_address + ip_address.gsub(/^\d{1,3}\./,"10.") + end + + def self.kernel_id + "aki-#{Fog::Mock.random_hex(8)}" + end + + def self.key_material + OpenSSL::PKey::RSA.generate(1024).to_s + end + + def self.owner_id + Fog::Mock.random_numbers(12) + end + + def self.ramdisk_id + "ari-#{Fog::Mock.random_hex(8)}" + end + + def self.request_id + request_id = [] + request_id << Fog::Mock.random_hex(8) + 3.times do + request_id << Fog::Mock.random_hex(4) + end + request_id << Fog::Mock.random_hex(12) + request_id.join('-') + end + class << self + alias_method :reserved_instances_id, :request_id + alias_method :reserved_instances_offering_id, :request_id + alias_method :sqs_message_id, :request_id + alias_method :sqs_sender_id, :request_id + end + + def self.reservation_id + "r-#{Fog::Mock.random_hex(8)}" + end + + def self.snapshot_id + "snap-#{Fog::Mock.random_hex(8)}" + end + + def self.volume_id + "vol-#{Fog::Mock.random_hex(8)}" + end + + def self.security_group_id + "sg-#{Fog::Mock.random_hex(8)}" + end + + def self.network_acl_id + "acl-#{Fog::Mock.random_hex(8)}" + end + def self.network_acl_association_id + "aclassoc-#{Fog::Mock.random_hex(8)}" + end + def self.network_interface_id + "eni-#{Fog::Mock.random_hex(8)}" + end + def self.internet_gateway_id + "igw-#{Fog::Mock.random_hex(8)}" + end + def self.dhcp_options_id + "dopt-#{Fog::Mock.random_hex(8)}" + end + def self.vpc_id + "vpc-#{Fog::Mock.random_hex(8)}" + end + def self.subnet_id + "subnet-#{Fog::Mock.random_hex(8)}" + end + def self.zone_id + "zone-#{Fog::Mock.random_hex(8)}" + end + def self.change_id + Fog::Mock.random_letters_and_numbers(14) + end + def self.nameservers + [ + 'ns-2048.awsdns-64.com', + 'ns-2049.awsdns-65.net', + 'ns-2050.awsdns-66.org', + 'ns-2051.awsdns-67.co.uk' + ] + end + + def self.key_id(length=21) + #Probably close enough + Fog::Mock.random_selection('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',length) + end + + def self.rds_address(db_name,region) + "#{db_name}.#{Fog::Mock.random_letters(rand(12) + 4)}.#{region}.rds.amazonaws.com" + end + end + + def self.parse_security_group_options(group_name, options) + options ||= Hash.new + if group_name.is_a?(Hash) + options = group_name + elsif group_name + if options.key?('GroupName') + raise Fog::Compute::AWS::Error, 'Arguments specified both group_name and GroupName in options' + end + options = options.clone + options['GroupName'] = group_name + end + name_specified = options.key?('GroupName') && !options['GroupName'].nil? + group_id_specified = options.key?('GroupId') && !options['GroupId'].nil? + unless name_specified || group_id_specified + raise Fog::Compute::AWS::Error, 'Neither GroupName nor GroupId specified' + end + if name_specified && group_id_specified + options.delete('GroupName') + end + options + end + + module Errors + def self.match_error(error) + matcher = lambda {|s| s.match(/(?:.*(.*)<\/Code>)(?:.*(.*)<\/Message>)/m)} + [error.message, error.response.body].each(&Proc.new {|s| + match = matcher.call(s) + return {:code => match[1].split('.').last, :message => match[2]} if match + }) + {} # we did not match the message or response body + end + end end -end - -require File.expand_path('../aws/core', __FILE__) - -require File.expand_path('../aws/auto_scaling', __FILE__) -require File.expand_path('../aws/beanstalk', __FILE__) -require File.expand_path('../aws/cdn', __FILE__) -require File.expand_path('../aws/cloud_formation', __FILE__) -require File.expand_path('../aws/cloud_watch', __FILE__) -require File.expand_path('../aws/compute', __FILE__) -require File.expand_path('../aws/data_pipeline', __FILE__) -require File.expand_path('../aws/dns', __FILE__) -require File.expand_path('../aws/dynamodb', __FILE__) -require File.expand_path('../aws/elasticache', __FILE__) -require File.expand_path('../aws/elb', __FILE__) -require File.expand_path('../aws/emr', __FILE__) -require File.expand_path('../aws/federation', __FILE__) -require File.expand_path('../aws/glacier', __FILE__) -require File.expand_path('../aws/iam', __FILE__) -require File.expand_path('../aws/rds', __FILE__) -require File.expand_path('../aws/redshift', __FILE__) -require File.expand_path('../aws/ses', __FILE__) -require File.expand_path('../aws/simpledb', __FILE__) -require File.expand_path('../aws/sns', __FILE__) -require File.expand_path('../aws/sqs', __FILE__) -require File.expand_path('../aws/storage', __FILE__) -require File.expand_path('../aws/sts', __FILE__) +end \ No newline at end of file diff --git a/lib/fog/aws/auto_scaling.rb b/lib/fog/aws/auto_scaling.rb index 75cda16469..f7d7c8d54e 100644 --- a/lib/fog/aws/auto_scaling.rb +++ b/lib/fog/aws/auto_scaling.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class AutoScaling < Fog::Service diff --git a/lib/fog/aws/beanstalk.rb b/lib/fog/aws/beanstalk.rb index 144677a2e9..32bd62cd10 100644 --- a/lib/fog/aws/beanstalk.rb +++ b/lib/fog/aws/beanstalk.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class ElasticBeanstalk < Fog::Service diff --git a/lib/fog/aws/cdn.rb b/lib/fog/aws/cdn.rb index 68106a004c..d1ee356088 100644 --- a/lib/fog/aws/cdn.rb +++ b/lib/fog/aws/cdn.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module CDN class AWS < Fog::Service diff --git a/lib/fog/aws/cloud_formation.rb b/lib/fog/aws/cloud_formation.rb index 55b54c2990..a5d11af8c2 100644 --- a/lib/fog/aws/cloud_formation.rb +++ b/lib/fog/aws/cloud_formation.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class CloudFormation < Fog::Service diff --git a/lib/fog/aws/cloud_watch.rb b/lib/fog/aws/cloud_watch.rb index 8000ca1292..423aa494bd 100644 --- a/lib/fog/aws/cloud_watch.rb +++ b/lib/fog/aws/cloud_watch.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class CloudWatch < Fog::Service diff --git a/lib/fog/aws/compute.rb b/lib/fog/aws/compute.rb index c859e1e0d1..151af41998 100644 --- a/lib/fog/aws/compute.rb +++ b/lib/fog/aws/compute.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module Compute class AWS < Fog::Service diff --git a/lib/fog/aws/core.rb b/lib/fog/aws/core.rb deleted file mode 100644 index bb7e3aacae..0000000000 --- a/lib/fog/aws/core.rb +++ /dev/null @@ -1,344 +0,0 @@ -require 'fog/core' -require 'fog/xml' -require 'fog/json' -require 'fog/aws/credential_fetcher' -require 'fog/aws/region_methods' -require 'fog/aws/signaturev4' - -module Fog - module AWS - extend Fog::Provider - - service(:auto_scaling, 'AutoScaling') - service(:beanstalk, 'ElasticBeanstalk') - service(:cdn, 'CDN') - service(:compute, 'Compute') - service(:cloud_formation, 'CloudFormation') - service(:cloud_watch, 'CloudWatch') - service(:data_pipeline, 'DataPipeline') - service(:dynamodb, 'DynamoDB') - service(:dns, 'DNS') - service(:elasticache, 'Elasticache') - service(:elb, 'ELB') - service(:emr, 'EMR') - service(:federation, 'Federation') - service(:glacier, 'Glacier') - service(:iam, 'IAM') - service(:rds, 'RDS') - service(:redshift, 'Redshift') - service(:ses, 'SES') - service(:simpledb, 'SimpleDB') - service(:sns, 'SNS') - service(:sqs, 'SQS') - service(:sts, 'STS') - service(:storage, 'Storage') - - def self.indexed_param(key, values) - params = {} - unless key.include?('%d') - key << '.%d' - end - [*values].each_with_index do |value, index| - if value.respond_to?('keys') - k = format(key, index + 1) - value.each do | vkey, vvalue | - params["#{k}.#{vkey}"] = vvalue - end - else - params[format(key, index + 1)] = value - end - end - params - end - - def self.serialize_keys(key, value, options = {}) - case value - when Hash - value.each do | k, v | - options.merge!(serialize_keys("#{key}.#{k}", v)) - end - return options - when Array - value.each_with_index do | it, idx | - options.merge!(serialize_keys("#{key}.member.#{(idx + 1)}", it)) - end - return options - else - return {key => value} - end - end - - def self.indexed_request_param(name, values) - idx = -1 - Array(values).reduce({}) do |params, value| - params["#{name}.#{idx += 1}"] = value - params - end - end - - def self.indexed_filters(filters) - params = {} - filters.keys.each_with_index do |key, key_index| - key_index += 1 - params[format('Filter.%d.Name', key_index)] = key - [*filters[key]].each_with_index do |value, value_index| - value_index += 1 - params[format('Filter.%d.Value.%d', key_index, value_index)] = value - end - end - params - end - - def self.escape(string) - string.gsub(/([^a-zA-Z0-9_.\-~]+)/) { - "%" + $1.unpack("H2" * $1.bytesize).join("%").upcase - } - end - - def self.signed_params_v4(params, headers, options={}) - date = Fog::Time.now - - params = params.merge('Version' => options[:version]) - - headers = headers.merge('Host' => options[:host], 'x-amz-date' => date.to_iso8601_basic) - headers['x-amz-security-token'] = options[:aws_session_token] if options[:aws_session_token] - - body = '' - for key in params.keys.sort - unless (value = params[key]).nil? - body << "#{key}=#{escape(value.to_s)}&" - end - end - body.chop! - - headers['Authorization'] = options[:signer].sign({:method => options[:method], :headers => headers, :body => body, :query => {}, :path => options[:path]}, date) - - return body, headers - end - - def self.signed_params(params, options = {}) - params.merge!({ - 'AWSAccessKeyId' => options[:aws_access_key_id], - 'SignatureMethod' => 'HmacSHA256', - 'SignatureVersion' => '2', - 'Timestamp' => Time.now.utc.strftime("%Y-%m-%dT%H:%M:%SZ"), - 'Version' => options[:version] - }) - - params.merge!({ - 'SecurityToken' => options[:aws_session_token] - }) if options[:aws_session_token] - - body = '' - for key in params.keys.sort - unless (value = params[key]).nil? - body << "#{key}=#{escape(value.to_s)}&" - end - end - string_to_sign = "POST\n#{options[:host]}:#{options[:port]}\n#{options[:path]}\n" << body.chop - signed_string = options[:hmac].sign(string_to_sign) - body << "Signature=#{escape(Base64.encode64(signed_string).chomp!)}" - - body - end - - class Mock - def self.arn(vendor, account_id, path, region = nil) - "arn:aws:#{vendor}:#{region}:#{account_id}:#{path}" - end - - def self.availability_zone(region) - "#{region}#{Fog::Mock.random_selection('abcd', 1)}" - end - - def self.box_usage - sprintf("%0.10f", rand / 100).to_f - end - - def self.console_output - # "[ 0.000000] Linux version 2.6.18-xenU-ec2-v1.2 (root@domU-12-31-39-07-51-82) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)) #2 SMP Wed Aug 19 09:04:38 EDT 2009" - Base64.decode64("WyAwLjAwMDAwMF0gTGludXggdmVyc2lvbiAyLjYuMTgteGVuVS1lYzItdjEu\nMiAocm9vdEBkb21VLTEyLTMxLTM5LTA3LTUxLTgyKSAoZ2NjIHZlcnNpb24g\nNC4xLjIgMjAwNzA2MjYgKFJlZCBIYXQgNC4xLjItMTMpKSAjMiBTTVAgV2Vk\nIEF1ZyAxOSAwOTowNDozOCBFRFQgMjAwOQ==\n") - end - - def self.dns_name_for(ip_address) - "ec2-#{ip_address.gsub('.','-')}.compute-1.amazonaws.com" - end - - def self.private_dns_name_for(ip_address) - "ip-#{ip_address.gsub('.','-')}.ec2.internal" - end - - def self.image - path = [] - (rand(3) + 2).times do - path << Fog::Mock.random_letters(rand(9) + 8) - end - { - "imageOwnerId" => Fog::Mock.random_letters(rand(5) + 4), - "blockDeviceMapping" => [], - "productCodes" => [], - "kernelId" => kernel_id, - "ramdiskId" => ramdisk_id, - "imageState" => "available", - "imageId" => image_id, - "architecture" => "i386", - "isPublic" => true, - "imageLocation" => path.join('/'), - "imageType" => "machine", - "rootDeviceType" => ["ebs","instance-store"][rand(2)], - "rootDeviceName" => "/dev/sda1" - } - end - - def self.image_id - "ami-#{Fog::Mock.random_hex(8)}" - end - - def self.key_fingerprint - fingerprint = [] - 20.times do - fingerprint << Fog::Mock.random_hex(2) - end - fingerprint.join(':') - end - - def self.instance_id - "i-#{Fog::Mock.random_hex(8)}" - end - - def self.ip_address - Fog::Mock.random_ip - end - - def self.private_ip_address - ip_address.gsub(/^\d{1,3}\./,"10.") - end - - def self.kernel_id - "aki-#{Fog::Mock.random_hex(8)}" - end - - def self.key_material - OpenSSL::PKey::RSA.generate(1024).to_s - end - - def self.owner_id - Fog::Mock.random_numbers(12) - end - - def self.ramdisk_id - "ari-#{Fog::Mock.random_hex(8)}" - end - - def self.request_id - request_id = [] - request_id << Fog::Mock.random_hex(8) - 3.times do - request_id << Fog::Mock.random_hex(4) - end - request_id << Fog::Mock.random_hex(12) - request_id.join('-') - end - class << self - alias_method :reserved_instances_id, :request_id - alias_method :reserved_instances_offering_id, :request_id - alias_method :sqs_message_id, :request_id - alias_method :sqs_sender_id, :request_id - end - - def self.reservation_id - "r-#{Fog::Mock.random_hex(8)}" - end - - def self.snapshot_id - "snap-#{Fog::Mock.random_hex(8)}" - end - - def self.volume_id - "vol-#{Fog::Mock.random_hex(8)}" - end - - def self.security_group_id - "sg-#{Fog::Mock.random_hex(8)}" - end - - def self.network_acl_id - "acl-#{Fog::Mock.random_hex(8)}" - end - def self.network_acl_association_id - "aclassoc-#{Fog::Mock.random_hex(8)}" - end - def self.network_interface_id - "eni-#{Fog::Mock.random_hex(8)}" - end - def self.internet_gateway_id - "igw-#{Fog::Mock.random_hex(8)}" - end - def self.dhcp_options_id - "dopt-#{Fog::Mock.random_hex(8)}" - end - def self.vpc_id - "vpc-#{Fog::Mock.random_hex(8)}" - end - def self.subnet_id - "subnet-#{Fog::Mock.random_hex(8)}" - end - def self.zone_id - "zone-#{Fog::Mock.random_hex(8)}" - end - def self.change_id - Fog::Mock.random_letters_and_numbers(14) - end - def self.nameservers - [ - 'ns-2048.awsdns-64.com', - 'ns-2049.awsdns-65.net', - 'ns-2050.awsdns-66.org', - 'ns-2051.awsdns-67.co.uk' - ] - end - - def self.key_id(length=21) - #Probably close enough - Fog::Mock.random_selection('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',length) - end - - def self.rds_address(db_name,region) - "#{db_name}.#{Fog::Mock.random_letters(rand(12) + 4)}.#{region}.rds.amazonaws.com" - end - end - - def self.parse_security_group_options(group_name, options) - options ||= Hash.new - if group_name.is_a?(Hash) - options = group_name - elsif group_name - if options.key?('GroupName') - raise Fog::Compute::AWS::Error, 'Arguments specified both group_name and GroupName in options' - end - options = options.clone - options['GroupName'] = group_name - end - name_specified = options.key?('GroupName') && !options['GroupName'].nil? - group_id_specified = options.key?('GroupId') && !options['GroupId'].nil? - unless name_specified || group_id_specified - raise Fog::Compute::AWS::Error, 'Neither GroupName nor GroupId specified' - end - if name_specified && group_id_specified - options.delete('GroupName') - end - options - end - - module Errors - def self.match_error(error) - matcher = lambda {|s| s.match(/(?:.*(.*)<\/Code>)(?:.*(.*)<\/Message>)/m)} - [error.message, error.response.body].each(&Proc.new {|s| - match = matcher.call(s) - return {:code => match[1].split('.').last, :message => match[2]} if match - }) - {} # we did not match the message or response body - end - end - end -end diff --git a/lib/fog/aws/credential_fetcher.rb b/lib/fog/aws/credential_fetcher.rb index fe23625cf9..3e5ffc290c 100644 --- a/lib/fog/aws/credential_fetcher.rb +++ b/lib/fog/aws/credential_fetcher.rb @@ -1,5 +1,3 @@ -require "fog/json" - module Fog module AWS module CredentialFetcher diff --git a/lib/fog/aws/data_pipeline.rb b/lib/fog/aws/data_pipeline.rb index d898167b37..5490730f37 100644 --- a/lib/fog/aws/data_pipeline.rb +++ b/lib/fog/aws/data_pipeline.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class DataPipeline < Fog::Service diff --git a/lib/fog/aws/dns.rb b/lib/fog/aws/dns.rb index 8d54915723..a240bebab4 100644 --- a/lib/fog/aws/dns.rb +++ b/lib/fog/aws/dns.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module DNS class AWS < Fog::Service diff --git a/lib/fog/aws/dynamodb.rb b/lib/fog/aws/dynamodb.rb index eb9ffd1883..09c3588344 100644 --- a/lib/fog/aws/dynamodb.rb +++ b/lib/fog/aws/dynamodb.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class DynamoDB < Fog::Service diff --git a/lib/fog/aws/elasticache.rb b/lib/fog/aws/elasticache.rb index c5f7cd0850..abdd9e39e0 100644 --- a/lib/fog/aws/elasticache.rb +++ b/lib/fog/aws/elasticache.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class Elasticache < Fog::Service diff --git a/lib/fog/aws/elb.rb b/lib/fog/aws/elb.rb index c46e4b07e6..5ea5320fd8 100644 --- a/lib/fog/aws/elb.rb +++ b/lib/fog/aws/elb.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class ELB < Fog::Service diff --git a/lib/fog/aws/emr.rb b/lib/fog/aws/emr.rb index f7916b61d0..7227d1fcae 100644 --- a/lib/fog/aws/emr.rb +++ b/lib/fog/aws/emr.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class EMR < Fog::Service diff --git a/lib/fog/aws/federation.rb b/lib/fog/aws/federation.rb index c720c87832..1c42fb22a1 100644 --- a/lib/fog/aws/federation.rb +++ b/lib/fog/aws/federation.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class Federation < Fog::Service diff --git a/lib/fog/aws/glacier.rb b/lib/fog/aws/glacier.rb index c1ecb91dfc..6a4a290b8c 100644 --- a/lib/fog/aws/glacier.rb +++ b/lib/fog/aws/glacier.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class Glacier < Fog::Service diff --git a/lib/fog/aws/iam.rb b/lib/fog/aws/iam.rb index 788ee40b7a..4c6bc0176a 100644 --- a/lib/fog/aws/iam.rb +++ b/lib/fog/aws/iam.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class IAM < Fog::Service diff --git a/lib/fog/aws/models/auto_scaling/activity.rb b/lib/fog/aws/models/auto_scaling/activity.rb index 032f4e6fbf..bb31c62e9a 100644 --- a/lib/fog/aws/models/auto_scaling/activity.rb +++ b/lib/fog/aws/models/auto_scaling/activity.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class AutoScaling diff --git a/lib/fog/aws/models/auto_scaling/configuration.rb b/lib/fog/aws/models/auto_scaling/configuration.rb index bd0548667b..8ca8da523c 100644 --- a/lib/fog/aws/models/auto_scaling/configuration.rb +++ b/lib/fog/aws/models/auto_scaling/configuration.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class AutoScaling diff --git a/lib/fog/aws/models/auto_scaling/group.rb b/lib/fog/aws/models/auto_scaling/group.rb index f19315cae2..4054ad60c9 100644 --- a/lib/fog/aws/models/auto_scaling/group.rb +++ b/lib/fog/aws/models/auto_scaling/group.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class AutoScaling diff --git a/lib/fog/aws/models/auto_scaling/instance.rb b/lib/fog/aws/models/auto_scaling/instance.rb index 8e05ac8ebd..25d055e86a 100644 --- a/lib/fog/aws/models/auto_scaling/instance.rb +++ b/lib/fog/aws/models/auto_scaling/instance.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class AutoScaling diff --git a/lib/fog/aws/models/auto_scaling/policy.rb b/lib/fog/aws/models/auto_scaling/policy.rb index 780eb71de0..e620aa5ae2 100644 --- a/lib/fog/aws/models/auto_scaling/policy.rb +++ b/lib/fog/aws/models/auto_scaling/policy.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class AutoScaling diff --git a/lib/fog/aws/models/beanstalk/application.rb b/lib/fog/aws/models/beanstalk/application.rb index a59db50a65..0d2778d267 100644 --- a/lib/fog/aws/models/beanstalk/application.rb +++ b/lib/fog/aws/models/beanstalk/application.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class ElasticBeanstalk diff --git a/lib/fog/aws/models/beanstalk/applications.rb b/lib/fog/aws/models/beanstalk/applications.rb index f37fe6a71d..a4f0f95cc9 100644 --- a/lib/fog/aws/models/beanstalk/applications.rb +++ b/lib/fog/aws/models/beanstalk/applications.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/beanstalk/application' module Fog diff --git a/lib/fog/aws/models/beanstalk/environment.rb b/lib/fog/aws/models/beanstalk/environment.rb index 7865799162..fb1bd3768f 100644 --- a/lib/fog/aws/models/beanstalk/environment.rb +++ b/lib/fog/aws/models/beanstalk/environment.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class ElasticBeanstalk diff --git a/lib/fog/aws/models/beanstalk/environments.rb b/lib/fog/aws/models/beanstalk/environments.rb index 9f3a3dcd2c..fdefaf7851 100644 --- a/lib/fog/aws/models/beanstalk/environments.rb +++ b/lib/fog/aws/models/beanstalk/environments.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/beanstalk/environment' module Fog diff --git a/lib/fog/aws/models/beanstalk/event.rb b/lib/fog/aws/models/beanstalk/event.rb index 9952d297bd..aaa85dca91 100644 --- a/lib/fog/aws/models/beanstalk/event.rb +++ b/lib/fog/aws/models/beanstalk/event.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class ElasticBeanstalk diff --git a/lib/fog/aws/models/beanstalk/events.rb b/lib/fog/aws/models/beanstalk/events.rb index 0eb77eeef7..0079c92930 100644 --- a/lib/fog/aws/models/beanstalk/events.rb +++ b/lib/fog/aws/models/beanstalk/events.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/beanstalk/event' module Fog diff --git a/lib/fog/aws/models/beanstalk/template.rb b/lib/fog/aws/models/beanstalk/template.rb index eee306b762..3813346082 100644 --- a/lib/fog/aws/models/beanstalk/template.rb +++ b/lib/fog/aws/models/beanstalk/template.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class ElasticBeanstalk diff --git a/lib/fog/aws/models/beanstalk/templates.rb b/lib/fog/aws/models/beanstalk/templates.rb index b94e176b6a..6d632d9104 100644 --- a/lib/fog/aws/models/beanstalk/templates.rb +++ b/lib/fog/aws/models/beanstalk/templates.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/beanstalk/template' module Fog diff --git a/lib/fog/aws/models/beanstalk/version.rb b/lib/fog/aws/models/beanstalk/version.rb index 98c5708a86..b2b712ae1b 100644 --- a/lib/fog/aws/models/beanstalk/version.rb +++ b/lib/fog/aws/models/beanstalk/version.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class ElasticBeanstalk diff --git a/lib/fog/aws/models/beanstalk/versions.rb b/lib/fog/aws/models/beanstalk/versions.rb index be56a05376..eb3ecfd70d 100644 --- a/lib/fog/aws/models/beanstalk/versions.rb +++ b/lib/fog/aws/models/beanstalk/versions.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/beanstalk/version' module Fog diff --git a/lib/fog/aws/models/cdn/distribution.rb b/lib/fog/aws/models/cdn/distribution.rb index 1c99bfd3df..d7e568c5dd 100644 --- a/lib/fog/aws/models/cdn/distribution.rb +++ b/lib/fog/aws/models/cdn/distribution.rb @@ -1,4 +1,3 @@ -require 'fog/core/model' require 'fog/aws/models/cdn/invalidations' require 'fog/aws/models/cdn/distribution_helper' diff --git a/lib/fog/aws/models/cdn/distribution_helper.rb b/lib/fog/aws/models/cdn/distribution_helper.rb index 5217da2a51..b815df0990 100644 --- a/lib/fog/aws/models/cdn/distribution_helper.rb +++ b/lib/fog/aws/models/cdn/distribution_helper.rb @@ -1,5 +1,3 @@ -require 'fog/core/collection' - module Fog module CDN class AWS diff --git a/lib/fog/aws/models/cdn/distributions.rb b/lib/fog/aws/models/cdn/distributions.rb index 458a3b6ea7..8346bc7e75 100644 --- a/lib/fog/aws/models/cdn/distributions.rb +++ b/lib/fog/aws/models/cdn/distributions.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/cdn/distribution' require 'fog/aws/models/cdn/distributions_helper' diff --git a/lib/fog/aws/models/cdn/distributions_helper.rb b/lib/fog/aws/models/cdn/distributions_helper.rb index 7895df0f91..4e497729c2 100644 --- a/lib/fog/aws/models/cdn/distributions_helper.rb +++ b/lib/fog/aws/models/cdn/distributions_helper.rb @@ -1,5 +1,3 @@ -require 'fog/core/collection' - module Fog module CDN class AWS diff --git a/lib/fog/aws/models/cdn/invalidation.rb b/lib/fog/aws/models/cdn/invalidation.rb index 1b1d4d5aba..7727744937 100644 --- a/lib/fog/aws/models/cdn/invalidation.rb +++ b/lib/fog/aws/models/cdn/invalidation.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module CDN class AWS diff --git a/lib/fog/aws/models/cdn/invalidations.rb b/lib/fog/aws/models/cdn/invalidations.rb index 2d9be24c7c..2cc608d920 100644 --- a/lib/fog/aws/models/cdn/invalidations.rb +++ b/lib/fog/aws/models/cdn/invalidations.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/cdn/invalidation' module Fog diff --git a/lib/fog/aws/models/cdn/streaming_distribution.rb b/lib/fog/aws/models/cdn/streaming_distribution.rb index 15f4e0f7b7..fed23271a1 100644 --- a/lib/fog/aws/models/cdn/streaming_distribution.rb +++ b/lib/fog/aws/models/cdn/streaming_distribution.rb @@ -1,4 +1,3 @@ -require 'fog/core/model' require 'fog/aws/models/cdn/invalidations' require 'fog/aws/models/cdn/distribution_helper' diff --git a/lib/fog/aws/models/cdn/streaming_distributions.rb b/lib/fog/aws/models/cdn/streaming_distributions.rb index 1c2e27036c..7e367f09a9 100644 --- a/lib/fog/aws/models/cdn/streaming_distributions.rb +++ b/lib/fog/aws/models/cdn/streaming_distributions.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/cdn/streaming_distribution' require 'fog/aws/models/cdn/distributions_helper' diff --git a/lib/fog/aws/models/cloud_watch/alarm.rb b/lib/fog/aws/models/cloud_watch/alarm.rb index 60ce9bf4de..0f3192e697 100644 --- a/lib/fog/aws/models/cloud_watch/alarm.rb +++ b/lib/fog/aws/models/cloud_watch/alarm.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class CloudWatch diff --git a/lib/fog/aws/models/cloud_watch/alarm_data.rb b/lib/fog/aws/models/cloud_watch/alarm_data.rb index 772e6b36b6..cc0ad8672b 100644 --- a/lib/fog/aws/models/cloud_watch/alarm_data.rb +++ b/lib/fog/aws/models/cloud_watch/alarm_data.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/cloud_watch/alarm_datum' module Fog diff --git a/lib/fog/aws/models/cloud_watch/alarm_datum.rb b/lib/fog/aws/models/cloud_watch/alarm_datum.rb index ae20e81dc1..88f2ef570e 100644 --- a/lib/fog/aws/models/cloud_watch/alarm_datum.rb +++ b/lib/fog/aws/models/cloud_watch/alarm_datum.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class CloudWatch diff --git a/lib/fog/aws/models/cloud_watch/alarm_histories.rb b/lib/fog/aws/models/cloud_watch/alarm_histories.rb index 7a00d016a5..0983b38db7 100644 --- a/lib/fog/aws/models/cloud_watch/alarm_histories.rb +++ b/lib/fog/aws/models/cloud_watch/alarm_histories.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/cloud_watch/alarm_history' module Fog diff --git a/lib/fog/aws/models/cloud_watch/alarm_history.rb b/lib/fog/aws/models/cloud_watch/alarm_history.rb index 4c16db39c1..a9f45cd90f 100644 --- a/lib/fog/aws/models/cloud_watch/alarm_history.rb +++ b/lib/fog/aws/models/cloud_watch/alarm_history.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class CloudWatch diff --git a/lib/fog/aws/models/cloud_watch/alarms.rb b/lib/fog/aws/models/cloud_watch/alarms.rb index 47bb1629f3..70ade0674b 100644 --- a/lib/fog/aws/models/cloud_watch/alarms.rb +++ b/lib/fog/aws/models/cloud_watch/alarms.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/cloud_watch/alarm' module Fog diff --git a/lib/fog/aws/models/cloud_watch/metric.rb b/lib/fog/aws/models/cloud_watch/metric.rb index f923e674db..df064b08d5 100644 --- a/lib/fog/aws/models/cloud_watch/metric.rb +++ b/lib/fog/aws/models/cloud_watch/metric.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class CloudWatch diff --git a/lib/fog/aws/models/cloud_watch/metric_statistic.rb b/lib/fog/aws/models/cloud_watch/metric_statistic.rb index eddd6d7ca5..95d046246a 100644 --- a/lib/fog/aws/models/cloud_watch/metric_statistic.rb +++ b/lib/fog/aws/models/cloud_watch/metric_statistic.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class CloudWatch diff --git a/lib/fog/aws/models/cloud_watch/metric_statistics.rb b/lib/fog/aws/models/cloud_watch/metric_statistics.rb index 76fe47776b..51104cd1d0 100644 --- a/lib/fog/aws/models/cloud_watch/metric_statistics.rb +++ b/lib/fog/aws/models/cloud_watch/metric_statistics.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/cloud_watch/metric_statistic' module Fog diff --git a/lib/fog/aws/models/cloud_watch/metrics.rb b/lib/fog/aws/models/cloud_watch/metrics.rb index 0c0e6275a5..1daeb8e2a7 100644 --- a/lib/fog/aws/models/cloud_watch/metrics.rb +++ b/lib/fog/aws/models/cloud_watch/metrics.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/cloud_watch/metric' module Fog diff --git a/lib/fog/aws/models/compute/address.rb b/lib/fog/aws/models/compute/address.rb index c35b872450..af8381418a 100644 --- a/lib/fog/aws/models/compute/address.rb +++ b/lib/fog/aws/models/compute/address.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/addresses.rb b/lib/fog/aws/models/compute/addresses.rb index 7447cbd80a..6e50c86919 100644 --- a/lib/fog/aws/models/compute/addresses.rb +++ b/lib/fog/aws/models/compute/addresses.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/address' module Fog diff --git a/lib/fog/aws/models/compute/dhcp_option.rb b/lib/fog/aws/models/compute/dhcp_option.rb index fb5e39b76f..35cb814800 100644 --- a/lib/fog/aws/models/compute/dhcp_option.rb +++ b/lib/fog/aws/models/compute/dhcp_option.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/dhcp_options.rb b/lib/fog/aws/models/compute/dhcp_options.rb index 9690f1c51f..f41ba89648 100644 --- a/lib/fog/aws/models/compute/dhcp_options.rb +++ b/lib/fog/aws/models/compute/dhcp_options.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/dhcp_option' module Fog diff --git a/lib/fog/aws/models/compute/flavor.rb b/lib/fog/aws/models/compute/flavor.rb index e305e18fee..4754efb7ba 100644 --- a/lib/fog/aws/models/compute/flavor.rb +++ b/lib/fog/aws/models/compute/flavor.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/flavors.rb b/lib/fog/aws/models/compute/flavors.rb index bbc10da66f..aa8414220b 100644 --- a/lib/fog/aws/models/compute/flavors.rb +++ b/lib/fog/aws/models/compute/flavors.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/flavor' module Fog diff --git a/lib/fog/aws/models/compute/image.rb b/lib/fog/aws/models/compute/image.rb index 7255644c23..1f73db95d4 100644 --- a/lib/fog/aws/models/compute/image.rb +++ b/lib/fog/aws/models/compute/image.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/images.rb b/lib/fog/aws/models/compute/images.rb index c2453608dc..915af9f75c 100644 --- a/lib/fog/aws/models/compute/images.rb +++ b/lib/fog/aws/models/compute/images.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/image' module Fog diff --git a/lib/fog/aws/models/compute/internet_gateway.rb b/lib/fog/aws/models/compute/internet_gateway.rb index 0c923d320b..6c0ebacc2a 100644 --- a/lib/fog/aws/models/compute/internet_gateway.rb +++ b/lib/fog/aws/models/compute/internet_gateway.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/internet_gateways.rb b/lib/fog/aws/models/compute/internet_gateways.rb index 073d5cad55..551db5882d 100644 --- a/lib/fog/aws/models/compute/internet_gateways.rb +++ b/lib/fog/aws/models/compute/internet_gateways.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/internet_gateway' module Fog diff --git a/lib/fog/aws/models/compute/key_pair.rb b/lib/fog/aws/models/compute/key_pair.rb index 1ba3d6e13b..e42cc900e8 100644 --- a/lib/fog/aws/models/compute/key_pair.rb +++ b/lib/fog/aws/models/compute/key_pair.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/key_pairs.rb b/lib/fog/aws/models/compute/key_pairs.rb index 8abec12d6e..6bc3091ace 100644 --- a/lib/fog/aws/models/compute/key_pairs.rb +++ b/lib/fog/aws/models/compute/key_pairs.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/key_pair' module Fog diff --git a/lib/fog/aws/models/compute/network_acl.rb b/lib/fog/aws/models/compute/network_acl.rb index afe12f6fec..32a0206db0 100644 --- a/lib/fog/aws/models/compute/network_acl.rb +++ b/lib/fog/aws/models/compute/network_acl.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/network_acls.rb b/lib/fog/aws/models/compute/network_acls.rb index 4abbf543fa..5ad8ef6bfd 100644 --- a/lib/fog/aws/models/compute/network_acls.rb +++ b/lib/fog/aws/models/compute/network_acls.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/network_acl' module Fog diff --git a/lib/fog/aws/models/compute/network_interface.rb b/lib/fog/aws/models/compute/network_interface.rb index 098a6aaa4a..342186a3c2 100644 --- a/lib/fog/aws/models/compute/network_interface.rb +++ b/lib/fog/aws/models/compute/network_interface.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/network_interfaces.rb b/lib/fog/aws/models/compute/network_interfaces.rb index 80ead12b45..c624eed871 100644 --- a/lib/fog/aws/models/compute/network_interfaces.rb +++ b/lib/fog/aws/models/compute/network_interfaces.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/network_interface' module Fog diff --git a/lib/fog/aws/models/compute/route_table.rb b/lib/fog/aws/models/compute/route_table.rb index 0d48e14a01..cd1f705a0c 100755 --- a/lib/fog/aws/models/compute/route_table.rb +++ b/lib/fog/aws/models/compute/route_table.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/route_tables.rb b/lib/fog/aws/models/compute/route_tables.rb index 7e3d2c005c..e7e3c9552d 100755 --- a/lib/fog/aws/models/compute/route_tables.rb +++ b/lib/fog/aws/models/compute/route_tables.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/route_table' module Fog diff --git a/lib/fog/aws/models/compute/security_group.rb b/lib/fog/aws/models/compute/security_group.rb index 900de08682..b2af636e80 100644 --- a/lib/fog/aws/models/compute/security_group.rb +++ b/lib/fog/aws/models/compute/security_group.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/security_groups.rb b/lib/fog/aws/models/compute/security_groups.rb index 0f92c0ec9f..296dffd298 100644 --- a/lib/fog/aws/models/compute/security_groups.rb +++ b/lib/fog/aws/models/compute/security_groups.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/security_group' module Fog diff --git a/lib/fog/aws/models/compute/servers.rb b/lib/fog/aws/models/compute/servers.rb index aa71a94194..7555153c5a 100644 --- a/lib/fog/aws/models/compute/servers.rb +++ b/lib/fog/aws/models/compute/servers.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/server' module Fog diff --git a/lib/fog/aws/models/compute/snapshot.rb b/lib/fog/aws/models/compute/snapshot.rb index 7b512f1e85..7de36ba40e 100644 --- a/lib/fog/aws/models/compute/snapshot.rb +++ b/lib/fog/aws/models/compute/snapshot.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/snapshots.rb b/lib/fog/aws/models/compute/snapshots.rb index 9a131ae849..1305ce7e6b 100644 --- a/lib/fog/aws/models/compute/snapshots.rb +++ b/lib/fog/aws/models/compute/snapshots.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/snapshot' module Fog diff --git a/lib/fog/aws/models/compute/spot_requests.rb b/lib/fog/aws/models/compute/spot_requests.rb index 21fe0a16e6..5aac83553b 100644 --- a/lib/fog/aws/models/compute/spot_requests.rb +++ b/lib/fog/aws/models/compute/spot_requests.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/spot_request' module Fog diff --git a/lib/fog/aws/models/compute/subnet.rb b/lib/fog/aws/models/compute/subnet.rb index d515fab253..7dae6c3f6e 100644 --- a/lib/fog/aws/models/compute/subnet.rb +++ b/lib/fog/aws/models/compute/subnet.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/subnets.rb b/lib/fog/aws/models/compute/subnets.rb index 80f2e35f9d..10e9e2cde3 100644 --- a/lib/fog/aws/models/compute/subnets.rb +++ b/lib/fog/aws/models/compute/subnets.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/subnet' module Fog diff --git a/lib/fog/aws/models/compute/tag.rb b/lib/fog/aws/models/compute/tag.rb index e9eae788be..b0bdfaf84b 100644 --- a/lib/fog/aws/models/compute/tag.rb +++ b/lib/fog/aws/models/compute/tag.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/tags.rb b/lib/fog/aws/models/compute/tags.rb index 1f982741b1..07dbc7a169 100644 --- a/lib/fog/aws/models/compute/tags.rb +++ b/lib/fog/aws/models/compute/tags.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/tag' module Fog diff --git a/lib/fog/aws/models/compute/volume.rb b/lib/fog/aws/models/compute/volume.rb index 5b587377f9..b139ff18e6 100644 --- a/lib/fog/aws/models/compute/volume.rb +++ b/lib/fog/aws/models/compute/volume.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/volumes.rb b/lib/fog/aws/models/compute/volumes.rb index 73c990a97e..145eabdf65 100644 --- a/lib/fog/aws/models/compute/volumes.rb +++ b/lib/fog/aws/models/compute/volumes.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/volume' module Fog diff --git a/lib/fog/aws/models/compute/vpc.rb b/lib/fog/aws/models/compute/vpc.rb index ebf2350cbc..95772508fc 100644 --- a/lib/fog/aws/models/compute/vpc.rb +++ b/lib/fog/aws/models/compute/vpc.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Compute class AWS diff --git a/lib/fog/aws/models/compute/vpcs.rb b/lib/fog/aws/models/compute/vpcs.rb index 625fcf37c2..e06786e65b 100644 --- a/lib/fog/aws/models/compute/vpcs.rb +++ b/lib/fog/aws/models/compute/vpcs.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/compute/vpc' module Fog diff --git a/lib/fog/aws/models/data_pipeline/pipeline.rb b/lib/fog/aws/models/data_pipeline/pipeline.rb index 54f516db00..d20beb55da 100644 --- a/lib/fog/aws/models/data_pipeline/pipeline.rb +++ b/lib/fog/aws/models/data_pipeline/pipeline.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class DataPipeline diff --git a/lib/fog/aws/models/data_pipeline/pipelines.rb b/lib/fog/aws/models/data_pipeline/pipelines.rb index 5ef0420db4..3669ec6c13 100644 --- a/lib/fog/aws/models/data_pipeline/pipelines.rb +++ b/lib/fog/aws/models/data_pipeline/pipelines.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/data_pipeline/pipeline' module Fog diff --git a/lib/fog/aws/models/dns/record.rb b/lib/fog/aws/models/dns/record.rb index f1ee6b5344..2aee4fb161 100644 --- a/lib/fog/aws/models/dns/record.rb +++ b/lib/fog/aws/models/dns/record.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module DNS class AWS diff --git a/lib/fog/aws/models/dns/records.rb b/lib/fog/aws/models/dns/records.rb index 945f5536d3..1aa9ed887d 100644 --- a/lib/fog/aws/models/dns/records.rb +++ b/lib/fog/aws/models/dns/records.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/dns/record' module Fog diff --git a/lib/fog/aws/models/dns/zone.rb b/lib/fog/aws/models/dns/zone.rb index aee0edefdb..491ba9fc1e 100644 --- a/lib/fog/aws/models/dns/zone.rb +++ b/lib/fog/aws/models/dns/zone.rb @@ -1,4 +1,3 @@ -require 'fog/core/model' # require 'fog/aws/models/dns/records' module Fog diff --git a/lib/fog/aws/models/dns/zones.rb b/lib/fog/aws/models/dns/zones.rb index b3a8c42032..69568d13a6 100644 --- a/lib/fog/aws/models/dns/zones.rb +++ b/lib/fog/aws/models/dns/zones.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/dns/zone' module Fog diff --git a/lib/fog/aws/models/elasticache/cluster.rb b/lib/fog/aws/models/elasticache/cluster.rb index 37254e6360..0b3a4082df 100644 --- a/lib/fog/aws/models/elasticache/cluster.rb +++ b/lib/fog/aws/models/elasticache/cluster.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class Elasticache diff --git a/lib/fog/aws/models/elasticache/clusters.rb b/lib/fog/aws/models/elasticache/clusters.rb index 41f8dcd7ca..e8b536c4f0 100644 --- a/lib/fog/aws/models/elasticache/clusters.rb +++ b/lib/fog/aws/models/elasticache/clusters.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/elasticache/cluster' module Fog diff --git a/lib/fog/aws/models/elasticache/parameter_group.rb b/lib/fog/aws/models/elasticache/parameter_group.rb index 2d31c0130d..256193b81e 100644 --- a/lib/fog/aws/models/elasticache/parameter_group.rb +++ b/lib/fog/aws/models/elasticache/parameter_group.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class Elasticache diff --git a/lib/fog/aws/models/elasticache/parameter_groups.rb b/lib/fog/aws/models/elasticache/parameter_groups.rb index caa8c1f989..76249197f7 100644 --- a/lib/fog/aws/models/elasticache/parameter_groups.rb +++ b/lib/fog/aws/models/elasticache/parameter_groups.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/elasticache/parameter_group' module Fog diff --git a/lib/fog/aws/models/elasticache/security_group.rb b/lib/fog/aws/models/elasticache/security_group.rb index 45623b8b40..d67b661b52 100644 --- a/lib/fog/aws/models/elasticache/security_group.rb +++ b/lib/fog/aws/models/elasticache/security_group.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class Elasticache diff --git a/lib/fog/aws/models/elasticache/security_groups.rb b/lib/fog/aws/models/elasticache/security_groups.rb index e2d81f10b0..311dbeea6d 100644 --- a/lib/fog/aws/models/elasticache/security_groups.rb +++ b/lib/fog/aws/models/elasticache/security_groups.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/elasticache/security_group' module Fog diff --git a/lib/fog/aws/models/elasticache/subnet_group.rb b/lib/fog/aws/models/elasticache/subnet_group.rb index 589a31f40e..bb9d68c155 100644 --- a/lib/fog/aws/models/elasticache/subnet_group.rb +++ b/lib/fog/aws/models/elasticache/subnet_group.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class Elasticache diff --git a/lib/fog/aws/models/elasticache/subnet_groups.rb b/lib/fog/aws/models/elasticache/subnet_groups.rb index e457a0f078..64818aae96 100644 --- a/lib/fog/aws/models/elasticache/subnet_groups.rb +++ b/lib/fog/aws/models/elasticache/subnet_groups.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/elasticache/subnet_group' module Fog diff --git a/lib/fog/aws/models/elb/backend_server_description.rb b/lib/fog/aws/models/elb/backend_server_description.rb index f7daebf959..78a5e7def0 100644 --- a/lib/fog/aws/models/elb/backend_server_description.rb +++ b/lib/fog/aws/models/elb/backend_server_description.rb @@ -1,4 +1,3 @@ -require 'fog/core/model' module Fog module AWS class ELB diff --git a/lib/fog/aws/models/elb/listener.rb b/lib/fog/aws/models/elb/listener.rb index d999509899..6de8aa4645 100644 --- a/lib/fog/aws/models/elb/listener.rb +++ b/lib/fog/aws/models/elb/listener.rb @@ -1,4 +1,3 @@ -require 'fog/core/model' module Fog module AWS class ELB diff --git a/lib/fog/aws/models/elb/load_balancer.rb b/lib/fog/aws/models/elb/load_balancer.rb index 81885d2f27..61c36d779b 100644 --- a/lib/fog/aws/models/elb/load_balancer.rb +++ b/lib/fog/aws/models/elb/load_balancer.rb @@ -1,4 +1,3 @@ -require 'fog/core/model' module Fog module AWS class ELB diff --git a/lib/fog/aws/models/elb/policy.rb b/lib/fog/aws/models/elb/policy.rb index 5a289dc1d7..fd6251a91b 100644 --- a/lib/fog/aws/models/elb/policy.rb +++ b/lib/fog/aws/models/elb/policy.rb @@ -1,4 +1,3 @@ -require 'fog/core/model' module Fog module AWS class ELB diff --git a/lib/fog/aws/models/glacier/archive.rb b/lib/fog/aws/models/glacier/archive.rb index c8c0b7ab3d..b6ad11a093 100644 --- a/lib/fog/aws/models/glacier/archive.rb +++ b/lib/fog/aws/models/glacier/archive.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class Glacier diff --git a/lib/fog/aws/models/glacier/archives.rb b/lib/fog/aws/models/glacier/archives.rb index 59c058ee94..1592d750aa 100644 --- a/lib/fog/aws/models/glacier/archives.rb +++ b/lib/fog/aws/models/glacier/archives.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/glacier/archive' module Fog diff --git a/lib/fog/aws/models/glacier/job.rb b/lib/fog/aws/models/glacier/job.rb index 54caa5118c..d99b4416e0 100644 --- a/lib/fog/aws/models/glacier/job.rb +++ b/lib/fog/aws/models/glacier/job.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class Glacier diff --git a/lib/fog/aws/models/glacier/jobs.rb b/lib/fog/aws/models/glacier/jobs.rb index 724b8a3d31..d5e1e1a9e6 100644 --- a/lib/fog/aws/models/glacier/jobs.rb +++ b/lib/fog/aws/models/glacier/jobs.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/glacier/job' module Fog diff --git a/lib/fog/aws/models/glacier/vault.rb b/lib/fog/aws/models/glacier/vault.rb index 1209668856..35d5549c27 100644 --- a/lib/fog/aws/models/glacier/vault.rb +++ b/lib/fog/aws/models/glacier/vault.rb @@ -1,4 +1,3 @@ -require 'fog/core/model' require 'fog/aws/models/glacier/archives' require 'fog/aws/models/glacier/jobs' diff --git a/lib/fog/aws/models/glacier/vaults.rb b/lib/fog/aws/models/glacier/vaults.rb index de7629b9af..2e90adce39 100644 --- a/lib/fog/aws/models/glacier/vaults.rb +++ b/lib/fog/aws/models/glacier/vaults.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/glacier/vault' module Fog diff --git a/lib/fog/aws/models/iam/access_key.rb b/lib/fog/aws/models/iam/access_key.rb index d3928eff21..7075673dd9 100644 --- a/lib/fog/aws/models/iam/access_key.rb +++ b/lib/fog/aws/models/iam/access_key.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class IAM diff --git a/lib/fog/aws/models/iam/access_keys.rb b/lib/fog/aws/models/iam/access_keys.rb index 8031f08897..2a834b9b66 100644 --- a/lib/fog/aws/models/iam/access_keys.rb +++ b/lib/fog/aws/models/iam/access_keys.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/iam/access_key' module Fog diff --git a/lib/fog/aws/models/iam/policies.rb b/lib/fog/aws/models/iam/policies.rb index 8c80e7e063..5a1c89d04c 100644 --- a/lib/fog/aws/models/iam/policies.rb +++ b/lib/fog/aws/models/iam/policies.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/iam/policy' module Fog diff --git a/lib/fog/aws/models/iam/policy.rb b/lib/fog/aws/models/iam/policy.rb index 652b691bf4..9db7658471 100644 --- a/lib/fog/aws/models/iam/policy.rb +++ b/lib/fog/aws/models/iam/policy.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class IAM diff --git a/lib/fog/aws/models/iam/role.rb b/lib/fog/aws/models/iam/role.rb index 9efb2c1355..37387b6c6a 100644 --- a/lib/fog/aws/models/iam/role.rb +++ b/lib/fog/aws/models/iam/role.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class IAM diff --git a/lib/fog/aws/models/iam/roles.rb b/lib/fog/aws/models/iam/roles.rb index c3f5677464..2ae6ede008 100644 --- a/lib/fog/aws/models/iam/roles.rb +++ b/lib/fog/aws/models/iam/roles.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/iam/role' module Fog diff --git a/lib/fog/aws/models/iam/user.rb b/lib/fog/aws/models/iam/user.rb index 04695abdfe..470a5e33ef 100644 --- a/lib/fog/aws/models/iam/user.rb +++ b/lib/fog/aws/models/iam/user.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class IAM diff --git a/lib/fog/aws/models/iam/users.rb b/lib/fog/aws/models/iam/users.rb index cfbc625ada..93d295d742 100644 --- a/lib/fog/aws/models/iam/users.rb +++ b/lib/fog/aws/models/iam/users.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/iam/user' module Fog diff --git a/lib/fog/aws/models/rds/event_subscription.rb b/lib/fog/aws/models/rds/event_subscription.rb index b0dd87ee41..4a2f3cb45b 100644 --- a/lib/fog/aws/models/rds/event_subscription.rb +++ b/lib/fog/aws/models/rds/event_subscription.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class RDS diff --git a/lib/fog/aws/models/rds/event_subscriptions.rb b/lib/fog/aws/models/rds/event_subscriptions.rb index 130d5a5ab3..f8da353f7f 100644 --- a/lib/fog/aws/models/rds/event_subscriptions.rb +++ b/lib/fog/aws/models/rds/event_subscriptions.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/rds/event_subscription' module Fog diff --git a/lib/fog/aws/models/rds/instance_option.rb b/lib/fog/aws/models/rds/instance_option.rb index e38abde529..2ff6f3c7b7 100644 --- a/lib/fog/aws/models/rds/instance_option.rb +++ b/lib/fog/aws/models/rds/instance_option.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class RDS diff --git a/lib/fog/aws/models/rds/instance_options.rb b/lib/fog/aws/models/rds/instance_options.rb index 1e6c3d4d2e..8c00ecfc91 100644 --- a/lib/fog/aws/models/rds/instance_options.rb +++ b/lib/fog/aws/models/rds/instance_options.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/rds/instance_option' module Fog diff --git a/lib/fog/aws/models/rds/log_file.rb b/lib/fog/aws/models/rds/log_file.rb index 58a66ec54a..811fe95a9e 100644 --- a/lib/fog/aws/models/rds/log_file.rb +++ b/lib/fog/aws/models/rds/log_file.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class RDS diff --git a/lib/fog/aws/models/rds/log_files.rb b/lib/fog/aws/models/rds/log_files.rb index 9e94f0e537..f013c5ae85 100644 --- a/lib/fog/aws/models/rds/log_files.rb +++ b/lib/fog/aws/models/rds/log_files.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/rds/log_file' module Fog diff --git a/lib/fog/aws/models/rds/parameter.rb b/lib/fog/aws/models/rds/parameter.rb index 23b539fbd1..103a8309bd 100644 --- a/lib/fog/aws/models/rds/parameter.rb +++ b/lib/fog/aws/models/rds/parameter.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class RDS diff --git a/lib/fog/aws/models/rds/parameter_group.rb b/lib/fog/aws/models/rds/parameter_group.rb index cbceb938b4..290f4eef4f 100644 --- a/lib/fog/aws/models/rds/parameter_group.rb +++ b/lib/fog/aws/models/rds/parameter_group.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class RDS diff --git a/lib/fog/aws/models/rds/parameter_groups.rb b/lib/fog/aws/models/rds/parameter_groups.rb index 8e74d9d3fa..d74e15a3a8 100644 --- a/lib/fog/aws/models/rds/parameter_groups.rb +++ b/lib/fog/aws/models/rds/parameter_groups.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/rds/parameter_group' module Fog diff --git a/lib/fog/aws/models/rds/parameters.rb b/lib/fog/aws/models/rds/parameters.rb index bded209e06..ca88a9a02c 100644 --- a/lib/fog/aws/models/rds/parameters.rb +++ b/lib/fog/aws/models/rds/parameters.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/rds/parameter' module Fog diff --git a/lib/fog/aws/models/rds/security_group.rb b/lib/fog/aws/models/rds/security_group.rb index 4ab35b06e4..5960177be2 100644 --- a/lib/fog/aws/models/rds/security_group.rb +++ b/lib/fog/aws/models/rds/security_group.rb @@ -1,6 +1,3 @@ -require 'fog/core/model' -require 'fog/core/current_machine' - module Fog module AWS class RDS diff --git a/lib/fog/aws/models/rds/security_groups.rb b/lib/fog/aws/models/rds/security_groups.rb index 13e74e22cd..87e8c84839 100644 --- a/lib/fog/aws/models/rds/security_groups.rb +++ b/lib/fog/aws/models/rds/security_groups.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/rds/security_group' module Fog diff --git a/lib/fog/aws/models/rds/server.rb b/lib/fog/aws/models/rds/server.rb index 1269e3e2ef..0befed478a 100644 --- a/lib/fog/aws/models/rds/server.rb +++ b/lib/fog/aws/models/rds/server.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class RDS diff --git a/lib/fog/aws/models/rds/servers.rb b/lib/fog/aws/models/rds/servers.rb index d2925dd35b..0f6f62dba7 100644 --- a/lib/fog/aws/models/rds/servers.rb +++ b/lib/fog/aws/models/rds/servers.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/rds/server' module Fog diff --git a/lib/fog/aws/models/rds/snapshot.rb b/lib/fog/aws/models/rds/snapshot.rb index 0b809a76d7..b179a010e8 100644 --- a/lib/fog/aws/models/rds/snapshot.rb +++ b/lib/fog/aws/models/rds/snapshot.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class RDS diff --git a/lib/fog/aws/models/rds/snapshots.rb b/lib/fog/aws/models/rds/snapshots.rb index d059d06de7..edf4dd70b9 100644 --- a/lib/fog/aws/models/rds/snapshots.rb +++ b/lib/fog/aws/models/rds/snapshots.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/rds/snapshot' module Fog diff --git a/lib/fog/aws/models/rds/subnet_group.rb b/lib/fog/aws/models/rds/subnet_group.rb index 37735f386c..5b39b57686 100644 --- a/lib/fog/aws/models/rds/subnet_group.rb +++ b/lib/fog/aws/models/rds/subnet_group.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class RDS diff --git a/lib/fog/aws/models/rds/subnet_groups.rb b/lib/fog/aws/models/rds/subnet_groups.rb index b1c76e1f0f..1cd3695b01 100644 --- a/lib/fog/aws/models/rds/subnet_groups.rb +++ b/lib/fog/aws/models/rds/subnet_groups.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/rds/subnet_group' module Fog diff --git a/lib/fog/aws/models/sns/subscriptions.rb b/lib/fog/aws/models/sns/subscriptions.rb index 249ce327ef..b6ead2fbfb 100644 --- a/lib/fog/aws/models/sns/subscriptions.rb +++ b/lib/fog/aws/models/sns/subscriptions.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/sns/subscription' module Fog diff --git a/lib/fog/aws/models/sns/topic.rb b/lib/fog/aws/models/sns/topic.rb index d18d852934..7d0197de2a 100644 --- a/lib/fog/aws/models/sns/topic.rb +++ b/lib/fog/aws/models/sns/topic.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module AWS class SNS diff --git a/lib/fog/aws/models/sns/topics.rb b/lib/fog/aws/models/sns/topics.rb index 82d2f3f142..bc87fe01c4 100644 --- a/lib/fog/aws/models/sns/topics.rb +++ b/lib/fog/aws/models/sns/topics.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/sns/topic' module Fog diff --git a/lib/fog/aws/models/storage/directories.rb b/lib/fog/aws/models/storage/directories.rb index cf1c0f0aa3..83617f67dd 100644 --- a/lib/fog/aws/models/storage/directories.rb +++ b/lib/fog/aws/models/storage/directories.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/storage/directory' module Fog diff --git a/lib/fog/aws/models/storage/directory.rb b/lib/fog/aws/models/storage/directory.rb index 814902a68c..3ac4bdf2f8 100644 --- a/lib/fog/aws/models/storage/directory.rb +++ b/lib/fog/aws/models/storage/directory.rb @@ -1,4 +1,3 @@ -require 'fog/core/model' require 'fog/aws/models/storage/files' require 'fog/aws/models/storage/versions' diff --git a/lib/fog/aws/models/storage/file.rb b/lib/fog/aws/models/storage/file.rb index 2a1ff5a44b..a3e3501a25 100644 --- a/lib/fog/aws/models/storage/file.rb +++ b/lib/fog/aws/models/storage/file.rb @@ -1,4 +1,3 @@ -require 'fog/core/model' require 'fog/aws/models/storage/versions' module Fog diff --git a/lib/fog/aws/models/storage/files.rb b/lib/fog/aws/models/storage/files.rb index a7c2fc26e5..45d687ea4a 100644 --- a/lib/fog/aws/models/storage/files.rb +++ b/lib/fog/aws/models/storage/files.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/storage/file' module Fog diff --git a/lib/fog/aws/models/storage/version.rb b/lib/fog/aws/models/storage/version.rb index 9186394ff9..88a2b7b79d 100644 --- a/lib/fog/aws/models/storage/version.rb +++ b/lib/fog/aws/models/storage/version.rb @@ -1,5 +1,3 @@ -require 'fog/core/model' - module Fog module Storage class AWS diff --git a/lib/fog/aws/models/storage/versions.rb b/lib/fog/aws/models/storage/versions.rb index 2a400d8c24..01e0c2c780 100644 --- a/lib/fog/aws/models/storage/versions.rb +++ b/lib/fog/aws/models/storage/versions.rb @@ -1,4 +1,3 @@ -require 'fog/core/collection' require 'fog/aws/models/storage/version' module Fog diff --git a/lib/fog/aws/rds.rb b/lib/fog/aws/rds.rb index 1b33eed065..eaf8fb52ed 100644 --- a/lib/fog/aws/rds.rb +++ b/lib/fog/aws/rds.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class RDS < Fog::Service diff --git a/lib/fog/aws/redshift.rb b/lib/fog/aws/redshift.rb index 7914260310..73a9a8badf 100644 --- a/lib/fog/aws/redshift.rb +++ b/lib/fog/aws/redshift.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class Redshift < Fog::Service diff --git a/lib/fog/aws/ses.rb b/lib/fog/aws/ses.rb index 7fd34f27f2..7b833fde84 100644 --- a/lib/fog/aws/ses.rb +++ b/lib/fog/aws/ses.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class SES < Fog::Service diff --git a/lib/fog/aws/signaturev4.rb b/lib/fog/aws/signaturev4.rb index aa71e0220b..39a03a2295 100644 --- a/lib/fog/aws/signaturev4.rb +++ b/lib/fog/aws/signaturev4.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - # See http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html module Fog module AWS diff --git a/lib/fog/aws/simpledb.rb b/lib/fog/aws/simpledb.rb index fa13597dd9..f695812559 100644 --- a/lib/fog/aws/simpledb.rb +++ b/lib/fog/aws/simpledb.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class SimpleDB < Fog::Service diff --git a/lib/fog/aws/sns.rb b/lib/fog/aws/sns.rb index e112c92959..dee9014055 100644 --- a/lib/fog/aws/sns.rb +++ b/lib/fog/aws/sns.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class SNS < Fog::Service diff --git a/lib/fog/aws/sqs.rb b/lib/fog/aws/sqs.rb index 508f2118b2..7c02c88763 100644 --- a/lib/fog/aws/sqs.rb +++ b/lib/fog/aws/sqs.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class SQS < Fog::Service diff --git a/lib/fog/aws/storage.rb b/lib/fog/aws/storage.rb index 4fd74ea694..aebbb16e11 100644 --- a/lib/fog/aws/storage.rb +++ b/lib/fog/aws/storage.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module Storage class AWS < Fog::Service diff --git a/lib/fog/aws/sts.rb b/lib/fog/aws/sts.rb index 43e931dc18..f2f309aeed 100644 --- a/lib/fog/aws/sts.rb +++ b/lib/fog/aws/sts.rb @@ -1,5 +1,3 @@ -require 'fog/aws/core' - module Fog module AWS class STS < Fog::Service