Class/Module Index [+]

Quicksearch

Fog::Parsers::AWS::AutoScaling::DescribeLaunchConfigurations

Public Instance Methods

end_element(name) click to toggle source
# File lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb, line 38
def end_element(name)
  case name
  when 'member'
    if @in_block_device_mappings
      @launch_configuration['BlockDeviceMappings'] << @block_device_mapping
      reset_block_device_mapping
    elsif @in_security_groups
      @launch_configuration['SecurityGroups'] << value
    else
      @results['LaunchConfigurations'] << @launch_configuration
      reset_launch_configuration
    end

  when 'DeviceName', 'VirtualName'
    @block_device_mapping[name] = value

  when 'SnapshotId', 'VolumeSize'
    @ebs[name] = value
  when 'Ebs'
    @block_device_mapping[name] = @ebs
    reset_ebs

  when 'Enabled'
    @launch_configuration['InstanceMonitoring'][name] = (value == 'true')

  when 'CreatedTime'
    @launch_configuration[name] = Time.parse(value)
  when 'ImageId', 'InstanceType', 'KeyName'
    @launch_configuration[name] = value
  when 'LaunchConfigurationARN', 'LaunchConfigurationName'
    @launch_configuration[name] = value
  when 'KernelId', 'RamdiskId', 'UserData'
    @launch_configuration[name] = value

  when 'BlockDeviceMappings'
    @in_block_device_mappings = false
  when 'LaunchConfigurations'
    @in_launch_configurations = false
  when 'SecurityGroups'
    @in_security_groups = false

  when 'NextToken'
    @results[name] = value

  when 'RequestId'
    @response['ResponseMetadata'][name] = value

  when 'DescribeLaunchConfigurationsResponse'
    @response['DescribeLaunchConfigurationsResult'] = @results
  end
end
reset() click to toggle source
# File lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb, line 8
def reset
  reset_launch_configuration
  reset_block_device_mapping
  reset_ebs
  @results = { 'LaunchConfigurations' => [] }
  @response = { 'DescribeLaunchConfigurationsResult' => {}, 'ResponseMetadata' => {} }
end
reset_block_device_mapping() click to toggle source
# File lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb, line 20
def reset_block_device_mapping
  @block_device_mapping = {}
end
reset_ebs() click to toggle source
# File lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb, line 24
def reset_ebs
  @ebs = {}
end
reset_launch_configuration() click to toggle source
# File lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb, line 16
def reset_launch_configuration
  @launch_configuration = { 'BlockDeviceMappings' => [], 'InstanceMonitoring' => {}, 'SecurityGroups' => [] }
end
start_element(name, attrs = []) click to toggle source
# File lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb, line 28
def start_element(name, attrs = [])
  super
  case name
  when 'BlockDeviceMappings'
    @in_block_device_mappings = true
  when 'SecurityGroups'
    @in_security_groups = true
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.