Standardise empty lines throughout codebase
Done with `rubocop --auto-correct --only EmptyLineBetweenDefs,EmptyLines,EmptyLinesAroundBody`
This commit is contained in:
parent
2e4fb619df
commit
2e0b7e545a
|
@ -3,7 +3,6 @@ require 'rubygems'
|
||||||
require 'nokogiri'
|
require 'nokogiri'
|
||||||
|
|
||||||
class Parser < Nokogiri::XML::SAX::Document
|
class Parser < Nokogiri::XML::SAX::Document
|
||||||
|
|
||||||
attr_reader :response
|
attr_reader :response
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
|
@ -37,7 +36,6 @@ class Parser < Nokogiri::XML::SAX::Document
|
||||||
def value
|
def value
|
||||||
@value.dup
|
@value.dup
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
data = <<-DATA
|
data = <<-DATA
|
||||||
|
|
|
@ -2,10 +2,8 @@ require 'fog/core'
|
||||||
|
|
||||||
module Fog
|
module Fog
|
||||||
module Atmos
|
module Atmos
|
||||||
|
|
||||||
extend Fog::Provider
|
extend Fog::Provider
|
||||||
|
|
||||||
service(:storage, 'Storage')
|
service(:storage, 'Storage')
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/atmos/models/storage/directory'
|
||||||
module Fog
|
module Fog
|
||||||
module Storage
|
module Storage
|
||||||
class Atmos
|
class Atmos
|
||||||
|
|
||||||
class Directories < Fog::Collection
|
class Directories < Fog::Collection
|
||||||
|
|
||||||
attribute :directory
|
attribute :directory
|
||||||
|
|
||||||
model Fog::Storage::Atmos::Directory
|
model Fog::Storage::Atmos::Directory
|
||||||
|
@ -40,9 +38,7 @@ module Fog
|
||||||
attributes = {:directory => directory}.merge(attributes) if directory
|
attributes = {:directory => directory}.merge(attributes) if directory
|
||||||
super(attributes)
|
super(attributes)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Storage
|
module Storage
|
||||||
class Atmos
|
class Atmos
|
||||||
|
|
||||||
class Directory < Fog::Model
|
class Directory < Fog::Model
|
||||||
|
|
||||||
identity :key, :aliases => :Filename
|
identity :key, :aliases => :Filename
|
||||||
attribute :objectid, :aliases => :ObjectID
|
attribute :objectid, :aliases => :ObjectID
|
||||||
|
|
||||||
|
@ -44,10 +42,7 @@ module Fog
|
||||||
end
|
end
|
||||||
service.delete_namespace key
|
service.delete_namespace key
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Storage
|
module Storage
|
||||||
class Atmos
|
class Atmos
|
||||||
|
|
||||||
class File < Fog::Model
|
class File < Fog::Model
|
||||||
|
|
||||||
identity :key, :aliases => :Filename
|
identity :key, :aliases => :Filename
|
||||||
|
|
||||||
attribute :content_length, :aliases => ['bytes', 'Content-Length'], :type => :integer
|
attribute :content_length, :aliases => ['bytes', 'Content-Length'], :type => :integer
|
||||||
|
@ -104,9 +102,7 @@ module Fog
|
||||||
def directory=(new_directory)
|
def directory=(new_directory)
|
||||||
@directory = new_directory
|
@directory = new_directory
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/atmos/models/storage/file'
|
||||||
module Fog
|
module Fog
|
||||||
module Storage
|
module Storage
|
||||||
class Atmos
|
class Atmos
|
||||||
|
|
||||||
class Files < Fog::Collection
|
class Files < Fog::Collection
|
||||||
|
|
||||||
attribute :directory
|
attribute :directory
|
||||||
attribute :limit
|
attribute :limit
|
||||||
attribute :marker
|
attribute :marker
|
||||||
|
@ -70,9 +68,7 @@ module Fog
|
||||||
requires :directory
|
requires :directory
|
||||||
super({ :directory => directory }.merge!(attributes))
|
super({ :directory => directory }.merge!(attributes))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,6 @@ module Fog
|
||||||
module Storage
|
module Storage
|
||||||
class Atmos
|
class Atmos
|
||||||
class Real
|
class Real
|
||||||
|
|
||||||
def delete_namespace(namespace = '', options = {})
|
def delete_namespace(namespace = '', options = {})
|
||||||
options = options.reject {|key, value| value.nil?}
|
options = options.reject {|key, value| value.nil?}
|
||||||
request({
|
request({
|
||||||
|
@ -12,7 +11,6 @@ module Fog
|
||||||
:query => options
|
:query => options
|
||||||
}.merge(options))
|
}.merge(options))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,6 @@ module Fog
|
||||||
module Storage
|
module Storage
|
||||||
class Atmos
|
class Atmos
|
||||||
class Real
|
class Real
|
||||||
|
|
||||||
def get_namespace(namespace = '', options = {})
|
def get_namespace(namespace = '', options = {})
|
||||||
options = options.reject {|key, value| value.nil?}
|
options = options.reject {|key, value| value.nil?}
|
||||||
request({
|
request({
|
||||||
|
@ -13,7 +12,6 @@ module Fog
|
||||||
:parse => true
|
:parse => true
|
||||||
}.merge(options))
|
}.merge(options))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,6 @@ module Fog
|
||||||
module Storage
|
module Storage
|
||||||
class Atmos
|
class Atmos
|
||||||
class Real
|
class Real
|
||||||
|
|
||||||
def head_namespace(namespace = '', options = {})
|
def head_namespace(namespace = '', options = {})
|
||||||
options = options.reject {|key, value| value.nil?}
|
options = options.reject {|key, value| value.nil?}
|
||||||
request({
|
request({
|
||||||
|
@ -13,7 +12,6 @@ module Fog
|
||||||
:parse => true
|
:parse => true
|
||||||
}.merge(options))
|
}.merge(options))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,6 @@ module Fog
|
||||||
module Storage
|
module Storage
|
||||||
class Atmos
|
class Atmos
|
||||||
class Real
|
class Real
|
||||||
|
|
||||||
def post_namespace(namespace = '', options = {})
|
def post_namespace(namespace = '', options = {})
|
||||||
options = options.reject {|key, value| value.nil?}
|
options = options.reject {|key, value| value.nil?}
|
||||||
request({
|
request({
|
||||||
|
@ -13,7 +12,6 @@ module Fog
|
||||||
:parse => true
|
:parse => true
|
||||||
}.merge(options))
|
}.merge(options))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,6 @@ module Fog
|
||||||
module Storage
|
module Storage
|
||||||
class Atmos
|
class Atmos
|
||||||
class Real
|
class Real
|
||||||
|
|
||||||
def put_namespace(namespace = '', options = {})
|
def put_namespace(namespace = '', options = {})
|
||||||
options = options.reject {|key, value| value.nil?}
|
options = options.reject {|key, value| value.nil?}
|
||||||
request({
|
request({
|
||||||
|
@ -13,7 +12,6 @@ module Fog
|
||||||
:parse => true
|
:parse => true
|
||||||
}.merge(options))
|
}.merge(options))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -71,7 +71,6 @@ module Fog
|
||||||
def request(options)
|
def request(options)
|
||||||
raise "Atmos Storage mocks not implemented"
|
raise "Atmos Storage mocks not implemented"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class Real
|
class Real
|
||||||
|
@ -179,7 +178,6 @@ module Fog
|
||||||
end
|
end
|
||||||
response
|
response
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -177,7 +177,6 @@ module Fog
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
include Fog::AWS::CredentialFetcher::ConnectionMethods
|
include Fog::AWS::CredentialFetcher::ConnectionMethods
|
||||||
|
|
||||||
|
@ -274,9 +273,7 @@ module Fog
|
||||||
def setup_credentials(options)
|
def setup_credentials(options)
|
||||||
@aws_access_key_id = options[:aws_access_key_id]
|
@aws_access_key_id = options[:aws_access_key_id]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -56,11 +56,9 @@ module Fog
|
||||||
collection :versions
|
collection :versions
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def initialize(options={})
|
def initialize(options={})
|
||||||
Fog::Mock.not_implemented
|
Fog::Mock.not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class Real
|
class Real
|
||||||
|
@ -140,11 +138,8 @@ module Fog
|
||||||
Fog::AWS::ElasticBeanstalk::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
|
Fog::AWS::ElasticBeanstalk::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -30,7 +30,6 @@ module Fog
|
||||||
request 'put_streaming_distribution_config'
|
request 'put_streaming_distribution_config'
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def self.data
|
def self.data
|
||||||
@data ||= Hash.new do |hash, key|
|
@data ||= Hash.new do |hash, key|
|
||||||
hash[key] = {
|
hash[key] = {
|
||||||
|
|
|
@ -21,11 +21,9 @@ module Fog
|
||||||
request :list_stack_resources
|
request :list_stack_resources
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def initialize(options={})
|
def initialize(options={})
|
||||||
Fog::Mock.not_implemented
|
Fog::Mock.not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class Real
|
class Real
|
||||||
|
@ -116,9 +114,7 @@ module Fog
|
||||||
Fog::AWS::CloudFormation::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
|
Fog::AWS::CloudFormation::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -35,7 +35,6 @@ module Fog
|
||||||
collection :alarms
|
collection :alarms
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def self.data
|
def self.data
|
||||||
@data ||= Hash.new do |hash, region|
|
@data ||= Hash.new do |hash, region|
|
||||||
hash[region] = Hash.new do |region_hash, key|
|
hash[region] = Hash.new do |region_hash, key|
|
||||||
|
@ -159,7 +158,6 @@ module Fog
|
||||||
:parser => parser
|
:parser => parser
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -154,7 +154,6 @@ module Fog
|
||||||
|
|
||||||
# deprecation
|
# deprecation
|
||||||
class Real
|
class Real
|
||||||
|
|
||||||
def modify_image_attributes(*params)
|
def modify_image_attributes(*params)
|
||||||
Fog::Logger.deprecation("modify_image_attributes is deprecated, use modify_image_attribute instead [light_black](#{caller.first})[/]")
|
Fog::Logger.deprecation("modify_image_attributes is deprecated, use modify_image_attribute instead [light_black](#{caller.first})[/]")
|
||||||
modify_image_attribute(*params)
|
modify_image_attribute(*params)
|
||||||
|
@ -478,7 +477,6 @@ module Fog
|
||||||
Fog::Compute::AWS::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
|
Fog::Compute::AWS::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -121,7 +121,6 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def self.arn(vendor, account_id, path, region = nil)
|
def self.arn(vendor, account_id, path, region = nil)
|
||||||
"arn:aws:#{vendor}:#{region}:#{account_id}:#{path}"
|
"arn:aws:#{vendor}:#{region}:#{account_id}:#{path}"
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,7 +32,6 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
module ConnectionMethods
|
module ConnectionMethods
|
||||||
|
|
||||||
def refresh_credentials_if_expired
|
def refresh_credentials_if_expired
|
||||||
refresh_credentials if credentials_expired?
|
refresh_credentials if credentials_expired?
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,7 +24,6 @@ module Fog
|
||||||
request :get_change
|
request :get_change
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def self.data
|
def self.data
|
||||||
@data ||= Hash.new do |hash, region|
|
@data ||= Hash.new do |hash, region|
|
||||||
hash[region] = Hash.new do |region_hash, key|
|
hash[region] = Hash.new do |region_hash, key|
|
||||||
|
|
|
@ -24,7 +24,6 @@ module Fog
|
||||||
request :update_table
|
request :update_table
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def self.data
|
def self.data
|
||||||
@data ||= Hash.new do |hash, key|
|
@data ||= Hash.new do |hash, key|
|
||||||
hash[key] = {
|
hash[key] = {
|
||||||
|
@ -134,7 +133,6 @@ module Fog
|
||||||
|
|
||||||
response
|
response
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -124,9 +124,7 @@ module Fog
|
||||||
Fog::AWS::Elasticache::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
|
Fog::AWS::Elasticache::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
@ -199,8 +197,6 @@ module Fog
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -56,7 +56,6 @@ module Fog
|
||||||
collection :backend_server_descriptions
|
collection :backend_server_descriptions
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
require 'fog/aws/elb/policy_types'
|
require 'fog/aws/elb/policy_types'
|
||||||
|
|
||||||
def self.data
|
def self.data
|
||||||
|
|
|
@ -35,11 +35,9 @@ module Fog
|
||||||
# collection :security_groups
|
# collection :security_groups
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def initialize(options={})
|
def initialize(options={})
|
||||||
Fog::Mock.not_implemented
|
Fog::Mock.not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class Real
|
class Real
|
||||||
|
@ -126,7 +124,6 @@ module Fog
|
||||||
|
|
||||||
response
|
response
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -37,7 +37,6 @@ module Fog
|
||||||
MEGABYTE = 1024*1024
|
MEGABYTE = 1024*1024
|
||||||
|
|
||||||
class TreeHash
|
class TreeHash
|
||||||
|
|
||||||
def self.digest(body)
|
def self.digest(body)
|
||||||
new.add_part(body)
|
new.add_part(body)
|
||||||
end
|
end
|
||||||
|
@ -92,11 +91,9 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def initialize(options={})
|
def initialize(options={})
|
||||||
Fog::Mock.not_implemented
|
Fog::Mock.not_implemented
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class Real
|
class Real
|
||||||
|
@ -120,7 +117,6 @@ module Fog
|
||||||
# ==== Returns
|
# ==== Returns
|
||||||
# * Glacier object with connection to AWS.
|
# * Glacier object with connection to AWS.
|
||||||
def initialize(options={})
|
def initialize(options={})
|
||||||
|
|
||||||
@use_iam_profile = options[:use_iam_profile]
|
@use_iam_profile = options[:use_iam_profile]
|
||||||
@region = options[:region] || 'us-east-1'
|
@region = options[:region] || 'us-east-1'
|
||||||
|
|
||||||
|
@ -137,7 +133,6 @@ module Fog
|
||||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
def setup_credentials(options)
|
def setup_credentials(options)
|
||||||
@aws_access_key_id = options[:aws_access_key_id]
|
@aws_access_key_id = options[:aws_access_key_id]
|
||||||
|
|
|
@ -84,7 +84,6 @@ module Fog
|
||||||
model :role
|
model :role
|
||||||
collection :roles
|
collection :roles
|
||||||
|
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
def self.data
|
def self.data
|
||||||
@data ||= Hash.new do |hash, key|
|
@data ||= Hash.new do |hash, key|
|
||||||
|
@ -249,7 +248,6 @@ module Fog
|
||||||
Fog::AWS::IAM::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
|
Fog::AWS::IAM::Error.slurp(error, "#{match[:code]} => #{match[:message]}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,7 +31,6 @@ module Fog
|
||||||
data = service.describe_scaling_activities('ActivityId' => identity).body['DescribeScalingActivitiesResult']['Activities'].first
|
data = service.describe_scaling_activities('ActivityId' => identity).body['DescribeScalingActivitiesResult']['Activities'].first
|
||||||
new(data) unless data.nil?
|
new(data) unless data.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class AutoScaling
|
class AutoScaling
|
||||||
class Activity < Fog::Model
|
class Activity < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'ActivityId'
|
identity :id, :aliases => 'ActivityId'
|
||||||
attribute :auto_scaling_group_name, :aliases => 'AutoScalingGroupName'
|
attribute :auto_scaling_group_name, :aliases => 'AutoScalingGroupName'
|
||||||
attribute :cause, :aliases => 'Cause'
|
attribute :cause, :aliases => 'Cause'
|
||||||
|
@ -22,7 +21,6 @@ module Fog
|
||||||
def save
|
def save
|
||||||
raise "Operation not supported"
|
raise "Operation not supported"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class AutoScaling
|
class AutoScaling
|
||||||
class Configuration < Fog::Model
|
class Configuration < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'LaunchConfigurationName'
|
identity :id, :aliases => 'LaunchConfigurationName'
|
||||||
attribute :arn, :aliases => 'LaunchConfigurationARN'
|
attribute :arn, :aliases => 'LaunchConfigurationARN'
|
||||||
attribute :associate_public_ip, :aliases => 'AssociatePublicIpAddress'
|
attribute :associate_public_ip, :aliases => 'AssociatePublicIpAddress'
|
||||||
|
@ -62,7 +61,6 @@ module Fog
|
||||||
requires :id
|
requires :id
|
||||||
service.delete_launch_configuration(id)
|
service.delete_launch_configuration(id)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class AutoScaling
|
class AutoScaling
|
||||||
class Configurations < Fog::Collection
|
class Configurations < Fog::Collection
|
||||||
|
|
||||||
model Fog::AWS::AutoScaling::Configuration
|
model Fog::AWS::AutoScaling::Configuration
|
||||||
|
|
||||||
# Creates a new launch configuration
|
# Creates a new launch configuration
|
||||||
|
@ -28,7 +27,6 @@ module Fog
|
||||||
data = service.describe_launch_configurations('LaunchConfigurationNames' => identity).body['DescribeLaunchConfigurationsResult']['LaunchConfigurations'].first
|
data = service.describe_launch_configurations('LaunchConfigurationNames' => identity).body['DescribeLaunchConfigurationsResult']['LaunchConfigurations'].first
|
||||||
new(data) unless data.nil?
|
new(data) unless data.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,7 +31,6 @@ module Fog
|
||||||
data = service.describe_auto_scaling_groups('AutoScalingGroupNames' => identity).body['DescribeAutoScalingGroupsResult']['AutoScalingGroups'].first
|
data = service.describe_auto_scaling_groups('AutoScalingGroupNames' => identity).body['DescribeAutoScalingGroupsResult']['AutoScalingGroups'].first
|
||||||
new(data) unless data.nil?
|
new(data) unless data.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class AutoScaling
|
class AutoScaling
|
||||||
class Instance < Fog::Model
|
class Instance < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'InstanceId'
|
identity :id, :aliases => 'InstanceId'
|
||||||
attribute :auto_scaling_group_name, :aliases => 'AutoScalingGroupName'
|
attribute :auto_scaling_group_name, :aliases => 'AutoScalingGroupName'
|
||||||
attribute :availability_zone, :aliases => 'AvailabilityZone'
|
attribute :availability_zone, :aliases => 'AvailabilityZone'
|
||||||
|
@ -53,7 +52,6 @@ module Fog
|
||||||
# requires :id
|
# requires :id
|
||||||
# service.delete_auto_scaling_group(id)
|
# service.delete_auto_scaling_group(id)
|
||||||
#end
|
#end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class AutoScaling
|
class AutoScaling
|
||||||
class Instances < Fog::Collection
|
class Instances < Fog::Collection
|
||||||
|
|
||||||
model Fog::AWS::AutoScaling::Instance
|
model Fog::AWS::AutoScaling::Instance
|
||||||
|
|
||||||
def all
|
def all
|
||||||
|
@ -23,7 +22,6 @@ module Fog
|
||||||
data = service.describe_auto_scaling_instances('InstanceIds' => identity).body['DescribeAutoScalingInstancesResult']['AutoScalingInstances'].first
|
data = service.describe_auto_scaling_instances('InstanceIds' => identity).body['DescribeAutoScalingInstancesResult']['AutoScalingInstances'].first
|
||||||
new(data) unless data.nil?
|
new(data) unless data.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class ElasticBeanstalk
|
class ElasticBeanstalk
|
||||||
|
|
||||||
class Application < Fog::Model
|
class Application < Fog::Model
|
||||||
identity :name, :aliases => 'ApplicationName'
|
identity :name, :aliases => 'ApplicationName'
|
||||||
attribute :template_names, :aliases => 'ConfigurationTemplates'
|
attribute :template_names, :aliases => 'ConfigurationTemplates'
|
||||||
|
@ -54,9 +53,7 @@ module Fog
|
||||||
merge_attributes(data)
|
merge_attributes(data)
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ require 'fog/aws/models/beanstalk/application'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class ElasticBeanstalk
|
class ElasticBeanstalk
|
||||||
|
|
||||||
class Applications < Fog::Collection
|
class Applications < Fog::Collection
|
||||||
model Fog::AWS::ElasticBeanstalk::Application
|
model Fog::AWS::ElasticBeanstalk::Application
|
||||||
|
|
||||||
|
@ -18,7 +17,6 @@ module Fog
|
||||||
new(data)
|
new(data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class ElasticBeanstalk
|
class ElasticBeanstalk
|
||||||
|
|
||||||
class Environment < Fog::Model
|
class Environment < Fog::Model
|
||||||
identity :name, :aliases => 'EnvironmentName'
|
identity :name, :aliases => 'EnvironmentName'
|
||||||
attribute :id, :aliases => 'EnvironmentId'
|
attribute :id, :aliases => 'EnvironmentId'
|
||||||
|
@ -47,7 +46,6 @@ module Fog
|
||||||
|
|
||||||
# Returns the load balancer object associated with the environment.
|
# Returns the load balancer object associated with the environment.
|
||||||
def load_balancer(elb_connection = Fog::AWS[:elb])
|
def load_balancer(elb_connection = Fog::AWS[:elb])
|
||||||
|
|
||||||
if resources.nil?
|
if resources.nil?
|
||||||
elb_connection.load_balancers.get(live_resources['LoadBalancers'].first['Name'])
|
elb_connection.load_balancers.get(live_resources['LoadBalancers'].first['Name'])
|
||||||
else
|
else
|
||||||
|
@ -141,9 +139,7 @@ module Fog
|
||||||
merge_attributes(data)
|
merge_attributes(data)
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ require 'fog/aws/models/beanstalk/environment'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class ElasticBeanstalk
|
class ElasticBeanstalk
|
||||||
|
|
||||||
class Environments < Fog::Collection
|
class Environments < Fog::Collection
|
||||||
model Fog::AWS::ElasticBeanstalk::Environment
|
model Fog::AWS::ElasticBeanstalk::Environment
|
||||||
|
|
||||||
|
@ -22,7 +21,6 @@ module Fog
|
||||||
new(data)
|
new(data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class ElasticBeanstalk
|
class ElasticBeanstalk
|
||||||
|
|
||||||
class Event < Fog::Model
|
class Event < Fog::Model
|
||||||
attribute :application_name, :aliases => 'ApplicationName'
|
attribute :application_name, :aliases => 'ApplicationName'
|
||||||
attribute :environment_name, :aliases => 'EnvironmentName'
|
attribute :environment_name, :aliases => 'EnvironmentName'
|
||||||
|
@ -14,7 +13,6 @@ module Fog
|
||||||
attribute :template_name, :aliases => 'TemplateName'
|
attribute :template_name, :aliases => 'TemplateName'
|
||||||
attribute :version_label, :aliases => 'VersionLabel'
|
attribute :version_label, :aliases => 'VersionLabel'
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -4,7 +4,6 @@ require 'fog/aws/models/beanstalk/event'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class ElasticBeanstalk
|
class ElasticBeanstalk
|
||||||
|
|
||||||
class Events < Fog::Collection
|
class Events < Fog::Collection
|
||||||
model Fog::AWS::ElasticBeanstalk::Event
|
model Fog::AWS::ElasticBeanstalk::Event
|
||||||
|
|
||||||
|
@ -12,7 +11,6 @@ module Fog
|
||||||
data = service.describe_events(options).body['DescribeEventsResult']['Events']
|
data = service.describe_events(options).body['DescribeEventsResult']['Events']
|
||||||
load(data) # data is an array of attribute hashes
|
load(data) # data is an array of attribute hashes
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class ElasticBeanstalk
|
class ElasticBeanstalk
|
||||||
|
|
||||||
class Template < Fog::Model
|
class Template < Fog::Model
|
||||||
attribute :name, :aliases => 'TemplateName'
|
attribute :name, :aliases => 'TemplateName'
|
||||||
attribute :application_name, :aliases => 'ApplicationName'
|
attribute :application_name, :aliases => 'ApplicationName'
|
||||||
|
@ -72,7 +71,6 @@ module Fog
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ require 'fog/aws/models/beanstalk/template'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class ElasticBeanstalk
|
class ElasticBeanstalk
|
||||||
|
|
||||||
class Templates < Fog::Collection
|
class Templates < Fog::Collection
|
||||||
model Fog::AWS::ElasticBeanstalk::Template
|
model Fog::AWS::ElasticBeanstalk::Template
|
||||||
|
|
||||||
|
@ -63,7 +62,6 @@ module Fog
|
||||||
end
|
end
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class ElasticBeanstalk
|
class ElasticBeanstalk
|
||||||
|
|
||||||
class Version < Fog::Model
|
class Version < Fog::Model
|
||||||
attribute :label, :aliases => 'VersionLabel'
|
attribute :label, :aliases => 'VersionLabel'
|
||||||
attribute :application_name, :aliases => 'ApplicationName'
|
attribute :application_name, :aliases => 'ApplicationName'
|
||||||
|
@ -73,7 +72,6 @@ module Fog
|
||||||
merge_attributes(data)
|
merge_attributes(data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ require 'fog/aws/models/beanstalk/version'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class ElasticBeanstalk
|
class ElasticBeanstalk
|
||||||
|
|
||||||
class Versions < Fog::Collection
|
class Versions < Fog::Collection
|
||||||
model Fog::AWS::ElasticBeanstalk::Version
|
model Fog::AWS::ElasticBeanstalk::Version
|
||||||
|
|
||||||
|
@ -24,7 +23,6 @@ module Fog
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,6 @@ require 'fog/aws/models/cdn/distribution_helper'
|
||||||
module Fog
|
module Fog
|
||||||
module CDN
|
module CDN
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Distribution < Fog::Model
|
class Distribution < Fog::Model
|
||||||
include Fog::CDN::AWS::DistributionHelper
|
include Fog::CDN::AWS::DistributionHelper
|
||||||
|
|
||||||
|
@ -85,9 +84,7 @@ module Fog
|
||||||
def distribution_config_to_attributes(new_attributes = {})
|
def distribution_config_to_attributes(new_attributes = {})
|
||||||
new_attributes.merge(new_attributes.delete('DistributionConfig') || {})
|
new_attributes.merge(new_attributes.delete('DistributionConfig') || {})
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/collection'
|
||||||
module Fog
|
module Fog
|
||||||
module CDN
|
module CDN
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
module DistributionHelper
|
module DistributionHelper
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
requires :identity, :etag, :caller_reference
|
requires :identity, :etag, :caller_reference
|
||||||
raise "Distribution must be disabled to be deleted" unless disabled?
|
raise "Distribution must be disabled to be deleted" unless disabled?
|
||||||
|
@ -56,9 +54,7 @@ module Fog
|
||||||
end
|
end
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -5,7 +5,6 @@ require 'fog/aws/models/cdn/distributions_helper'
|
||||||
module Fog
|
module Fog
|
||||||
module CDN
|
module CDN
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Distributions < Fog::Collection
|
class Distributions < Fog::Collection
|
||||||
include Fog::CDN::AWS::DistributionsHelper
|
include Fog::CDN::AWS::DistributionsHelper
|
||||||
|
|
||||||
|
@ -25,9 +24,7 @@ module Fog
|
||||||
|
|
||||||
alias_method :each_distribution_this_page, :each
|
alias_method :each_distribution_this_page, :each
|
||||||
alias_method :each, :each_distribution
|
alias_method :each, :each_distribution
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/collection'
|
||||||
module Fog
|
module Fog
|
||||||
module CDN
|
module CDN
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
module DistributionsHelper
|
module DistributionsHelper
|
||||||
|
|
||||||
def all(options = {})
|
def all(options = {})
|
||||||
|
@ -40,9 +39,7 @@ module Fog
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module CDN
|
module CDN
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Invalidation < Fog::Model
|
class Invalidation < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'Id'
|
identity :id, :aliases => 'Id'
|
||||||
|
|
||||||
attribute :status, :aliases => 'Status'
|
attribute :status, :aliases => 'Status'
|
||||||
|
@ -56,9 +54,7 @@ module Fog
|
||||||
end
|
end
|
||||||
new_attributes
|
new_attributes
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/cdn/invalidation'
|
||||||
module Fog
|
module Fog
|
||||||
module CDN
|
module CDN
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Invalidations < Fog::Collection
|
class Invalidations < Fog::Collection
|
||||||
|
|
||||||
attribute :is_truncated, :aliases => ['IsTruncated']
|
attribute :is_truncated, :aliases => ['IsTruncated']
|
||||||
attribute :max_items, :aliases => ['MaxItems']
|
attribute :max_items, :aliases => ['MaxItems']
|
||||||
attribute :next_marker, :aliases => ['NextMarker']
|
attribute :next_marker, :aliases => ['NextMarker']
|
||||||
|
@ -46,9 +44,7 @@ module Fog
|
||||||
requires :distribution
|
requires :distribution
|
||||||
super({ :distribution => distribution }.merge!(attributes))
|
super({ :distribution => distribution }.merge!(attributes))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,6 @@ require 'fog/aws/models/cdn/distribution_helper'
|
||||||
module Fog
|
module Fog
|
||||||
module CDN
|
module CDN
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class StreamingDistribution < Fog::Model
|
class StreamingDistribution < Fog::Model
|
||||||
include Fog::CDN::AWS::DistributionHelper
|
include Fog::CDN::AWS::DistributionHelper
|
||||||
|
|
||||||
|
@ -69,9 +68,7 @@ module Fog
|
||||||
def distribution_config_to_attributes(new_attributes = {})
|
def distribution_config_to_attributes(new_attributes = {})
|
||||||
new_attributes.merge(new_attributes.delete('StreamingDistributionConfig') || {})
|
new_attributes.merge(new_attributes.delete('StreamingDistributionConfig') || {})
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,6 @@ require 'fog/aws/models/cdn/distributions_helper'
|
||||||
module Fog
|
module Fog
|
||||||
module CDN
|
module CDN
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class StreamingDistributions < Fog::Collection
|
class StreamingDistributions < Fog::Collection
|
||||||
include Fog::CDN::AWS::DistributionsHelper
|
include Fog::CDN::AWS::DistributionsHelper
|
||||||
|
|
||||||
|
@ -25,9 +24,7 @@ module Fog
|
||||||
|
|
||||||
alias_method :each_distribution_this_page, :each
|
alias_method :each_distribution_this_page, :each
|
||||||
alias_method :each, :each_distribution
|
alias_method :each, :each_distribution
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,7 +32,6 @@ module Fog
|
||||||
data = service.describe_alarms_for_metric(list_opts).body['DescribeAlarmsForMetricResult']['MetricAlarms']
|
data = service.describe_alarms_for_metric(list_opts).body['DescribeAlarmsForMetricResult']['MetricAlarms']
|
||||||
load(data)
|
load(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class CloudWatch
|
class CloudWatch
|
||||||
|
|
||||||
class AlarmDatum < Fog::Model
|
class AlarmDatum < Fog::Model
|
||||||
attribute :alarm_name, :aliases => 'AlarmName'
|
attribute :alarm_name, :aliases => 'AlarmName'
|
||||||
attribute :metric_name, :aliases => 'MetricName'
|
attribute :metric_name, :aliases => 'MetricName'
|
||||||
|
|
|
@ -11,7 +11,6 @@ module Fog
|
||||||
data = service.describe_alarm_history(conditions).body['DescribeAlarmHistoryResult']['AlarmHistoryItems']
|
data = service.describe_alarm_history(conditions).body['DescribeAlarmHistoryResult']['AlarmHistoryItems']
|
||||||
load(data) # data is an array of attribute hashes
|
load(data) # data is an array of attribute hashes
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class CloudWatch
|
class CloudWatch
|
||||||
|
|
||||||
class AlarmHistory < Fog::Model
|
class AlarmHistory < Fog::Model
|
||||||
attribute :alarm_name, :aliases => 'AlarmName'
|
attribute :alarm_name, :aliases => 'AlarmName'
|
||||||
attribute :end_date, :aliases => 'EndDate'
|
attribute :end_date, :aliases => 'EndDate'
|
||||||
|
|
|
@ -4,7 +4,6 @@ require 'fog/aws/models/cloud_watch/alarm'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class CloudWatch
|
class CloudWatch
|
||||||
|
|
||||||
class Alarms < Fog::Collection
|
class Alarms < Fog::Collection
|
||||||
model Fog::AWS::CloudWatch::Alarm
|
model Fog::AWS::CloudWatch::Alarm
|
||||||
|
|
||||||
|
@ -40,7 +39,6 @@ module Fog
|
||||||
service.enable_alarm_actions(alarm_names)
|
service.enable_alarm_actions(alarm_names)
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class CloudWatch
|
class CloudWatch
|
||||||
|
|
||||||
class Metric < Fog::Model
|
class Metric < Fog::Model
|
||||||
attribute :name, :aliases => 'MetricName'
|
attribute :name, :aliases => 'MetricName'
|
||||||
attribute :namespace, :aliases => 'Namespace'
|
attribute :namespace, :aliases => 'Namespace'
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class CloudWatch
|
class CloudWatch
|
||||||
|
|
||||||
class MetricStatistic < Fog::Model
|
class MetricStatistic < Fog::Model
|
||||||
attribute :label, :aliases => 'Label'
|
attribute :label, :aliases => 'Label'
|
||||||
attribute :minimum, :aliases => 'Minimum'
|
attribute :minimum, :aliases => 'Minimum'
|
||||||
|
|
|
@ -16,7 +16,6 @@ module Fog
|
||||||
data.collect! { |datum| datum.merge('MetricName' => metricName, 'Namespace' => namespace, 'Dimensions' => dimensions) }
|
data.collect! { |datum| datum.merge('MetricName' => metricName, 'Namespace' => namespace, 'Dimensions' => dimensions) }
|
||||||
load(data) # data is an array of attribute hashes
|
load(data) # data is an array of attribute hashes
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ require 'fog/aws/models/cloud_watch/metric'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class CloudWatch
|
class CloudWatch
|
||||||
|
|
||||||
class Metrics < Fog::Collection
|
class Metrics < Fog::Collection
|
||||||
attribute :next_token, :aliases => 'NextToken'
|
attribute :next_token, :aliases => 'NextToken'
|
||||||
|
|
||||||
|
@ -45,7 +44,6 @@ module Fog
|
||||||
new(data)
|
new(data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Address < Fog::Model
|
class Address < Fog::Model
|
||||||
|
|
||||||
identity :public_ip, :aliases => 'publicIp'
|
identity :public_ip, :aliases => 'publicIp'
|
||||||
|
|
||||||
attribute :allocation_id, :aliases => 'allocationId'
|
attribute :allocation_id, :aliases => 'allocationId'
|
||||||
|
@ -70,9 +68,7 @@ module Fog
|
||||||
service.disassociate_address(public_ip)
|
service.disassociate_address(public_ip)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/address'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Addresses < Fog::Collection
|
class Addresses < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
attribute :server
|
attribute :server
|
||||||
|
|
||||||
|
@ -92,9 +90,7 @@ module Fog
|
||||||
super(attributes)
|
super(attributes)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class DhcpOption < Fog::Model
|
class DhcpOption < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'dhcpOptionsId'
|
identity :id, :aliases => 'dhcpOptionsId'
|
||||||
attribute :dhcp_configuration_set, :aliases => 'dhcpConfigurationSet'
|
attribute :dhcp_configuration_set, :aliases => 'dhcpConfigurationSet'
|
||||||
attribute :tag_set, :aliases => 'tagSet'
|
attribute :tag_set, :aliases => 'tagSet'
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/dhcp_option'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class DhcpOptions < Fog::Collection
|
class DhcpOptions < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::DhcpOption
|
model Fog::Compute::AWS::DhcpOption
|
||||||
|
@ -83,9 +81,7 @@ module Fog
|
||||||
self.class.new(:service => service).all('dhcp-options-id' => dhcp_options_id).first
|
self.class.new(:service => service).all('dhcp-options-id' => dhcp_options_id).first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Flavor < Fog::Model
|
class Flavor < Fog::Model
|
||||||
|
|
||||||
identity :id
|
identity :id
|
||||||
|
|
||||||
attribute :bits
|
attribute :bits
|
||||||
|
@ -15,9 +13,7 @@ module Fog
|
||||||
attribute :ram
|
attribute :ram
|
||||||
attribute :ebs_optimized_available
|
attribute :ebs_optimized_available
|
||||||
attribute :instance_store_volumes
|
attribute :instance_store_volumes
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ require 'fog/aws/models/compute/flavor'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
FLAVORS = [
|
FLAVORS = [
|
||||||
{
|
{
|
||||||
:id => 't1.micro',
|
:id => 't1.micro',
|
||||||
|
@ -309,7 +308,6 @@ module Fog
|
||||||
]
|
]
|
||||||
|
|
||||||
class Flavors < Fog::Collection
|
class Flavors < Fog::Collection
|
||||||
|
|
||||||
model Fog::Compute::AWS::Flavor
|
model Fog::Compute::AWS::Flavor
|
||||||
|
|
||||||
# Returns an array of all flavors that have been created
|
# Returns an array of all flavors that have been created
|
||||||
|
@ -522,9 +520,7 @@ module Fog
|
||||||
def get(flavor_id)
|
def get(flavor_id)
|
||||||
self.class.new(:service => service).all.detect {|flavor| flavor.id == flavor_id}
|
self.class.new(:service => service).all.detect {|flavor| flavor.id == flavor_id}
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Image < Fog::Model
|
class Image < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'imageId'
|
identity :id, :aliases => 'imageId'
|
||||||
|
|
||||||
attribute :architecture
|
attribute :architecture
|
||||||
|
@ -40,9 +38,7 @@ module Fog
|
||||||
def ready?
|
def ready?
|
||||||
state == 'available'
|
state == 'available'
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/image'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Images < Fog::Collection
|
class Images < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::Image
|
model Fog::Compute::AWS::Image
|
||||||
|
@ -56,7 +54,6 @@ module Fog
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class InternetGateway < Fog::Model
|
class InternetGateway < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'internetGatewayId'
|
identity :id, :aliases => 'internetGatewayId'
|
||||||
attribute :attachment_set, :aliases => 'attachmentSet'
|
attribute :attachment_set, :aliases => 'attachmentSet'
|
||||||
attribute :tag_set, :aliases => 'tagSet'
|
attribute :tag_set, :aliases => 'tagSet'
|
||||||
|
@ -42,7 +40,6 @@ module Fog
|
||||||
reload
|
reload
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Removes an existing internet gateway
|
# Removes an existing internet gateway
|
||||||
#
|
#
|
||||||
# internet_gateway.destroy
|
# internet_gateway.destroy
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/internet_gateway'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class InternetGateways < Fog::Collection
|
class InternetGateways < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::InternetGateway
|
model Fog::Compute::AWS::InternetGateway
|
||||||
|
@ -83,9 +81,7 @@ module Fog
|
||||||
self.class.new(:service => service).all('internet-gateway-id' => internet_gateway_id).first
|
self.class.new(:service => service).all('internet-gateway-id' => internet_gateway_id).first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class KeyPair < Fog::Model
|
class KeyPair < Fog::Model
|
||||||
|
|
||||||
identity :name, :aliases => 'keyName'
|
identity :name, :aliases => 'keyName'
|
||||||
|
|
||||||
attribute :fingerprint, :aliases => 'keyFingerprint'
|
attribute :fingerprint, :aliases => 'keyFingerprint'
|
||||||
|
@ -31,11 +29,9 @@ module Fog
|
||||||
new_attributes = data.reject {|key,value| !['keyFingerprint', 'keyMaterial', 'keyName'].include?(key)}
|
new_attributes = data.reject {|key,value| !['keyFingerprint', 'keyMaterial', 'keyName'].include?(key)}
|
||||||
merge_attributes(new_attributes)
|
merge_attributes(new_attributes)
|
||||||
true
|
true
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def write(path="#{ENV['HOME']}/.ssh/fog_#{Fog.credential.to_s}_#{name}.pem")
|
def write(path="#{ENV['HOME']}/.ssh/fog_#{Fog.credential.to_s}_#{name}.pem")
|
||||||
|
|
||||||
if writable?
|
if writable?
|
||||||
split_private_key = private_key.split(/\n/)
|
split_private_key = private_key.split(/\n/)
|
||||||
File.open(path, "w") do |f|
|
File.open(path, "w") do |f|
|
||||||
|
@ -51,9 +47,7 @@ module Fog
|
||||||
def writable?
|
def writable?
|
||||||
!!(private_key && ENV.has_key?('HOME'))
|
!!(private_key && ENV.has_key?('HOME'))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/key_pair'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class KeyPairs < Fog::Collection
|
class KeyPairs < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
attribute :key_name
|
attribute :key_name
|
||||||
|
|
||||||
|
@ -80,9 +78,7 @@ module Fog
|
||||||
self.class.new(:service => service).all('key-name' => key_name).first
|
self.class.new(:service => service).all('key-name' => key_name).first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class NetworkAcl < Fog::Model
|
class NetworkAcl < Fog::Model
|
||||||
ICMP = 1
|
ICMP = 1
|
||||||
TCP = 6
|
TCP = 6
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/network_acl'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class NetworkAcls < Fog::Collection
|
class NetworkAcls < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::NetworkAcl
|
model Fog::Compute::AWS::NetworkAcl
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class NetworkInterface < Fog::Model
|
class NetworkInterface < Fog::Model
|
||||||
|
|
||||||
identity :network_interface_id, :aliases => 'networkInterfaceId'
|
identity :network_interface_id, :aliases => 'networkInterfaceId'
|
||||||
attribute :state
|
attribute :state
|
||||||
attribute :request_id, :aliases => 'requestId'
|
attribute :request_id, :aliases => 'requestId'
|
||||||
|
@ -27,7 +25,6 @@ module Fog
|
||||||
attribute :association, :aliases => 'association'
|
attribute :association, :aliases => 'association'
|
||||||
attribute :tag_set, :aliases => 'tagSet'
|
attribute :tag_set, :aliases => 'tagSet'
|
||||||
|
|
||||||
|
|
||||||
# Removes an existing network interface
|
# Removes an existing network interface
|
||||||
#
|
#
|
||||||
# network_interface.destroy
|
# network_interface.destroy
|
||||||
|
@ -69,7 +66,6 @@ module Fog
|
||||||
merge_attributes(new_attributes)
|
merge_attributes(new_attributes)
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/network_interface'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class NetworkInterfaces < Fog::Collection
|
class NetworkInterfaces < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::NetworkInterface
|
model Fog::Compute::AWS::NetworkInterface
|
||||||
|
@ -130,7 +128,6 @@ module Fog
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class RouteTable < Fog::Model
|
class RouteTable < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'routeTableId'
|
identity :id, :aliases => 'routeTableId'
|
||||||
|
|
||||||
attribute :vpc_id, :aliases => 'vpcId'
|
attribute :vpc_id, :aliases => 'vpcId'
|
||||||
|
@ -62,7 +60,6 @@ module Fog
|
||||||
def routeSet=(new_route_set)
|
def routeSet=(new_route_set)
|
||||||
merge_attributes(new_route_set || {})
|
merge_attributes(new_route_set || {})
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/route_table'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class RouteTables < Fog::Collection
|
class RouteTables < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::RouteTable
|
model Fog::Compute::AWS::RouteTable
|
||||||
|
@ -84,9 +82,7 @@ module Fog
|
||||||
self.class.new(:service => service).all('route-table-id' => route_table_id).first
|
self.class.new(:service => service).all('route-table-id' => route_table_id).first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class SecurityGroup < Fog::Model
|
class SecurityGroup < Fog::Model
|
||||||
|
|
||||||
identity :name, :aliases => 'groupName'
|
identity :name, :aliases => 'groupName'
|
||||||
attribute :description, :aliases => 'groupDescription'
|
attribute :description, :aliases => 'groupDescription'
|
||||||
attribute :group_id, :aliases => 'groupId'
|
attribute :group_id, :aliases => 'groupId'
|
||||||
|
@ -277,9 +275,7 @@ module Fog
|
||||||
|
|
||||||
info
|
info
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/security_group'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class SecurityGroups < Fog::Collection
|
class SecurityGroups < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::SecurityGroup
|
model Fog::Compute::AWS::SecurityGroup
|
||||||
|
@ -114,7 +112,6 @@ module Fog
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/compute/models/server'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Server < Fog::Compute::Server
|
class Server < Fog::Compute::Server
|
||||||
extend Fog::Deprecation
|
extend Fog::Deprecation
|
||||||
deprecate :ip_address, :public_ip_address
|
deprecate :ip_address, :public_ip_address
|
||||||
|
@ -57,7 +56,6 @@ module Fog
|
||||||
attr_accessor :password
|
attr_accessor :password
|
||||||
attr_writer :iam_instance_profile_name, :iam_instance_profile_arn
|
attr_writer :iam_instance_profile_name, :iam_instance_profile_arn
|
||||||
|
|
||||||
|
|
||||||
def initialize(attributes={})
|
def initialize(attributes={})
|
||||||
self.groups ||= ["default"] unless (attributes[:subnet_id] || attributes[:security_group_ids] || attributes[:network_interfaces])
|
self.groups ||= ["default"] unless (attributes[:subnet_id] || attributes[:security_group_ids] || attributes[:network_interfaces])
|
||||||
self.flavor_id ||= 't1.micro'
|
self.flavor_id ||= 't1.micro'
|
||||||
|
@ -275,9 +273,7 @@ module Fog
|
||||||
self.attributes[:placement] = new_placement
|
self.attributes[:placement] = new_placement
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/server'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Servers < Fog::Collection
|
class Servers < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::Server
|
model Fog::Compute::AWS::Server
|
||||||
|
@ -156,9 +154,7 @@ module Fog
|
||||||
rescue Fog::Errors::NotFound
|
rescue Fog::Errors::NotFound
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Snapshot < Fog::Model
|
class Snapshot < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'snapshotId'
|
identity :id, :aliases => 'snapshotId'
|
||||||
|
|
||||||
attribute :description
|
attribute :description
|
||||||
|
@ -49,9 +47,7 @@ module Fog
|
||||||
def volume=(new_volume)
|
def volume=(new_volume)
|
||||||
self.volume_id = new_volume.volume_id
|
self.volume_id = new_volume.volume_id
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/snapshot'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Snapshots < Fog::Collection
|
class Snapshots < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
attribute :volume
|
attribute :volume
|
||||||
|
|
||||||
|
@ -44,9 +42,7 @@ module Fog
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/compute/models/server'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class SpotRequest < Fog::Compute::Server
|
class SpotRequest < Fog::Compute::Server
|
||||||
|
|
||||||
identity :id, :aliases => 'spotInstanceRequestId'
|
identity :id, :aliases => 'spotInstanceRequestId'
|
||||||
|
|
||||||
attribute :price, :aliases => 'spotPrice'
|
attribute :price, :aliases => 'spotPrice'
|
||||||
|
@ -115,7 +113,6 @@ module Fog
|
||||||
spot_instance_request.merge(options)
|
spot_instance_request.merge(options)
|
||||||
merge_attributes( spot_instance_request )
|
merge_attributes( spot_instance_request )
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,6 @@ module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
class SpotRequests < Fog::Collection
|
class SpotRequests < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::SpotRequest
|
model Fog::Compute::AWS::SpotRequest
|
||||||
|
@ -81,7 +80,6 @@ module Fog
|
||||||
rescue Fog::Errors::NotFound
|
rescue Fog::Errors::NotFound
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Subnet < Fog::Model
|
class Subnet < Fog::Model
|
||||||
|
|
||||||
identity :subnet_id, :aliases => 'subnetId'
|
identity :subnet_id, :aliases => 'subnetId'
|
||||||
attribute :state
|
attribute :state
|
||||||
attribute :vpc_id, :aliases => 'vpcId'
|
attribute :vpc_id, :aliases => 'vpcId'
|
||||||
|
@ -56,7 +54,6 @@ module Fog
|
||||||
|
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/subnet'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Subnets < Fog::Collection
|
class Subnets < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::Subnet
|
model Fog::Compute::AWS::Subnet
|
||||||
|
@ -91,9 +89,7 @@ module Fog
|
||||||
self.class.new(:service => service).all('subnet-id' => subnet_id).first
|
self.class.new(:service => service).all('subnet-id' => subnet_id).first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Tag < Fog::Model
|
class Tag < Fog::Model
|
||||||
|
|
||||||
identity :key
|
identity :key
|
||||||
|
|
||||||
attribute :value
|
attribute :value
|
||||||
|
@ -27,7 +25,6 @@ module Fog
|
||||||
service.create_tags(resource_id, key => value)
|
service.create_tags(resource_id, key => value)
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/tag'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Tags < Fog::Collection
|
class Tags < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::Tag
|
model Fog::Compute::AWS::Tag
|
||||||
|
@ -28,7 +26,6 @@ module Fog
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Volume < Fog::Model
|
class Volume < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'volumeId'
|
identity :id, :aliases => 'volumeId'
|
||||||
|
|
||||||
attribute :attached_at, :aliases => 'attachTime'
|
attribute :attached_at, :aliases => 'attachTime'
|
||||||
|
@ -122,7 +120,6 @@ module Fog
|
||||||
reload
|
reload
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/volume'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Volumes < Fog::Collection
|
class Volumes < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
attribute :server
|
attribute :server
|
||||||
|
|
||||||
|
@ -113,9 +111,7 @@ module Fog
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class VPC < Fog::Model
|
class VPC < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'vpcId'
|
identity :id, :aliases => 'vpcId'
|
||||||
|
|
||||||
attribute :state
|
attribute :state
|
||||||
|
@ -60,9 +58,7 @@ module Fog
|
||||||
merge_attributes(new_attributes)
|
merge_attributes(new_attributes)
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/compute/vpc'
|
||||||
module Fog
|
module Fog
|
||||||
module Compute
|
module Compute
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Vpcs < Fog::Collection
|
class Vpcs < Fog::Collection
|
||||||
|
|
||||||
attribute :filters
|
attribute :filters
|
||||||
|
|
||||||
model Fog::Compute::AWS::VPC
|
model Fog::Compute::AWS::VPC
|
||||||
|
@ -85,9 +83,7 @@ module Fog
|
||||||
self.class.new(:service => service).all('vpc-id' => vpc_id).first
|
self.class.new(:service => service).all('vpc-id' => vpc_id).first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,9 +3,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class DataPipeline
|
class DataPipeline
|
||||||
|
|
||||||
class Pipeline < Fog::Model
|
class Pipeline < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'pipelineId'
|
identity :id, :aliases => 'pipelineId'
|
||||||
attribute :name
|
attribute :name
|
||||||
attribute :description
|
attribute :description
|
||||||
|
@ -15,7 +13,6 @@ module Fog
|
||||||
attribute :unique_id, :aliases => 'uniqueId'
|
attribute :unique_id, :aliases => 'uniqueId'
|
||||||
|
|
||||||
def initialize(attributes={})
|
def initialize(attributes={})
|
||||||
|
|
||||||
# Extract the 'fields' portion of a response to attributes
|
# Extract the 'fields' portion of a response to attributes
|
||||||
if attributes.include?('fields')
|
if attributes.include?('fields')
|
||||||
string_fields = attributes['fields'].select { |f| f.include?('stringValue') }
|
string_fields = attributes['fields'].select { |f| f.include?('stringValue') }
|
||||||
|
@ -59,9 +56,7 @@ module Fog
|
||||||
|
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/data_pipeline/pipeline'
|
||||||
module Fog
|
module Fog
|
||||||
module AWS
|
module AWS
|
||||||
class DataPipeline
|
class DataPipeline
|
||||||
|
|
||||||
class Pipelines < Fog::Collection
|
class Pipelines < Fog::Collection
|
||||||
|
|
||||||
model Fog::AWS::DataPipeline::Pipeline
|
model Fog::AWS::DataPipeline::Pipeline
|
||||||
|
|
||||||
def all
|
def all
|
||||||
|
@ -29,7 +27,6 @@ module Fog
|
||||||
|
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module DNS
|
module DNS
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Record < Fog::Model
|
class Record < Fog::Model
|
||||||
extend Fog::Deprecation
|
extend Fog::Deprecation
|
||||||
deprecate :ip, :value
|
deprecate :ip, :value
|
||||||
|
@ -105,9 +104,7 @@ module Fog
|
||||||
end
|
end
|
||||||
options
|
options
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/aws/models/dns/record'
|
||||||
module Fog
|
module Fog
|
||||||
module DNS
|
module DNS
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Records < Fog::Collection
|
class Records < Fog::Collection
|
||||||
|
|
||||||
attribute :is_truncated, :aliases => ['IsTruncated']
|
attribute :is_truncated, :aliases => ['IsTruncated']
|
||||||
attribute :max_items, :aliases => ['MaxItems']
|
attribute :max_items, :aliases => ['MaxItems']
|
||||||
attribute :name
|
attribute :name
|
||||||
|
@ -116,9 +114,7 @@ module Fog
|
||||||
requires :zone
|
requires :zone
|
||||||
super({ :zone => zone }.merge!(attributes))
|
super({ :zone => zone }.merge!(attributes))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,9 +4,7 @@ require 'fog/core/model'
|
||||||
module Fog
|
module Fog
|
||||||
module DNS
|
module DNS
|
||||||
class AWS
|
class AWS
|
||||||
|
|
||||||
class Zone < Fog::Model
|
class Zone < Fog::Model
|
||||||
|
|
||||||
identity :id, :aliases => 'Id'
|
identity :id, :aliases => 'Id'
|
||||||
|
|
||||||
attribute :caller_reference, :aliases => 'CallerReference'
|
attribute :caller_reference, :aliases => 'CallerReference'
|
||||||
|
@ -45,9 +43,7 @@ module Fog
|
||||||
define_method(:HostedZone=) do |new_hosted_zone|
|
define_method(:HostedZone=) do |new_hosted_zone|
|
||||||
merge_attributes(new_hosted_zone)
|
merge_attributes(new_hosted_zone)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue