Class: CPEE::Info

Inherits:
Riddl::Implementation
  • Object
show all
Defined in:
lib/cpee/implementation.rb

Overview

}}}

Instance Method Summary collapse

Instance Method Details

#responseObject

{{{



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/cpee/implementation.rb', line 237

def response
  opts = @a[0]
  id = @r[0].to_i
  unless opts[:redis].exists?("instance:#{id}/state")
    @status = 404
    return
  end
  Riddl::Parameter::Complex.new("info","text/xml") do
    i = XML::Smart::string "      <info instance='\#{id}'>\n        <notifications/>\n        <properties/>\n        <callbacks/>\n      </info>\n    END\n    i.to_s\n  end\nend\n"