changes
This commit is contained in:
parent
09d2c141f3
commit
e707160fd1
|
|
@ -15,17 +15,14 @@ function node_start(child)
|
||||||
local nodename = child.attr.nodename
|
local nodename = child.attr.nodename
|
||||||
local args = child.attr.args --may be nil
|
local args = child.attr.args --may be nil
|
||||||
|
|
||||||
local msg = "https://"..host.."/_django_App_start?nodetype=".."\""..nodetype.."\"".."?nodename=".."\""..nodename.."\""
|
local msg = "https://"..host.."/persistmods/start?nodetype=".."\""..nodetype.."\"".."&nodename=".."\""..nodename.."\""
|
||||||
|
|
||||||
if (args ~= nil) then
|
if (args ~= nil) then
|
||||||
msg = msg .."?args=\""..args.."\""
|
msg = msg .."&args=\""..args.."\""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local response, code, headers = easyhttp.request(msg)
|
local response, code, headers = easyhttp.request(msg)
|
||||||
#print(response)
|
|
||||||
#print(code)
|
|
||||||
#print(headers)
|
|
||||||
|
|
||||||
print( msg)
|
print( msg)
|
||||||
--send & handle resp
|
--send & handle resp
|
||||||
|
|
@ -37,17 +34,20 @@ function node_execute(child)
|
||||||
local nodename=child.attr.nodename
|
local nodename=child.attr.nodename
|
||||||
local host=live_nodes[nodename]
|
local host=live_nodes[nodename]
|
||||||
|
|
||||||
print ("https://"..host.."/_django_App_execute?nodename=".."\""..nodename.."\"")
|
print ("https://"..host.."/persistmods/execute?nodename=".."\""..nodename.."\"")
|
||||||
local response, code, headers = easyhttp.request(msg)
|
local response, code, headers = easyhttp.request("https://"..host.."/persistmods/execute?nodename=".."\""..nodename.."\"")
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function node_get_logs(child)
|
function node_get_logs(child)
|
||||||
for a, b in pairs(live_nodes) do
|
for a, b in pairs(live_nodes) do
|
||||||
print ("https://"..b.."/_django_App_get_logs?nodename=".."\""..a.."\"")
|
msg="https://"..b.."//persistmods/get_logs?nodename=".."\""..a.."\""
|
||||||
|
local response, code, headers = easyhttp.request(msg)
|
||||||
|
print)msg)
|
||||||
end
|
end
|
||||||
local file = io.open("logfil.txt", "w") -- "w" means write (overwrite)
|
local file = io.open("logfil.txt", "w") -- "w" means write (overwrite)
|
||||||
file:write("Test OK")
|
file:write(response)
|
||||||
file:close()
|
file:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -61,8 +61,8 @@ end
|
||||||
function node_close(child)
|
function node_close(child)
|
||||||
local nodename=child.attr.nodename
|
local nodename=child.attr.nodename
|
||||||
local host=live_nodes[nodename]
|
local host=live_nodes[nodename]
|
||||||
print ("https://"..host.."/_django_App_close?nodename=".."\""..nodename.."\"")
|
print ("https://"..host.."/persistsmods/stop?nodename=".."\""..nodename.."\"")
|
||||||
local response, code, headers = easyhttp.request(msg)
|
local response, code, headers = easyhttp.request("https://"..host.."/persistsmods/stop?nodename=".."\""..nodename.."\"")
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<notetool-node-start host="10.137.0.13" nodetype="default" nodename="node1" args="host2 node2" />
|
<notetool-node-start host="10.137.0.13:8000" nodetype="default" nodename="node1" args="host2 node2" />
|
||||||
<notetool-node-start host="10.137.0.13" nodetype="default" nodename="node2" />
|
<notetool-node-start host="10.137.0.13:8000" nodetype="default" nodename="node2" />
|
||||||
<notetool-node-execute nodename="node1" />
|
<notetool-node-execute nodename="node1" />
|
||||||
<notetool-get-logs />
|
<notetool-get-logs />
|
||||||
<nodetool-check-test />
|
<nodetool-check-test />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue