bin/omf6 in nitos_testbed_rc-2.0.5 vs bin/omf6 in nitos_testbed_rc-2.0.6
- old
+ new
@@ -423,13 +423,18 @@
fcontroller.create(:imagezip_client, {hrn: 'imagezip client', port: port, node_topic: "#{node.to_s}"}) do |reply_msg|
if reply_msg.success?
client = reply_msg.resource
client.on_subscribed do
client.on_message do |client_msg|
+ puts "==== #{client_msg.inspect}"
if client_msg.operation == :inform
if client_msg.read_property("event") == "STDOUT"
# print "#{client_msg.read_property("msg")}"
+ elsif client_msg.read_property("event") == 'BAD_FORMAT'
+ puts "ERROR: #{client_msg.read_property("msg")}"
+ cm_controller.configure(state: {node: node.to_sym, status: :stop, last_action: options[:last_action]})
+ shut_down(comm)
elsif client_msg.read_property("event") == "EXIT"
stop_saving()
puts "INFO:"
if client_msg.read_property("msg")
client_msg.read_property("msg").split("\n").each do |line|
@@ -495,9 +500,11 @@
else
# puts "INFO: Trying to #{options[:last_action]} node '#{client_msg.read_property("node")}' out of PXE."
cm_controller.configure(state: {node: node.to_sym, status: :start_without_pxe, last_action: options[:last_action]})
end
end
+ elsif client_msg.operation == :error
+ puts "aaa"
end
end
end
else
puts "ERROR: Imagezip Client resource creation failed - #{reply_msg[:reason]}"
\ No newline at end of file