2011-05-23 21:17:16 -04:00
|
|
|
module Fog
|
|
|
|
module Vcloud
|
|
|
|
class Compute
|
|
|
|
class CatalogItem < Fog::Vcloud::Model
|
|
|
|
|
|
|
|
identity :href, :aliases => :Href
|
2012-01-30 09:24:14 -05:00
|
|
|
attribute :links, :aliases => :Link, :type => :array
|
2011-05-23 21:17:16 -04:00
|
|
|
ignore_attributes :xmlns, :xmlns_i, :xmlns_xsi, :xmlns_xsd
|
|
|
|
|
|
|
|
attribute :type
|
|
|
|
attribute :name
|
|
|
|
attribute :entity, :aliases => :Entity
|
|
|
|
attribute :link, :aliases => :Link
|
|
|
|
attribute :property, :aliases => :Property
|
|
|
|
|
|
|
|
def customization_options
|
|
|
|
load_unless_loaded!
|
2012-12-22 18:22:50 -05:00
|
|
|
if data = service.get_customization_options( link[:href] ).body
|
2011-05-23 21:17:16 -04:00
|
|
|
data.delete_if { |key, value| [:xmlns_i, :xmlns].include?(key) }
|
|
|
|
data
|
|
|
|
else
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|