class Ec2::Ec2::QEc2SubnetsParser

Public Class Methods

new(wrapper, opts = {}) click to toggle source
Calls superclass method
# File lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb, line 261
def initialize(wrapper, opts = {})
  super(opts)
  @wrapper = wrapper
end

Public Instance Methods

reset() click to toggle source
# File lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb, line 289
def reset
  @result = []
end
tagend(name) click to toggle source
# File lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb, line 270
def tagend(name)
  case name
  when 'subnetId' then
    @subnet[:subnet_id] = @text
  when 'state' then
    @subnet[:state] = @text
  when 'vpcId' then
    @subnet[:vpc_id] = @text
  when 'cidrBlock' then
    @subnet[:cidr_block] = @text
  when 'availableIpAddressCount' then
    @subnet[:available_ip_address_count] = @text
  when 'availabilityZone' then
    @subnet[:availability_zone] = @text
  when @wrapper
    @result << @subnet
  end
end
tagstart(name, attribute) click to toggle source
# File lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb, line 266
def tagstart(name, attribute)
  @subnet = {} if name == @wrapper
end