Commit 5a9f4c64c01afb87e6d7146b36bc4656a4eb72f0

Authored by Alexis Koralewski
1 parent 14b16a64
Exists in dev

add is_active field for agents in tnc obsconfig

CHANGELOG
  1 +25-11-2022 (AKo): v0.6.13.0
  2 + - Add is_active field for agents in tnc obsconfig
  3 +
1 4 24-11-2022 (EP): v0.6.12.0
2 5 - Added tooltip to Agent specific commands
3 6 - get_all_cmds => returns also tooltips
... ...
VERSION
1   -0.6.12.0
2 1 \ No newline at end of file
  2 +0.6.13.0
3 3 \ No newline at end of file
... ...
config/schemas/schema_observatory-2.0.yml
... ... @@ -44,6 +44,9 @@ schema;schema_AGENT_DEVICE:
44 44 # if path_data_root is not defined, the default value will be os.environ['PROJECT_ROOT_PATH']
45 45 path_data_root:
46 46 type: str
  47 + is_active:
  48 + type: bool
  49 + required: False
47 50  
48 51 schema;schema_AGENT:
49 52 type: map
... ... @@ -62,6 +65,9 @@ schema;schema_AGENT:
62 65 # if path_data_root is not defined, the default value will be os.environ['PROJECT_ROOT_PATH']
63 66 path_data_root:
64 67 type: str
  68 + is_active:
  69 + type: bool
  70 + required: False
65 71  
66 72 schema;schema_ALBUMS:
67 73 type: seq
... ...
src/core/pyros_django/agent/AgentSST.py
... ... @@ -166,7 +166,8 @@ class AgentSST(Agent):
166 166 continue
167 167 agent_informations = obs_config.get_agent_information(obs_config.unit_name,agent)
168 168 protocol = agent_informations.get("protocol")
169   - if protocol:
  169 + is_active = agent_informations.get("is_active",True)
  170 + if protocol and is_active == True:
170 171 protocol_folder_abs_path = os.path.join(self.PROJECT_ROOT_PATH, os.path.dirname(protocol))
171 172  
172 173 protocol_script_name = protocol.split("/")[-1]
... ...