MCPcopy
hub / github.com/apache/caldera / load

Method load

app/service/app_svc.py:123–131  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

121 return True
122
123 async def load(p):
124 plugin = Plugin(name=p)
125 if plugin.load_plugin():
126 await self.get_service('data_svc').store(plugin)
127 self._loaded_plugins.append(plugin)
128
129 if plugin.name in self.get_config('plugins') or plugin.name == 'magma':
130 await plugin.enable(self.get_services())
131 self.log.info('Enabled plugin: %s' % plugin.name)
132
133 for plug in filter(trim, plugins):
134 if not os.path.isdir('plugins/%s' % plug) or not os.path.isfile('plugins/%s/hook.py' % plug):

Callers 15

load_yaml_fileMethod · 0.45
_load_data_encodersMethod · 0.45
handle_heartbeatMethod · 0.45
update_plannerMethod · 0.45
add_manual_commandMethod · 0.45
_generate_new_linksMethod · 0.45

Calls 7

load_pluginMethod · 0.95
enableMethod · 0.95
PluginClass · 0.90
get_serviceMethod · 0.80
get_servicesMethod · 0.80
storeMethod · 0.45
get_configMethod · 0.45

Tested by 15

init_base_worldFunction · 0.36
_generate_linkFunction · 0.36
test_adversaryFunction · 0.36
test_plannerFunction · 0.36
test_executorFunction · 0.36
test_abilityFunction · 0.36
setup_finished_operationFunction · 0.36
setup_empty_operationFunction · 0.36
test_rule_deserializeMethod · 0.36