class Object
Constants
- Experiment
Public Instance Methods
create_app(testbed)
click to toggle source
Copyright © 2012 National ICT Australia Limited (NICTA). This software may be used and distributed solely under the terms of the MIT license (License). You should find a copy of the License in LICENSE.TXT or at opensource.org/licenses/MIT. By downloading or using this software you accept the terms and the liability disclaimer in the License.
# File lib/omf_ec/backward/exp/testbed.rb, line 6 def create_app(testbed) testbed.create(:application, binary_path: @cmd) do |reply| if reply.success? app = reply.resource app.on_subscribed do app.configure(state: :running) app.on_inform do |m| case m.itype when 'STATUS' if m[:status_type] == 'APP_EVENT' after(2) { OmfCommon.comm.disconnect ; OmfCommon.eventloop.stop } if m[:event] =~ /EXIT/ info m[:msg] if m[:msg] else m.each_property do |k, v| info "#{k} => #{v.strip}" unless v.nil? end end when 'WARN' warn m[:reason], m.src when 'ERROR' error m[:reason], m.src end end end else error reply[:reason] end end end