MCPcopy Create free account
hub / github.com/StackStorm/st2 / register_content

Function register_content

st2common/st2common/content/bootstrap.py:398–444  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

396
397
398def register_content():
399 register_all = cfg.CONF.register.all
400
401 if register_all:
402 register_triggers()
403 register_sensors()
404 register_runners()
405 register_actions()
406 register_rules()
407 register_aliases()
408 register_policies()
409 register_configs()
410
411 if cfg.CONF.register.triggers and not register_all:
412 register_triggers()
413
414 if cfg.CONF.register.sensors and not register_all:
415 register_sensors()
416
417 if cfg.CONF.register.runners and not register_all:
418 register_runners()
419
420 if cfg.CONF.register.actions and not register_all:
421 # If --register-runners is passed, registering runners again would be duplicate.
422 # If it's not passed, we still want to register runners. Otherwise, actions will complain
423 # about runners not being registered.
424 if not cfg.CONF.register.runners:
425 register_runners()
426 register_actions()
427
428 if cfg.CONF.register.rules and not register_all:
429 register_rules()
430
431 if cfg.CONF.register.aliases and not register_all:
432 register_aliases()
433
434 if cfg.CONF.register.policies and not register_all:
435 register_policies()
436
437 if cfg.CONF.register.configs and not register_all:
438 register_configs()
439
440 if cfg.CONF.register.setup_virtualenvs:
441 setup_virtualenvs()
442
443 if cfg.CONF.register.recreate_virtualenvs:
444 setup_virtualenvs(recreate_virtualenvs=True)
445
446
447def setup(argv):

Callers 2

setUpMethod · 0.90
mainFunction · 0.85

Calls 9

setup_virtualenvsFunction · 0.85
register_triggersFunction · 0.70
register_sensorsFunction · 0.70
register_runnersFunction · 0.70
register_actionsFunction · 0.70
register_rulesFunction · 0.70
register_aliasesFunction · 0.70
register_policiesFunction · 0.70
register_configsFunction · 0.70

Tested by 1

setUpMethod · 0.72