| 396 | |
| 397 | |
| 398 | def 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 | |
| 447 | def setup(argv): |