2011-05-23 21:17:16 -04:00
|
|
|
module Fog
|
|
|
|
module Vcloud
|
|
|
|
class Compute
|
|
|
|
class Network < Fog::Vcloud::Model
|
|
|
|
|
2011-10-05 05:58:50 -04:00
|
|
|
identity :href, :aliases => :Href
|
2012-01-30 09:24:14 -05:00
|
|
|
attribute :links, :aliases => :Link, :type => :array
|
|
|
|
ignore_attributes :xmlns, :xmlns_i, :xmlns_xsi, :xmlns_xsd
|
2011-05-23 21:17:16 -04:00
|
|
|
|
|
|
|
attribute :name, :aliases => :Name
|
|
|
|
|
2011-10-05 05:58:50 -04:00
|
|
|
attribute :description, :aliases => :Description
|
2011-09-27 10:21:29 -04:00
|
|
|
attribute :configuration, :aliases => :Configuration
|
2011-10-17 11:46:06 -04:00
|
|
|
attribute :provider_info, :aliases => :ProviderInfo
|
2011-05-23 21:17:16 -04:00
|
|
|
|
2011-10-19 04:05:14 -04:00
|
|
|
def parent_network
|
|
|
|
return nil if configuration[:ParentNetwork].nil?
|
2012-01-30 09:24:14 -05:00
|
|
|
@parent_network ||= connection.get_network(configuration[:ParentNetwork][:href])
|
2011-10-19 04:05:14 -04:00
|
|
|
end
|
2011-05-23 21:17:16 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|