1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Add subnets collection to the network model.

This commit is contained in:
Rupak Ganguly 2013-05-30 15:34:07 -04:00
parent 14b5ef24b9
commit ef4726441a

View file

@ -10,7 +10,6 @@ module Fog
attribute :name
attribute :tenant_id
attribute :status
attribute :subnets
attribute :shared
attribute :admin_state_up
attribute :router_external, :aliases => 'router:external'
@ -25,6 +24,15 @@ module Fog
self.status == 'ACTIVE'
end
def subnets
@subnets ||= begin
Fog::HP::Network::Subnets.new({
:service => service,
:filters => {:network_id => self.id}
})
end
end
def save
identity ? update : create
end