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 :dhcp_options_id, :aliases => 'dhcpOptionsId'
|
||||||
attribute :tags, :aliases => 'tagSet'
|
attribute :tags, :aliases => 'tagSet'
|
||||||
attribute :tenancy, :aliases => 'instanceTenancy'
|
attribute :tenancy, :aliases => 'instanceTenancy'
|
||||||
|
attribute :is_default, :aliases => 'isDefault'
|
||||||
|
|
||||||
def initialize(attributes={})
|
def initialize(attributes={})
|
||||||
self.dhcp_options_id ||= "default"
|
self.dhcp_options_id ||= "default"
|
||||||
|
@ -21,6 +22,11 @@ module Fog
|
||||||
state == 'available'
|
state == 'available'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def is_default?
|
||||||
|
require :is_default
|
||||||
|
is_default
|
||||||
|
end
|
||||||
|
|
||||||
# Removes an existing vpc
|
# Removes an existing vpc
|
||||||
#
|
#
|
||||||
# vpc.destroy
|
# vpc.destroy
|
||||||
|
|
|
@ -30,8 +30,10 @@ module Fog
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
case name
|
case name
|
||||||
when 'vpcId', 'state', 'cidrBlock', 'dhcpOptionsId', 'instanceTenancy', 'isDefault'
|
when 'vpcId', 'state', 'cidrBlock', 'dhcpOptionsId', 'instanceTenancy'
|
||||||
@vpc[name] = value
|
@vpc[name] = value
|
||||||
|
when 'isDefault'
|
||||||
|
@vpc['isDefault'] = value == 'true'
|
||||||
when 'item'
|
when 'item'
|
||||||
@response['vpcSet'] << @vpc
|
@response['vpcSet'] << @vpc
|
||||||
@vpc = { 'tagSet' => {} }
|
@vpc = { 'tagSet' => {} }
|
||||||
|
|
Loading…
Reference in a new issue