@@ -68,17 +68,6 @@ def _get_local_instances(self):
68
68
f'likely syntax error: { e } ' )
69
69
return returnValue ((False , instances , warnings ))
70
70
71
- # Scan for agent scripts in (deprecated) script registry
72
- try :
73
- for p in hc .agent_paths :
74
- if p not in sys .path :
75
- sys .path .append (p )
76
- site_config .scan_for_agents ()
77
- except Exception as e :
78
- warnings .append ('Failed to scan for old plugin agents -- '
79
- f'likely plugin config problem: { e } ' )
80
- return returnValue ((False , instances , warnings ))
81
-
82
71
# Gather managed items from site config.
83
72
for inst in hc .instances :
84
73
if inst ['instance-id' ] in instances :
@@ -317,18 +306,13 @@ def same_base_class(a, b):
317
306
continue
318
307
if instance ['management' ] == 'host' :
319
308
cls = instance ['agent_class' ]
320
- # Check for the agent class in the plugin system;
321
- # then check the (deprecated) agent script registry.
309
+ # Check for the agent class in the plugin system
322
310
if cls in agent_plugins :
323
311
session .add_message (f'Found plugin for "{ cls } "' )
324
312
instance ['agent_script' ] = '__plugin__'
325
313
instance ['operable' ] = True
326
- elif cls in site_config .agent_script_reg :
327
- session .add_message (f'Found launcher script for "{ cls } "' )
328
- instance ['agent_script' ] = site_config .agent_script_reg [cls ]
329
- instance ['operable' ] = True
330
314
else :
331
- session .add_message (f 'No plugin (nor launcher script) '
315
+ session .add_message ('No plugin '
332
316
f'found for agent_class "{ cls } "!' )
333
317
elif instance ['management' ] == 'docker' :
334
318
instance ['agent_script' ] = self .docker_service_prefix + iid
@@ -361,16 +345,11 @@ def _launch_instance(self, instance):
361
345
else :
362
346
iid = instance ['instance_id' ]
363
347
pyth = sys .executable
364
- script = instance ['agent_script' ]
365
- if script == '__plugin__' :
366
- cmd = [pyth , '-m' , 'ocs.agent_cli' ]
367
- else :
368
- cmd = [pyth , script ]
369
- cmd .extend ([
370
- '--instance-id' , iid ,
371
- '--site-file' , self .site_config_file ,
372
- '--site-host' , self .host_name ,
373
- '--working-dir' , self .working_dir ])
348
+ cmd = [pyth , '-m' , 'ocs.agent_cli' ,
349
+ '--instance-id' , iid ,
350
+ '--site-file' , self .site_config_file ,
351
+ '--site-host' , self .host_name ,
352
+ '--working-dir' , self .working_dir ]
374
353
prot = hm_utils .AgentProcessHelper (iid , cmd )
375
354
prot .up ()
376
355
instance ['prot' ] = prot
0 commit comments