Class: Aws::Ec2::QEc2SubnetsParser

Inherits:
AwsParser
  • Object
show all
Defined in:
lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb

Overview

:nodoc

Instance Method Summary collapse

Constructor Details

#initialize(wrapper, opts = {}) ⇒ QEc2SubnetsParser

Returns a new instance of QEc2SubnetsParser.



261
262
263
264
# File 'lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb', line 261

def initialize(wrapper, opts = {})
  super(opts)
  @wrapper = wrapper
end

Instance Method Details

#resetObject



289
290
291
# File 'lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb', line 289

def reset
  @result = []
end

#tagend(name) ⇒ Object



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# 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) ⇒ Object



266
267
268
# File 'lib/deltacloud/drivers/ec2/aws_vpc_monkey_patch.rb', line 266

def tagstart(name, attribute)
  @subnet = {} if name == @wrapper
end