Many different apps can load and run subscription-manager code, and they are not particularly consistent in how they do it.
Some parts of subscription-manager code only need to happen once per process (log and config setup, for example). Other aspects can happen more often, but should be kept to a minimum (loading client side certificates, reading/write caches, etc.).
/usr/sbin/subscription-manager
i18n.configure_i18n()
)logutil.init_logger()
)injectioninit.init_dep_injection()
)import managercli
managercli.ManagerCLI().main()
ManagerCLI()
creates an instance of each of the managercli.*Command
classes.
The ManagerCLI().main()
runs the Command.main()
of the command. The main()
parses all the args, sets up connections to Candlepin (UEP, etc.) if needed, and
runs the Command._do_command()
All the CliCommand()
subclasses are init()
‘ed, but only one will have its .main()
and its _do_command()
triggered.