mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Remove trailing whitespace
This commit is contained in:
parent
c22ec86333
commit
8483a599f2
891 changed files with 2480 additions and 2480 deletions
|
@ -8,10 +8,10 @@ module Fog
|
|||
def reset
|
||||
@response = {}
|
||||
end
|
||||
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'Id'
|
||||
when 'Id'
|
||||
@response[name] = value.sub('/change/', '')
|
||||
when 'Status', 'SubmittedAt'
|
||||
@response[name] = value
|
||||
|
@ -23,4 +23,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
def reset
|
||||
@response = {}
|
||||
end
|
||||
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'Id'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module Parsers
|
||||
module AWS
|
||||
module Elasticache
|
||||
module Elasticache
|
||||
|
||||
class DescribeReservedCacheNodes < Fog::Parsers::Base
|
||||
|
||||
|
@ -34,4 +34,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ module Fog
|
|||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
case name
|
||||
case name
|
||||
when 'CrossZoneLoadBalancing'
|
||||
@cross_zone_load_balancing = {}
|
||||
end
|
||||
|
|
|
@ -8,12 +8,12 @@ module Fog
|
|||
def reset
|
||||
@context = []
|
||||
@contexts = ['BootstrapActions', 'ExecutionStatusDetail', 'Instances', 'Steps', 'InstanceGroups', 'Args']
|
||||
|
||||
|
||||
@response = { 'JobFlows' => [] }
|
||||
@bootstrap_actions = {'ScriptBootstrapActionConfig' => {'Args' => []}}
|
||||
@instance = { 'InstanceGroups' => [], 'Placement' => {}}
|
||||
@step = {
|
||||
'ExecutionStatusDetail' => {},
|
||||
'ExecutionStatusDetail' => {},
|
||||
'StepConfig' => {
|
||||
'HadoopJarStepConfig' => {
|
||||
'Args' => [],
|
||||
|
@ -45,12 +45,12 @@ module Fog
|
|||
@bootstrap_actions = {'ScriptBootstrapActionConfig' => {'Args' => []}}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == 'ExecutionStatusDetail'
|
||||
case name
|
||||
when 'CreationDateTime', 'EndDateTime', 'LastStateChangeReason',
|
||||
when 'CreationDateTime', 'EndDateTime', 'LastStateChangeReason',
|
||||
'ReadyDateTime', 'StartDateTime', 'State'
|
||||
@execution_status_detail[name] = value
|
||||
@execution_status_detail[name] = value
|
||||
when 'ExecutionStatusDetail'
|
||||
if @context.include?('Steps')
|
||||
@step['ExecutionStatusDetail'] = @execution_status_detail
|
||||
|
@ -60,7 +60,7 @@ module Fog
|
|||
@execution_status_detail = {}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == 'Instances'
|
||||
case name
|
||||
when 'AvailabilityZone'
|
||||
|
@ -71,13 +71,13 @@ module Fog
|
|||
@instance[name] = value
|
||||
when 'member'
|
||||
@instance['InstanceGroups'] << @instance_group_detail
|
||||
@instance_group_detail = {}
|
||||
@instance_group_detail = {}
|
||||
when 'Instances'
|
||||
@flow['Instances'] = @instance
|
||||
@instance = { 'InstanceGroups' => [], 'Placement' => {}}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == 'InstanceGroups'
|
||||
case name
|
||||
when 'member'
|
||||
|
@ -87,7 +87,7 @@ module Fog
|
|||
@instance_group_detail[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == 'Args'
|
||||
if name == 'member'
|
||||
if @context.include?('Steps')
|
||||
|
@ -97,7 +97,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == 'Steps'
|
||||
case name
|
||||
when 'ActionOnFailure', 'Name'
|
||||
|
@ -107,7 +107,7 @@ module Fog
|
|||
when 'member'
|
||||
@flow['Steps'] << @step
|
||||
@step = {
|
||||
'ExecutionStatusDetail' => {},
|
||||
'ExecutionStatusDetail' => {},
|
||||
'StepConfig' => {
|
||||
'HadoopJarStepConfig' => {
|
||||
'Args' => [],
|
||||
|
@ -117,7 +117,7 @@ module Fog
|
|||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.empty?
|
||||
case name
|
||||
when 'AmiVersion', 'JobFlowId', 'LogUri', 'Name'
|
||||
|
@ -127,7 +127,7 @@ module Fog
|
|||
@flow = {'Instances' => [], 'ExecutionStatusDetail' => {}, 'BootstrapActions' => [], 'Steps' => []}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == name
|
||||
@context.pop
|
||||
end
|
||||
|
|
|
@ -29,7 +29,7 @@ module Fog
|
|||
@role = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
@ -76,4 +76,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,4 +23,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -38,11 +38,11 @@ module Fog
|
|||
when 'UserId', 'UserName'
|
||||
@user[name] = value
|
||||
when 'member'
|
||||
@response['Users'] << @user
|
||||
@response['Users'] << @user
|
||||
@user = {}
|
||||
when 'IsTruncated'
|
||||
response[name] = (value == 'true')
|
||||
when 'Marker', 'RequestId'
|
||||
when 'Marker', 'RequestId'
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ module Fog
|
|||
end
|
||||
|
||||
def end_element(name)
|
||||
|
||||
|
||||
case name
|
||||
when 'RequestId'
|
||||
@response[name] = value
|
||||
|
@ -31,4 +31,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -31,4 +31,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ module Fog
|
|||
def finished_role(role)
|
||||
@response['Roles'] << role
|
||||
end
|
||||
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId', 'Marker'
|
||||
|
@ -28,4 +28,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module IAM
|
||||
|
||||
class ListSigningCertificates < Fog::Parsers::Base
|
||||
|
||||
|
||||
def reset
|
||||
@signing_certificate = {}
|
||||
@response = { 'SigningCertificates' => [] }
|
||||
|
|
|
@ -50,4 +50,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,4 +26,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ module Fog
|
|||
|
||||
class UpdateUser < Fog::Parsers::Base
|
||||
# http://docs.amazonwebservices.com/IAM/latest/APIReference/index.html?API_UpdateUser.html
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'User' => {} }
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module Parsers
|
||||
module AWS
|
||||
module RDS
|
||||
module RDS
|
||||
|
||||
# Base parser for ResponseMetadata, RequestId
|
||||
class Base < Fog::Parsers::Base
|
||||
|
|
|
@ -2,9 +2,9 @@ module Fog
|
|||
module Parsers
|
||||
module AWS
|
||||
module RDS
|
||||
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class CreateDBInstance < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
@ -13,7 +13,7 @@ module Fog
|
|||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
|
|
@ -2,9 +2,9 @@ module Fog
|
|||
module Parsers
|
||||
module AWS
|
||||
module RDS
|
||||
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class CreateDBInstanceReadReplica < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
@ -13,7 +13,7 @@ module Fog
|
|||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
|
|
@ -3,7 +3,7 @@ module Fog
|
|||
module AWS
|
||||
module RDS
|
||||
require 'fog/aws/parsers/rds/snapshot_parser'
|
||||
|
||||
|
||||
class CreateDBSnapshot < Fog::Parsers::AWS::RDS::SnapshotParser
|
||||
|
||||
def reset
|
||||
|
@ -17,7 +17,7 @@ module Fog
|
|||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'DBSnapshot' then
|
||||
when 'DBSnapshot' then
|
||||
@response['CreateDBSnapshotResult']['DBSnapshot'] = @db_snapshot
|
||||
@db_snapshot = fresh_snapshot
|
||||
when 'RequestId'
|
||||
|
|
|
@ -8,14 +8,14 @@ module Fog
|
|||
def reset
|
||||
@db_engine_version = fresh_engine_version
|
||||
end
|
||||
|
||||
|
||||
def fresh_engine_version
|
||||
{}
|
||||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
|
||||
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
@ -25,7 +25,7 @@ module Fog
|
|||
when 'DBParameterGroupFamily' then @db_engine_version['DBParameterGroupFamily'] = @value
|
||||
when 'DBEngineVersionIdentifier' then @db_engine_version['DBEngineVersionIdentifier'] = @value
|
||||
when 'Engine' then @db_engine_version['Engine'] = @value
|
||||
when 'EngineVersion' then @db_engine_version['EngineVersion'] = @value
|
||||
when 'EngineVersion' then @db_engine_version['EngineVersion'] = @value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,9 +7,9 @@ module Fog
|
|||
|
||||
def reset
|
||||
@db_instance = fresh_instance
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
def fresh_instance
|
||||
{'PendingModifiedValues' => [], 'DBSecurityGroups' => [], 'ReadReplicaDBInstanceIdentifiers' => [], 'Endpoint' => {}}
|
||||
end
|
||||
|
@ -39,18 +39,18 @@ module Fog
|
|||
@in_vpc_security_groups = true
|
||||
@vpc_security_groups = []
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
||||
case name
|
||||
|
||||
|
||||
when 'LatestRestorableTime', 'InstanceCreateTime'
|
||||
@db_instance[name] = Time.parse value
|
||||
when 'Engine',
|
||||
'DBInstanceStatus', 'DBInstanceIdentifier', 'EngineVersion',
|
||||
'PreferredBackupWindow', 'PreferredMaintenanceWindow',
|
||||
when 'Engine',
|
||||
'DBInstanceStatus', 'DBInstanceIdentifier', 'EngineVersion',
|
||||
'PreferredBackupWindow', 'PreferredMaintenanceWindow',
|
||||
'AvailabilityZone', 'MasterUsername', 'DBName', 'LicenseModel',
|
||||
'DBSubnetGroupName'
|
||||
@db_instance[name] = value
|
||||
|
@ -70,7 +70,7 @@ module Fog
|
|||
if @in_db_parameter_groups
|
||||
@db_parameter_group[name] = value
|
||||
end
|
||||
|
||||
|
||||
when 'BackupRetentionPeriod'
|
||||
if @in_pending_modified_values
|
||||
@pending_modified_values[name] = value.to_i
|
||||
|
@ -91,7 +91,7 @@ module Fog
|
|||
when 'DBSecurityGroup'
|
||||
@db_security_groups << @db_security_group
|
||||
@db_security_group = {}
|
||||
|
||||
|
||||
when 'VpcSecurityGroups'
|
||||
@in_vpc_security_groups = false
|
||||
@db_instance['VpcSecurityGroups'] = @vpc_security_groups
|
||||
|
@ -131,7 +131,7 @@ module Fog
|
|||
elsif @in_endpoint
|
||||
@endpoint[name] = value.to_i
|
||||
end
|
||||
|
||||
|
||||
when 'PendingModifiedValues'
|
||||
@in_pending_modified_values = false
|
||||
@db_instance['PendingModifiedValues'] = @pending_modified_values
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class DeleteDBInstance < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
@ -13,12 +13,12 @@ module Fog
|
|||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
|
||||
|
||||
when 'DBInstance'
|
||||
@response['DeleteDBInstanceResult']['DBInstance'] = @db_instance
|
||||
@db_instance = fresh_instance
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/snapshot_parser'
|
||||
|
||||
|
||||
class DeleteDBSnapshot < Fog::Parsers::AWS::RDS::SnapshotParser
|
||||
|
||||
def reset
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/db_engine_version_parser'
|
||||
|
||||
|
||||
class DescribeDBEngineVersions < Fog::Parsers::AWS::RDS::DBEngineVersionParser
|
||||
|
||||
def reset
|
||||
|
@ -18,7 +18,7 @@ module Fog
|
|||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'DBEngineVersion' then
|
||||
when 'DBEngineVersion' then
|
||||
@response['DescribeDBEngineVersionsResult']['DBEngineVersions'] << @db_engine_version
|
||||
@db_engine_version = fresh_engine_version
|
||||
when 'Marker'
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class DescribeDBInstances < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
|
|
@ -19,9 +19,9 @@ module Fog
|
|||
when 'DBParameterGroupFamily' then @db_parameter_group['DBParameterGroupFamily'] = value
|
||||
when 'Description' then @db_parameter_group['Description'] = value
|
||||
when 'DBParameterGroupName' then @db_parameter_group['DBParameterGroupName'] = value
|
||||
when 'DBParameterGroup' then
|
||||
when 'DBParameterGroup' then
|
||||
@response['DescribeDBParameterGroupsResult']['DBParameterGroups'] << @db_parameter_group
|
||||
@db_parameter_group = {}
|
||||
@db_parameter_group = {}
|
||||
when 'Marker'
|
||||
@response['DescribeDBParameterGroupsResult']['Marker'] = value
|
||||
when 'RequestId'
|
||||
|
|
|
@ -21,12 +21,12 @@ module Fog
|
|||
when 'DataType' then @parameter['DataType'] = value
|
||||
when 'AllowedValues' then @parameter['AllowedValues'] = value
|
||||
when 'Source' then @parameter['Source'] = value
|
||||
when 'IsModifiable' then
|
||||
when 'IsModifiable' then
|
||||
@parameter['IsModifiable'] = value == 'true' ? true : false
|
||||
when 'Description' then @parameter['Description'] = value
|
||||
when 'ApplyType' then @parameter['ApplyType'] = value
|
||||
when 'ParameterName' then @parameter['ParameterName'] = value
|
||||
when 'Parameter'
|
||||
when 'Parameter'
|
||||
@parameters << @parameter
|
||||
@parameter = {}
|
||||
when 'Marker'
|
||||
|
|
|
@ -40,4 +40,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/snapshot_parser'
|
||||
|
||||
|
||||
class DescribeDBSnapshots < Fog::Parsers::AWS::RDS::SnapshotParser
|
||||
|
||||
def reset
|
||||
|
@ -18,7 +18,7 @@ module Fog
|
|||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'DBSnapshot' then
|
||||
when 'DBSnapshot' then
|
||||
@response['DescribeDBSnapshotsResult']['DBSnapshots'] << @db_snapshot
|
||||
@db_snapshot = fresh_snapshot
|
||||
when 'Marker'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module Parsers
|
||||
module AWS
|
||||
module RDS
|
||||
module RDS
|
||||
require 'fog/aws/parsers/rds/base'
|
||||
|
||||
class EventListParser < Base
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class ModifyDBInstance < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
@ -13,7 +13,7 @@ module Fog
|
|||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class RebootDBInstance < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
@ -13,12 +13,12 @@ module Fog
|
|||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
|
||||
|
||||
when 'DBInstance'
|
||||
@response['RebootDBInstanceResult']['DBInstance'] = @db_instance
|
||||
@db_instance = fresh_instance
|
||||
|
|
|
@ -8,14 +8,14 @@ module Fog
|
|||
def reset
|
||||
@db_snapshot = fresh_snapshot
|
||||
end
|
||||
|
||||
|
||||
def fresh_snapshot
|
||||
{}
|
||||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
|
||||
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
|
|
@ -53,7 +53,7 @@ module Fog
|
|||
end
|
||||
|
||||
def fresh_cluster
|
||||
{ 'ClusterParameterGroups' => [], 'ClusterSecurityGroups' => [], 'VpcSecurityGroups' => [],
|
||||
{ 'ClusterParameterGroups' => [], 'ClusterSecurityGroups' => [], 'VpcSecurityGroups' => [],
|
||||
'EndPoint' => {}, 'PendingModifiedValues'=> {}, 'RestoreStatus' => {}}
|
||||
end
|
||||
|
||||
|
@ -73,9 +73,9 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'AvailabilityZone', 'ClusterIdentifier', 'ClusterStatus', 'ClusterSubnetGroupName', 'DBName',
|
||||
when 'AvailabilityZone', 'ClusterIdentifier', 'ClusterStatus', 'ClusterSubnetGroupName', 'DBName',
|
||||
'MasterUsername', 'ModifyStatus', 'PreferredMaintenanceWindow', 'VpcId'
|
||||
@cluster[name] = value
|
||||
when 'ClusterCreateTime'
|
||||
|
@ -83,7 +83,7 @@ module Fog
|
|||
when 'AllowVersionUpgrade', 'Encrypted', 'PubliclyAccessible'
|
||||
@cluster[name] = (value == "true")
|
||||
when 'Address'
|
||||
@cluster['EndPoint'][name] = value
|
||||
@cluster['EndPoint'][name] = value
|
||||
when 'Port'
|
||||
@cluster['EndPoint'][name] = value.to_i
|
||||
when 'NodeType', 'ClusterVersion'
|
||||
|
@ -141,4 +141,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@ module Fog
|
|||
# :ip_ranges - (Array)
|
||||
# :status - (String)
|
||||
# :cidrip - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@cluster_security_group = fresh_cluster_security_group
|
||||
end
|
||||
|
@ -31,8 +31,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ClusterSecurityGroupName', 'Description'
|
||||
@cluster_security_group[name] = value
|
||||
|
@ -47,4 +47,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
class ClusterSnapshot < ClusterSnapshotParser
|
||||
# :parameter_group_name - (String)
|
||||
# :parameter_group_status - (String)
|
||||
|
||||
|
||||
def reset
|
||||
super
|
||||
@response = {}
|
||||
|
@ -18,7 +18,7 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Snapshot'
|
||||
|
@ -29,4 +29,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -41,8 +41,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'SnapshotIdentifier', 'ClusterIdentifier', 'Status', 'AvailabilityZone', 'MasterUsername', 'ClusterVersion', 'SnapshotType', 'NodeType',
|
||||
'DBName', 'VpcId', 'OwnerAccount'
|
||||
|
@ -63,4 +63,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,8 +12,8 @@ module Fog
|
|||
# :subnet_identifier - (String)
|
||||
# :subnet_availability_zone - (Hash)
|
||||
# :name - (String)
|
||||
# :subnet_status - (String)
|
||||
|
||||
# :subnet_status - (String)
|
||||
|
||||
def reset
|
||||
@response = { 'Subnets' => [] }
|
||||
end
|
||||
|
@ -30,7 +30,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ClusterSubnetGroupName', 'Desciption', 'VpcId', 'SubnetGroupStatus'
|
||||
|
|
|
@ -7,7 +7,7 @@ module Fog
|
|||
# :parameter_group_name - (String)
|
||||
# :parameter_group_family - (String)
|
||||
# :description - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@response = {'ClusterParameterGroup'=>{}}
|
||||
end
|
||||
|
@ -16,7 +16,7 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ParameterGroupName', 'ParameterGroupFamily', 'Description'
|
||||
|
@ -27,4 +27,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ module Fog
|
|||
|
||||
class CreateClusterSecurityGroup < ClusterSecurityGroupParser
|
||||
# :cluster_security_group
|
||||
|
||||
|
||||
def reset
|
||||
super
|
||||
@response = {}
|
||||
|
@ -17,7 +17,7 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ClusterSecurityGroup'
|
||||
|
@ -28,4 +28,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ module Fog
|
|||
# :parameter_group_name - (String)
|
||||
# :parameter_group_family - (String)
|
||||
# :description - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'ParameterGroups' => [] }
|
||||
end
|
||||
|
@ -22,7 +22,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
|
@ -38,4 +38,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ module Fog
|
|||
# :allowed_values - (String)
|
||||
# :is_modifiable - (Boolean)
|
||||
# :minimum_engine_version - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'Parameters' => [] }
|
||||
end
|
||||
|
@ -27,8 +27,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -45,4 +45,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
class DescribeClusterSecurityGroups < ClusterSecurityGroupParser
|
||||
# :marker - (String)
|
||||
# :cluster_security_groups - (Array)
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'ClusterSecurityGroups' => [] }
|
||||
end
|
||||
|
@ -21,7 +21,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
|
@ -35,4 +35,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,8 +21,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -35,4 +35,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,8 +28,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -44,7 +44,7 @@ module Fog
|
|||
when 'SubnetAvailabilityZone'
|
||||
@subnet['SubnetAvailabilityZone'] = {}
|
||||
when 'Name'
|
||||
@subnet['SubnetAvailabilityZone']['Name'] = value
|
||||
@subnet['SubnetAvailabilityZone']['Name'] = value
|
||||
when 'SubnetIdentifier', 'SubnetStatus'
|
||||
@subnet[name] = value
|
||||
end
|
||||
|
|
|
@ -19,16 +19,16 @@ module Fog
|
|||
super
|
||||
case name
|
||||
when 'ClusterVersions'
|
||||
@cluster_version = {}
|
||||
@cluster_version = {}
|
||||
when 'ClusterVersion'
|
||||
# Sadly, there are two nodes of different type named cluster_version
|
||||
# Sadly, there are two nodes of different type named cluster_version
|
||||
# that are nested, so we keep track of which one we're in
|
||||
@cluster_version_depth += 1
|
||||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -39,7 +39,7 @@ module Fog
|
|||
@cluster_version = {}
|
||||
else
|
||||
@cluster_version[name] = value
|
||||
end
|
||||
end
|
||||
when 'ClusterParameterGroupFamily', 'Description'
|
||||
@cluster_version[name] = value
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@ module Fog
|
|||
# :allowed_values - (String)
|
||||
# :is_modifiable - (Boolean)
|
||||
# :minimum_engine_version - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'Parameters' => [] }
|
||||
end
|
||||
|
@ -28,8 +28,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker', 'ParameterGroupFamily'
|
||||
@response[name] = value
|
||||
|
@ -46,4 +46,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ module Fog
|
|||
# :source_type - (String)
|
||||
# :message - (String)
|
||||
# :date - (Time)
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'Events' => [] }
|
||||
end
|
||||
|
@ -23,7 +23,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
|
@ -41,4 +41,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ module Fog
|
|||
# :cluster_type - (String)
|
||||
# :node_type - (String)
|
||||
# :availability_zones - (Array)
|
||||
# :name - (String)
|
||||
# :name - (String)
|
||||
|
||||
def reset
|
||||
@response = { 'OrderableClusterOptions' => [] }
|
||||
|
@ -30,8 +30,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -51,4 +51,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
|
@ -61,4 +61,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,19 +6,19 @@ module Fog
|
|||
class DescribeReservedNodes < Fog::Parsers::Base
|
||||
# :marker - (String)
|
||||
# :reserved_nodes - (Array)
|
||||
# :reserved_node_id - (String)
|
||||
# :reserved_node_offering_id - (String)
|
||||
# :node_type - (String)
|
||||
# :reserved_node_id - (String)
|
||||
# :reserved_node_offering_id - (String)
|
||||
# :node_type - (String)
|
||||
# :start_time - (Time)
|
||||
# :duration - (Integer)
|
||||
# :fixed_price - (Numeric)
|
||||
# :usage_price - (Numeric)
|
||||
# :duration - (Integer)
|
||||
# :fixed_price - (Numeric)
|
||||
# :usage_price - (Numeric)
|
||||
# :currency_code - (String)
|
||||
# :node_count - (Integer)
|
||||
# :state - (String)
|
||||
# :offering_type - (String)
|
||||
# :recurring_charges - (Array)
|
||||
# :recurring_charge_amount - (Numeric)
|
||||
# :node_count - (Integer)
|
||||
# :state - (String)
|
||||
# :offering_type - (String)
|
||||
# :recurring_charges - (Array)
|
||||
# :recurring_charge_amount - (Numeric)
|
||||
# :recurring_charge_frequency - (String)
|
||||
|
||||
def reset
|
||||
|
@ -39,8 +39,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -68,4 +68,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,8 +28,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'TargetNodeType', 'TargetClusterType', 'Status'
|
||||
@response[name] = value
|
||||
|
@ -57,4 +57,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module AWS
|
||||
|
||||
class PurchaseReservedNodeOffering < Fog::Parsers::Base
|
||||
|
||||
|
||||
# :reserved_node_id - (String)
|
||||
# :reserved_node_offering_id - (String)
|
||||
# :node_type - (String)
|
||||
|
@ -31,8 +31,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ReservedNodeId', 'ReservedNodeOfferingId', 'NodeType', 'CurrencyCode', 'State', 'OfferingType'
|
||||
@response[name] = value
|
||||
|
@ -55,4 +55,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ module Fog
|
|||
|
||||
class RevokeClusterSecurityGroupIngress < ClusterSecurityGroupParser
|
||||
# :cluster_security_group
|
||||
|
||||
|
||||
def reset
|
||||
super
|
||||
@response = {}
|
||||
|
@ -17,7 +17,7 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ClusterSecurityGroup'
|
||||
|
@ -28,4 +28,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ module Fog
|
|||
class UpdateClusterParameterGroupParser < Fog::Parsers::Base
|
||||
# :parameter_group_name - (String)
|
||||
# :parameter_group_status - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@response = {}
|
||||
end
|
||||
|
@ -15,7 +15,7 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ParameterGroupName', 'ParameterGroupStatus'
|
||||
|
@ -26,4 +26,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,4 +28,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,8 +25,8 @@ module Fog
|
|||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,4 +27,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ module Fog
|
|||
when 'Item'
|
||||
@item_name = @attribute_name = nil
|
||||
when 'Name'
|
||||
if @item_name.nil?
|
||||
if @item_name.nil?
|
||||
@item_name = value
|
||||
response['Items'][@item_name] = {}
|
||||
else
|
||||
|
|
|
@ -36,7 +36,7 @@ module Fog
|
|||
end
|
||||
elsif @in_transition
|
||||
case name
|
||||
when 'StorageClass',
|
||||
when 'StorageClass',
|
||||
@transition['StorageClass'] = value
|
||||
when 'Date'
|
||||
@transition[name] = value
|
||||
|
@ -56,7 +56,7 @@ module Fog
|
|||
when 'Rule'
|
||||
@response['Rules'] << @rule
|
||||
@rule = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module AWS
|
||||
class Redshift < Fog::Service
|
||||
extend Fog::AWS::CredentialFetcher::ServiceMethods
|
||||
|
||||
|
||||
requires :aws_access_key_id, :aws_secret_access_key
|
||||
recognizes :region, :host, :path, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at
|
||||
|
||||
|
@ -30,21 +30,21 @@ module Fog
|
|||
request :create_cluster_subnet_group
|
||||
request :modify_cluster
|
||||
request :modify_cluster_parameter_group
|
||||
request :modify_cluster_subnet_group
|
||||
request :delete_cluster
|
||||
request :modify_cluster_subnet_group
|
||||
request :delete_cluster
|
||||
request :delete_cluster_parameter_group
|
||||
request :delete_cluster_security_group
|
||||
request :delete_cluster_snapshot
|
||||
request :delete_cluster_subnet_group
|
||||
request :authorize_cluster_security_group_ingress
|
||||
request :authorize_snapshot_access
|
||||
request :copy_cluster_snapshot
|
||||
request :purchase_reserved_node_offering
|
||||
request :authorize_cluster_security_group_ingress
|
||||
request :authorize_snapshot_access
|
||||
request :copy_cluster_snapshot
|
||||
request :purchase_reserved_node_offering
|
||||
request :reboot_cluster
|
||||
request :reset_cluster_parameter_group
|
||||
request :restore_from_cluster_snapshot
|
||||
request :revoke_cluster_security_group_ingress
|
||||
request :revoke_snapshot_access
|
||||
request :reset_cluster_parameter_group
|
||||
request :restore_from_cluster_snapshot
|
||||
request :revoke_cluster_security_group_ingress
|
||||
request :revoke_snapshot_access
|
||||
|
||||
class Mock
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module AWS
|
||||
module RegionMethods
|
||||
|
||||
|
||||
def validate_aws_region region
|
||||
unless ['ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1'].include?(region)
|
||||
raise ArgumentError, "Unknown region: #{region.inspect}"
|
||||
|
|
|
@ -72,7 +72,7 @@ module Fog
|
|||
if load_balancer_names = options.delete('LoadBalancerNames')
|
||||
options.merge!(AWS.indexed_param('LoadBalancerNames.member.%d', [*load_balancer_names]))
|
||||
end
|
||||
|
||||
|
||||
if tags = options.delete('Tags')
|
||||
tags.each_with_index do |(key, value), i|
|
||||
options["Tags.member.#{i+1}.Key"] = key.to_s # turns symbol into string
|
||||
|
@ -82,7 +82,7 @@ module Fog
|
|||
if termination_policies = options.delete('TerminationPolicies')
|
||||
options.merge!(AWS.indexed_param('TerminationPolicies.member.%d', [*termination_policies]))
|
||||
end
|
||||
|
||||
|
||||
request({
|
||||
'Action' => 'CreateAutoScalingGroup',
|
||||
'AutoScalingGroupName' => auto_scaling_group_name,
|
||||
|
|
|
@ -90,7 +90,7 @@ module Fog
|
|||
# even a nil object will turn into an empty array
|
||||
lc = [*launch_configuration_names]
|
||||
|
||||
launch_configurations =
|
||||
launch_configurations =
|
||||
if lc.any?
|
||||
lc.map do |lc_name|
|
||||
l_conf = self.data[:launch_configurations].find { |name, data| name == lc_name }
|
||||
|
|
|
@ -47,8 +47,8 @@ module Fog
|
|||
# group.
|
||||
# * 'MinSize'<~Integer> - The minimum size of the Auto Scaling
|
||||
# group.
|
||||
# * 'Recurrence'<~String> - The time when recurring future
|
||||
# actions will start. Start time is specified by the user
|
||||
# * 'Recurrence'<~String> - The time when recurring future
|
||||
# actions will start. Start time is specified by the user
|
||||
# following the Unix cron syntax format.
|
||||
# * 'ScheduledActionARN'<~String> - The Amazon Resource Name
|
||||
# (ARN) of this scheduled action.
|
||||
|
|
|
@ -9,7 +9,7 @@ module Fog
|
|||
# @param etag [String] etag of that distribution from earlier get or put
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/DeleteDistribution.html
|
||||
|
||||
|
||||
def delete_distribution(distribution_id, etag)
|
||||
request({
|
||||
:expects => 204,
|
||||
|
|
|
@ -9,7 +9,7 @@ module Fog
|
|||
# @param [String] etag Etag of that distribution from earlier get or put
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/DeleteStreamingDistribution.html
|
||||
|
||||
|
||||
def delete_streaming_distribution(distribution_id, etag)
|
||||
request({
|
||||
:expects => 204,
|
||||
|
|
|
@ -37,7 +37,7 @@ module Fog
|
|||
# * TrustedSigners [Array] - Trusted signers.
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/GetDistribution.html
|
||||
|
||||
|
||||
def get_distribution(distribution_id)
|
||||
request({
|
||||
:expects => 200,
|
||||
|
|
|
@ -37,7 +37,7 @@ module Fog
|
|||
# * TrustedSigners [Array] - Trusted signers.
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListDistributions.html
|
||||
#
|
||||
#
|
||||
def get_distribution_list(options = {})
|
||||
request({
|
||||
:expects => 200,
|
||||
|
|
|
@ -6,10 +6,10 @@ module Fog
|
|||
require 'fog/aws/parsers/cdn/get_invalidation'
|
||||
|
||||
# Get invalidation.
|
||||
#
|
||||
#
|
||||
# @param distribution_id [String] Distribution id.
|
||||
# @param invalidation_id [String] Invalidation id.
|
||||
#
|
||||
#
|
||||
# @return [Excon::Response]
|
||||
# * body [Hash]:
|
||||
# * Id [String] - Invalidation id.
|
||||
|
@ -17,9 +17,9 @@ module Fog
|
|||
# * CreateTime [String]
|
||||
# * InvalidationBatch [Array]:
|
||||
# * Path [String]
|
||||
#
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/2010-11-01/APIReference/GetInvalidation.html
|
||||
|
||||
|
||||
def get_invalidation(distribution_id, invalidation_id)
|
||||
request({
|
||||
:expects => 200,
|
||||
|
|
|
@ -6,7 +6,7 @@ module Fog
|
|||
require 'fog/aws/parsers/cdn/get_invalidation_list'
|
||||
|
||||
# Get invalidation list.
|
||||
#
|
||||
#
|
||||
# @param options [Hash] Config arguments for list.
|
||||
# @option options Marker [String] Limits object keys to only those that appear lexicographically after its value.
|
||||
# @option options MaxItems [Integer] Limits number of object keys returned.
|
||||
|
@ -22,7 +22,7 @@ module Fog
|
|||
# * Status [String]
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListInvalidation.html
|
||||
|
||||
|
||||
def get_invalidation_list(distribution_id, options = {})
|
||||
request({
|
||||
:expects => 200,
|
||||
|
|
|
@ -30,7 +30,7 @@ module Fog
|
|||
# * TrustedSigners [Array] - Trusted signers.
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/GetStreamingDistribution.html
|
||||
|
||||
|
||||
def get_streaming_distribution(distribution_id)
|
||||
request({
|
||||
:expects => 200,
|
||||
|
|
|
@ -7,7 +7,7 @@ module Fog
|
|||
|
||||
# List information about distributions in CloudFront.
|
||||
#
|
||||
# @param options [Hash] Config arguments for list.
|
||||
# @param options [Hash] Config arguments for list.
|
||||
# @option options Marker [String] Limits object keys to only those that appear lexicographically after its value.
|
||||
# @option options MaxItems [Integer] Limits number of object keys returned.
|
||||
#
|
||||
|
@ -37,7 +37,7 @@ module Fog
|
|||
# * TrustedSigners [Array] - Trusted signers.
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListStreamingDistributions.html
|
||||
|
||||
|
||||
def get_streaming_distribution_list(options = {})
|
||||
request({
|
||||
:expects => 200,
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
# Create a new distribution in CloudFront.
|
||||
#
|
||||
# @param options [Hash] Config for distribution.
|
||||
#
|
||||
#
|
||||
# REQUIRED:
|
||||
# * S3Origin [Hash]:
|
||||
# * DNSName [String] Origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'.
|
||||
|
@ -50,7 +50,7 @@ module Fog
|
|||
# * TrustedSigners [Array] - Trusted signers.
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html
|
||||
|
||||
|
||||
def post_distribution(options = {})
|
||||
options['CallerReference'] = Time.now.to_i.to_s
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?>'
|
||||
|
@ -130,4 +130,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ module Fog
|
|||
# * CallerReference [String] - Used to prevent replay, defaults to Time.now.to_i.to_s.
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateInvalidation.html
|
||||
|
||||
|
||||
def post_invalidation(distribution_id, paths, caller_reference = Time.now.to_i.to_s)
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?>'
|
||||
body << "<InvalidationBatch>"
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
# Create a new streaming distribution in CloudFront.
|
||||
#
|
||||
# @param options [Hash] Config for distribution.
|
||||
#
|
||||
#
|
||||
# REQUIRED:
|
||||
# * S3Origin [Hash]:
|
||||
# * DNSName [String] Origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'.
|
||||
|
@ -37,7 +37,7 @@ module Fog
|
|||
# * Prefix [String] - Prefix logs are stored with.
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateStreamingDistribution.html
|
||||
|
||||
|
||||
def post_streaming_distribution(options = {})
|
||||
options['CallerReference'] = Time.now.to_i.to_s
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?>'
|
||||
|
|
|
@ -51,7 +51,7 @@ module Fog
|
|||
# * TrustedSigners [Array] - Trusted signers.
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html
|
||||
|
||||
|
||||
def put_distribution_config(distribution_id, etag, options = {})
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?>'
|
||||
data << "<DistributionConfig xmlns=\"http://cloudfront.amazonaws.com/doc/#{@version}/\">"
|
||||
|
|
|
@ -9,7 +9,7 @@ module Fog
|
|||
#
|
||||
# @param distribution_id [String] - Id of distribution to update config for.
|
||||
# @param options [Hash] - Config for distribution.
|
||||
#
|
||||
#
|
||||
# REQUIRED:
|
||||
# * S3Origin [Hash]:
|
||||
# * DNSName [String] Origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'.
|
||||
|
@ -40,7 +40,7 @@ module Fog
|
|||
# * TrustedSigners [Array] - Trusted signers.
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/PutStreamingDistribution.html
|
||||
|
||||
|
||||
def put_streaming_distribution_config(distribution_id, etag, options = {})
|
||||
data = '<?xml version="1.0" encoding="UTF-8"?>'
|
||||
data << "<StreamingDistributionConfig xmlns=\"http://cloudfront.amazonaws.com/doc/#{@version}/\">"
|
||||
|
|
|
@ -6,7 +6,7 @@ module Fog
|
|||
require 'fog/aws/parsers/cloud_formation/create_stack'
|
||||
|
||||
# Create a stack.
|
||||
#
|
||||
#
|
||||
# * stack_name [String] Name of the stack to create.
|
||||
# * options [Hash]:
|
||||
# * TemplateBody [String] Structure containing the template body.
|
||||
|
@ -23,7 +23,7 @@ module Fog
|
|||
# * StackId [String] - Id of the new stack
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html
|
||||
|
||||
|
||||
def create_stack(stack_name, options = {})
|
||||
params = {
|
||||
'StackName' => stack_name,
|
||||
|
@ -73,7 +73,7 @@ module Fog
|
|||
if options['TimeoutInMinutes']
|
||||
params['TimeoutInMinutes'] = options['TimeoutInMinutes']
|
||||
end
|
||||
|
||||
|
||||
if options['Capabilities']
|
||||
params.merge!(Fog::AWS.indexed_param("Capabilities.member", [*options['Capabilities']]))
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ module Fog
|
|||
# @return [Excon::Response]
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DeleteStack.html
|
||||
|
||||
|
||||
def delete_stack(stack_name)
|
||||
request(
|
||||
'Action' => 'DeleteStack',
|
||||
|
|
|
@ -26,7 +26,7 @@ module Fog
|
|||
# * ResourceStatusReason [String] -
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DescribeStackEvents.html
|
||||
|
||||
|
||||
def describe_stack_events(stack_name, options = {})
|
||||
request({
|
||||
'Action' => 'DescribeStackEvents',
|
||||
|
|
|
@ -26,7 +26,7 @@ module Fog
|
|||
# * ResourceStatus [String] -
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DescribeStackResources.html
|
||||
|
||||
|
||||
def describe_stack_resources(options = {})
|
||||
request({
|
||||
'Action' => 'DescribeStackResources',
|
||||
|
|
|
@ -25,7 +25,7 @@ module Fog
|
|||
# * OutputValue [String] -
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DescribeStacks.html
|
||||
|
||||
|
||||
def describe_stacks(options = {})
|
||||
request({
|
||||
'Action' => 'DescribeStacks',
|
||||
|
|
|
@ -14,7 +14,7 @@ module Fog
|
|||
# * TemplateBody [String] - structure containing the template body (json)
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_GetTemplate.html
|
||||
|
||||
|
||||
def get_template(stack_name)
|
||||
request(
|
||||
'Action' => 'GetTemplate',
|
||||
|
|
|
@ -6,7 +6,7 @@ module Fog
|
|||
require 'fog/aws/parsers/cloud_formation/list_stack_resources'
|
||||
|
||||
# List stack resources.
|
||||
#
|
||||
#
|
||||
# @param options [Hash]
|
||||
# @option options StackName [String] Name of the stack to describe.
|
||||
#
|
||||
|
@ -22,7 +22,7 @@ module Fog
|
|||
#
|
||||
#
|
||||
# @see http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListStacks.html
|
||||
|
||||
|
||||
def list_stack_resources(options = {})
|
||||
request({
|
||||
'Action' => 'ListStackResources',
|
||||
|
|
|
@ -6,7 +6,7 @@ module Fog
|
|||
require 'fog/aws/parsers/cloud_formation/list_stacks'
|
||||
|
||||
# List stacks.
|
||||
#
|
||||
#
|
||||
# @param options [Hash]
|
||||
#
|
||||
# @return [Excon::Response]
|
||||
|
@ -23,7 +23,7 @@ module Fog
|
|||
#
|
||||
#
|
||||
# @see http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListStacks.html
|
||||
|
||||
|
||||
def list_stacks(options = {})
|
||||
request({
|
||||
'Action' => 'ListStacks',
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
# Delete a list of alarms
|
||||
# ==== Options
|
||||
# * AlarmNames<~Array>: A list of alarms to be deleted
|
||||
#
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
#
|
||||
|
|
|
@ -13,7 +13,7 @@ module Fog
|
|||
# * MaxRecords<~Integer>: The maximum number of alarm history records to retrieve
|
||||
# * NextToken<~String> The token returned by a previous call to indicate that there is more data available
|
||||
# * StartData<~DateTime>: The starting date to retrieve alarm history
|
||||
#
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
#
|
||||
|
@ -27,7 +27,7 @@ module Fog
|
|||
:parser => Fog::Parsers::AWS::CloudWatch::DescribeAlarmHistory.new
|
||||
}.merge(options))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,9 +8,9 @@ module Fog
|
|||
# Retrieves alarms with the specified names
|
||||
# ==== Options
|
||||
# * ActionPrefix<~String>: The action name prefix
|
||||
# * AlarmNamePrefix<~String>: The alarm name prefix.
|
||||
# * AlarmNamePrefix<~String>: The alarm name prefix.
|
||||
# AlarmNames cannot be specified if this parameter is specified
|
||||
# * AlarmNames<~Array>: A list of alarm names to retrieve information for.
|
||||
# * AlarmNames<~Array>: A list of alarm names to retrieve information for.
|
||||
# * MaxRecords<~Integer>: The maximum number of alarm descriptions to retrieve
|
||||
# * NextToken<~String>: The token returned by a previous call to indicate that there is more data available
|
||||
# * NextToken<~String> The token returned by a previous call to indicate that there is more data available
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module AWS
|
||||
class CloudWatch
|
||||
class Real
|
||||
class Real
|
||||
|
||||
require 'fog/aws/parsers/cloud_watch/describe_alarms_for_metric'
|
||||
|
||||
|
@ -33,7 +33,7 @@ module Fog
|
|||
:parser => Fog::Parsers::AWS::CloudWatch::DescribeAlarmsForMetric.new
|
||||
}.merge(options))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module AWS
|
||||
class CloudWatch
|
||||
class Real
|
||||
class Real
|
||||
|
||||
require 'fog/aws/parsers/cloud_watch/disable_alarm_actions'
|
||||
|
||||
|
@ -24,7 +24,7 @@ module Fog
|
|||
:parser => Fog::Parsers::AWS::CloudWatch::DisableAlarmActions.new
|
||||
}.merge(options))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module AWS
|
||||
class CloudWatch
|
||||
class Real
|
||||
class Real
|
||||
|
||||
require 'fog/aws/parsers/cloud_watch/enable_alarm_actions'
|
||||
|
||||
|
@ -24,7 +24,7 @@ module Fog
|
|||
:parser => Fog::Parsers::AWS::CloudWatch::EnableAlarmActions.new
|
||||
}.merge(options))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module AWS
|
||||
class CloudWatch
|
||||
class Real
|
||||
class Real
|
||||
|
||||
require 'fog/aws/parsers/cloud_watch/set_alarm_state'
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@ module Fog
|
|||
if options['PrivateIpAddresses'] && options['SecondaryPrivateIpAddressCount']
|
||||
raise Fog::Compute::AWS::Error.new("You may specify secondaryPrivateIpAddressCount or specific secondary private IP addresses, but not both.")
|
||||
end
|
||||
|
||||
|
||||
if private_ip_addresses = options.delete('PrivateIpAddresses')
|
||||
options.merge!(Fog::AWS.indexed_param('PrivateIpAddress.%d', [*private_ip_addresses]))
|
||||
end
|
||||
|
||||
|
||||
request({
|
||||
'Action' => 'AssignPrivateIpAddresses',
|
||||
'NetworkInterfaceId' => network_interface_id,
|
||||
|
@ -44,7 +44,7 @@ module Fog
|
|||
if options['PrivateIpAddresses'] && options['SecondaryPrivateIpAddressCount']
|
||||
raise Fog::Compute::AWS::Error.new("You may specify secondaryPrivateIpAddressCount or specific secondary private IP addresses, but not both.")
|
||||
end
|
||||
|
||||
|
||||
response = Excon::Response.new
|
||||
response.status = 200
|
||||
response.body = {
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
# Associate an elastic IP address with an instance
|
||||
#
|
||||
# ==== Parameters
|
||||
# * instance_id<~String> - Id of instance to associate address with (conditional)
|
||||
# * instance_id<~String> - Id of instance to associate address with (conditional)
|
||||
# * public_ip<~String> - Public ip to assign to instance (conditional)
|
||||
# * network_interface_id<~String> - Id of a nic to associate address with (required in a vpc instance with more than one nic) (conditional)
|
||||
# * allocation_id<~String> - Allocation Id to associate address with (vpc only) (conditional)
|
||||
|
|
|
@ -4,10 +4,10 @@ module Fog
|
|||
class Real
|
||||
|
||||
require 'fog/aws/parsers/compute/basic'
|
||||
#
|
||||
#
|
||||
#
|
||||
# ==== Parameters
|
||||
# * dhcp_options_id<~String> - The ID of the DHCP options you want to associate with the VPC, or "default" if you want the VPC
|
||||
# * dhcp_options_id<~String> - The ID of the DHCP options you want to associate with the VPC, or "default" if you want the VPC
|
||||
# to use no DHCP options.
|
||||
# * vpc_id<~String> - The ID of the VPC
|
||||
#
|
||||
|
|
|
@ -56,7 +56,7 @@ module Fog
|
|||
|
||||
def add_route_association(routeTableId, subnetId, main=nil)
|
||||
response = {
|
||||
"routeTableAssociationId" => "rtbassoc-#{Fog::Mock.random_hex(8)}",
|
||||
"routeTableAssociationId" => "rtbassoc-#{Fog::Mock.random_hex(8)}",
|
||||
"routeTableId" => routeTableId,
|
||||
"subnetId" => nil,
|
||||
"main" => false
|
||||
|
@ -66,9 +66,9 @@ module Fog
|
|||
else
|
||||
response['subnetId'] = subnetId
|
||||
end
|
||||
response
|
||||
response
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -29,7 +29,7 @@ module Fog
|
|||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class Mock
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ module Fog
|
|||
params = {}
|
||||
block_device_mappings = options[:block_device_mappings] || []
|
||||
|
||||
params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.DeviceName', block_device_mappings.map{|mapping| mapping['DeviceName']})
|
||||
params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.DeviceName', block_device_mappings.map{|mapping| mapping['DeviceName']})
|
||||
params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.NoDevice', block_device_mappings.map{|mapping| mapping['NoDevice']})
|
||||
params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.VirtualName', block_device_mappings.map{|mapping| mapping['VirtualName']})
|
||||
params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.Ebs.SnapshotId', block_device_mappings.map{|mapping| mapping['Ebs.SnapshotId']})
|
||||
|
@ -45,16 +45,16 @@ module Fog
|
|||
end
|
||||
|
||||
class Mock
|
||||
|
||||
|
||||
# Usage
|
||||
#
|
||||
#
|
||||
# AWS[:compute].create_image("i-ac65ee8c", "test", "something")
|
||||
#
|
||||
|
||||
|
||||
def create_image(instance_id, name, description, no_reboot = false, options = {})
|
||||
params = {}
|
||||
block_device_mappings = options[:block_device_mappings] || []
|
||||
params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.DeviceName', block_device_mappings.map{|mapping| mapping['DeviceName']})
|
||||
params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.DeviceName', block_device_mappings.map{|mapping| mapping['DeviceName']})
|
||||
params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.NoDevice', block_device_mappings.map{|mapping| mapping['NoDevice']})
|
||||
params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.VirtualName', block_device_mappings.map{|mapping| mapping['VirtualName']})
|
||||
params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.Ebs.SnapshotId', block_device_mappings.map{|mapping| mapping['Ebs.SnapshotId']})
|
||||
|
|
|
@ -16,8 +16,8 @@ module Fog
|
|||
# * 'requestId'<~String> - Id of request
|
||||
# * 'internetGateway'<~Array>:
|
||||
# * 'attachmentSet'<~Array>: A list of VPCs attached to the Internet gateway
|
||||
# * 'vpcId'<~String> - The ID of the VPC the Internet gateway is attached to.
|
||||
# * 'state'<~String> - The current state of the attachment.
|
||||
# * 'vpcId'<~String> - The ID of the VPC the Internet gateway is attached to.
|
||||
# * 'state'<~String> - The current state of the attachment.
|
||||
# * 'tagSet'<~Array>: Tags assigned to the resource.
|
||||
# * 'key'<~String> - Tag's key
|
||||
# * 'value'<~String> - Tag's value
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue