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