lib/splash/orchestrator/grammar.rb in prometheus-splash-0.4.2 vs lib/splash/orchestrator/grammar.rb in prometheus-splash-0.4.3

- old
+ new

@@ -9,11 +9,11 @@ VERBS=[:ping,:list_commands,:execute_command,:ack_command, :shutdown] def shutdown - self.terminate + terminate end def ping(payload) return "Pong : #{payload[:hostname]} !" end @@ -22,11 +22,11 @@ def list_commands return get_config.commands end def ack_command(payload) - return self.execute command: payload[:name], ack: true + return execute command: payload[:name], ack: true end def execute_command(payload) unless get_config.commands.include? payload[:name].to_sym @@ -36,10 +36,10 @@ if payload.include? :schedule then sched,value = payload[:schedule].flatten @log.schedule "remote call command #{payload[:name]}, scheduling : #{sched.to_s} #{value}" @server.send sched,value do @log.trigger "Executing Scheduled command #{payload[:name]} for Scheduling : #{sched.to_s} #{value}" - self.execute command: payload[:name] + execute command: payload[:name] end return { :case => :quiet_exit } else @log.info "Execute direct command" res = self.execute command: payload[:name]