mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
Add attribute is default in vpc
This commit is contained in:
parent
09a405cc14
commit
c4dab2c58d
2 changed files with 9 additions and 1 deletions
|
@ -9,6 +9,7 @@ module Fog
|
|||
attribute :dhcp_options_id, :aliases => 'dhcpOptionsId'
|
||||
attribute :tags, :aliases => 'tagSet'
|
||||
attribute :tenancy, :aliases => 'instanceTenancy'
|
||||
attribute :is_default, :aliases => 'isDefault'
|
||||
|
||||
def initialize(attributes={})
|
||||
self.dhcp_options_id ||= "default"
|
||||
|
@ -21,6 +22,11 @@ module Fog
|
|||
state == 'available'
|
||||
end
|
||||
|
||||
def is_default?
|
||||
require :is_default
|
||||
is_default
|
||||
end
|
||||
|
||||
# Removes an existing vpc
|
||||
#
|
||||
# vpc.destroy
|
||||
|
|
|
@ -30,8 +30,10 @@ module Fog
|
|||
end
|
||||
else
|
||||
case name
|
||||
when 'vpcId', 'state', 'cidrBlock', 'dhcpOptionsId', 'instanceTenancy', 'isDefault'
|
||||
when 'vpcId', 'state', 'cidrBlock', 'dhcpOptionsId', 'instanceTenancy'
|
||||
@vpc[name] = value
|
||||
when 'isDefault'
|
||||
@vpc['isDefault'] = value == 'true'
|
||||
when 'item'
|
||||
@response['vpcSet'] << @vpc
|
||||
@vpc = { 'tagSet' => {} }
|
||||
|
|
Loading…
Reference in a new issue