2010-05-24 13:29:01 -04:00
|
|
|
module Fog
|
|
|
|
module Parsers
|
|
|
|
module Bluebox
|
|
|
|
|
2010-06-02 11:44:51 -04:00
|
|
|
class GetTemplates < Fog::Parsers::Base
|
2010-05-24 13:29:01 -04:00
|
|
|
|
|
|
|
def reset
|
|
|
|
@template = {}
|
2010-06-02 11:44:51 -04:00
|
|
|
@response = { 'templates' => [] }
|
2010-05-24 13:29:01 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def end_element(name)
|
|
|
|
case name
|
|
|
|
when 'public'
|
|
|
|
@template[name] = @value
|
|
|
|
when 'id'
|
|
|
|
@template[name] = @value
|
|
|
|
when 'description'
|
|
|
|
@template[name] = @value
|
|
|
|
when 'record'
|
2010-06-02 11:44:51 -04:00
|
|
|
@response['templates'] << @template
|
2010-05-24 13:29:01 -04:00
|
|
|
@template = {}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|