Commit 92583b558b1d512990fbf51419b76dc42946599a
1 parent
712d14a5
Exists in
dev
update pyros start command to enable run of AD
Showing
1 changed file
with
6 additions
and
4 deletions
Show diff stats
pyros.py
... | ... | @@ -84,7 +84,8 @@ AGENTS = { |
84 | 84 | "A_Basic": "majordome/agent", |
85 | 85 | "A_Triton": "majordome/agent", |
86 | 86 | "A_MCO":"majordome/agent", |
87 | - "A_Majordome":"majordome/agent" | |
87 | + "A_Majordome":"majordome/agent", | |
88 | + "AD_PLC":"env_monitor" | |
88 | 89 | } |
89 | 90 | # AGENTS = ["agentX", "webserver", "monitoring", "majordome", "scheduler", "alert_manager"] |
90 | 91 | # AGENTS = ["all", "webserver", "monitoring", "majordome", "scheduler", "alert"] |
... | ... | @@ -1009,8 +1010,8 @@ def start(agent: str, configfile: str, observatory: str, unit: str, computer_hos |
1009 | 1010 | current_dir = os.getcwd() |
1010 | 1011 | |
1011 | 1012 | # OLD format agents: majordome, monitoring, alert... |
1012 | - cmd = "start_agent.py " + agent_name + " " + configfile | |
1013 | - | |
1013 | + #cmd = "start_agent.py " + agent_name + " " + configfile | |
1014 | + cmd = "" | |
1014 | 1015 | # Agent "webserver" |
1015 | 1016 | if agent_name == "webserver": |
1016 | 1017 | cmd = "manage.py runserver 127.0.0.1:8080" |
... | ... | @@ -1022,7 +1023,7 @@ def start(agent: str, configfile: str, observatory: str, unit: str, computer_hos |
1022 | 1023 | # if not test_mode(): execProcessFromVenv("start_agent.py " + agent_name + " " + configfile) |
1023 | 1024 | |
1024 | 1025 | # Agent "agentM", "agentA", "agentB", "agentX", ... |
1025 | - elif agent_name.startswith("A_") or agent_name.startswith("A_"): | |
1026 | + elif agent_name.startswith("A_") or agent_name.startswith("AD_"): | |
1026 | 1027 | # Run agent without actual commands sent to devices (FOR_REAL=False) |
1027 | 1028 | # agentX.run(FOR_REAL=True) |
1028 | 1029 | ''' |
... | ... | @@ -1361,6 +1362,7 @@ def change_dir(path): |
1361 | 1362 | def _check_agent(agent): |
1362 | 1363 | # Check that agent exists |
1363 | 1364 | if agent != "all" and agent not in AGENTS.keys(): |
1365 | + | |
1364 | 1366 | # Check if multiple agents: |
1365 | 1367 | print("This agent does not exist") |
1366 | 1368 | print("Here is the allowed list of agents:") | ... | ... |