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,7 +84,8 @@ AGENTS = { | ||
84 | "A_Basic": "majordome/agent", | 84 | "A_Basic": "majordome/agent", |
85 | "A_Triton": "majordome/agent", | 85 | "A_Triton": "majordome/agent", |
86 | "A_MCO":"majordome/agent", | 86 | "A_MCO":"majordome/agent", |
87 | - "A_Majordome":"majordome/agent" | 87 | + "A_Majordome":"majordome/agent", |
88 | + "AD_PLC":"env_monitor" | ||
88 | } | 89 | } |
89 | # AGENTS = ["agentX", "webserver", "monitoring", "majordome", "scheduler", "alert_manager"] | 90 | # AGENTS = ["agentX", "webserver", "monitoring", "majordome", "scheduler", "alert_manager"] |
90 | # AGENTS = ["all", "webserver", "monitoring", "majordome", "scheduler", "alert"] | 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,8 +1010,8 @@ def start(agent: str, configfile: str, observatory: str, unit: str, computer_hos | ||
1009 | current_dir = os.getcwd() | 1010 | current_dir = os.getcwd() |
1010 | 1011 | ||
1011 | # OLD format agents: majordome, monitoring, alert... | 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 | # Agent "webserver" | 1015 | # Agent "webserver" |
1015 | if agent_name == "webserver": | 1016 | if agent_name == "webserver": |
1016 | cmd = "manage.py runserver 127.0.0.1:8080" | 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,7 +1023,7 @@ def start(agent: str, configfile: str, observatory: str, unit: str, computer_hos | ||
1022 | # if not test_mode(): execProcessFromVenv("start_agent.py " + agent_name + " " + configfile) | 1023 | # if not test_mode(): execProcessFromVenv("start_agent.py " + agent_name + " " + configfile) |
1023 | 1024 | ||
1024 | # Agent "agentM", "agentA", "agentB", "agentX", ... | 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 | # Run agent without actual commands sent to devices (FOR_REAL=False) | 1027 | # Run agent without actual commands sent to devices (FOR_REAL=False) |
1027 | # agentX.run(FOR_REAL=True) | 1028 | # agentX.run(FOR_REAL=True) |
1028 | ''' | 1029 | ''' |
@@ -1361,6 +1362,7 @@ def change_dir(path): | @@ -1361,6 +1362,7 @@ def change_dir(path): | ||
1361 | def _check_agent(agent): | 1362 | def _check_agent(agent): |
1362 | # Check that agent exists | 1363 | # Check that agent exists |
1363 | if agent != "all" and agent not in AGENTS.keys(): | 1364 | if agent != "all" and agent not in AGENTS.keys(): |
1365 | + | ||
1364 | # Check if multiple agents: | 1366 | # Check if multiple agents: |
1365 | print("This agent does not exist") | 1367 | print("This agent does not exist") |
1366 | print("Here is the allowed list of agents:") | 1368 | print("Here is the allowed list of agents:") |