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

38 lines
776 B
Ruby
Raw Normal View History

module Fog
module Parsers
module Vcloud
class GetVdc < Fog::Parsers::Vcloud::Base
#WARNING: Incomplete
#Based off of:
#vCloud API Guide v0.9 - Page 27
def reset
@response = Struct::VcloudVdc.new([])
end
def start_element(name, attributes)
@value = ''
case name
when 'Link'
@response.links << generate_link(attributes)
when 'Vdc'
handle_root(attributes)
end
end
def end_element(name)
case name
when "AllocationModel"
@response.allocation_model = @value
when "Description"
@response.description = @value
end
end
end
end
end
end