Class: CPEE::Instantiation::HandleInstance
- Inherits:
-
Riddl::Implementation
- Object
- Riddl::Implementation
- CPEE::Instantiation::HandleInstance
- Includes:
- Helpers
- Defined in:
- lib/cpee/instantiation.rb
Overview
}}}
Instance Method Summary collapse
Methods included from Helpers
#handle_data, #handle_endpoints
Instance Method Details
#response ⇒ Object
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/cpee/instantiation.rb', line 260 def response cpee = @h['X_CPEE'] || @a[0] selfurl = @a[1] cblist = @a[2] instance = @p[1].value srv = Riddl::Client.new(cpee, cpee + "?riddl-description") res = srv.resource("/#{instance}/properties/values/attributes/uuid") status, response = res.get if status >= 200 && status < 300 uuid = XML::Smart::string(response.first.value).root.text handle_data cpee, instance, @p[2]&.value handle_waiting cpee, instance, uuid, @p[0].value, selfurl, cblist handle_starting cpee, instance, @p[0].value return Riddl::Parameter::Simple.new("url",cpee + instance) end end |