Skip to content
Snippets Groups Projects
Commit 199c746c authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

In Config Server add_tag, add agent to known agent list if yet unknwon

parent cf0065af
No related branches found
No related tags found
1 merge request!27V0 4 2 mfles agent fixes
......@@ -220,6 +220,7 @@ class EcsConfigurationService:
reply_msg.payload = { "Done": "" }
if cmd_msg.args[0] not in configurations:
configurations[ cmd_msg.args[0] ] = {}
all_agents.append( cmd_msg.args[0] )
reply_msg.payload = { "Done": " also added previously unknown agent" }
configurations[ cmd_msg.args[0] ][ cmd_msg.args[1] ] = cmd_msg.args[2]
elif "rem_tag" == cmd_msg.command:
......@@ -232,6 +233,7 @@ class EcsConfigurationService:
reply_msg.return_code = TAG_OK
reply_msg.payload = { "Done": "" }
del configurations[ cmd_msg.args[0] ][ cmd_msg.args[1] ]
# For now do not remove "known agent" even if no tag remaining for it
else:
# Agent or Tag not found (never there or already removed)
reply_msg.payload = { "Agent or Tag not found!": ("[%s][%s]" % ( cmd_msg.args[0],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment