3.3 KiB
3.3 KiB
Transition from OpenStackClient
osc-lib was extracted from the main OpenStackClient repo
after the OSC 2.4.0 release. During the migration all module names have
changed from openstackclient.* to osc_lib.*.
In addition, some re-arranging has been done internally to better align
modules.
The complete list of public module name changes:
openstackclient.i18n->osc_lib.i18nopenstackclient.api.api->osc_lib.api.apiopenstackclient.api.utils->osc_lib.api.utilsopenstackclient.common.command->osc_lib.command.commandopenstackclient.common.commandmanager->osc_lib.command.commandmanageropenstackclient.common.exceptions->osc_lib.exceptionsopenstackclient.common.logs->osc_lib.logsopenstackclient.common.parseractions->osc_lib.cli.parseractionsopenstackclient.common.session->osc_lib.sessionopenstackclient.common.utils->osc_lib.utilsopenstackclient.tests.fakes->osc_lib.tests.fakesopenstackclient.tests.utils->osc_lib.tests.utils
Additional Changes
In addition to the existing public modules, other parts of OSC have
been extracted, including the base Command,
CommandManager, ClientManager and
Session classes.
ClientManager
The OSC ClientManager is responsible for managing all of
the handles to the individual API client objects as well as coordinating
session and authentication objects.
Plugins are encouraged to use the ClientManager interface for obtaining information about global configuration.
openstackclient.common.clientmanager->osc_lib.clientmanager- All of the handling of the
verify/insecure/cacertconfiguration options has been consolidated intoClientManager. This converts the--verify,--insecureand--os-cacertoptions into aRequests-compatibleverifyattribute and acacertattribute for the legacy client libraries. both are now public; the_insecureattribute has been removed.
| --verify | --insecure | --cacert | Result |
|---|---|---|---|
| None | None | verify=True, cacert=None |
|
| True | None | None | verify=True, cacert=None |
| None | True | None | verify=False, cacert=None |
| None | None | <filename> | verify=cacert,
cacert=<filename> |
| True | None | <filename> | verify=cacert,
cacert=<filename> |
| None | True | <filename> | verify=False, cacert=None |
- A number of other
ClientManagerattributes have also been made public to encourage their direct use rather than reaching in to the global options passed in the theClientManagerconstructor:_verify->verify_cacert->cacert_cert->cert_insecure-> removed, use 'not verify'_interface->interface_region_name->region_name
Shell
openstackclient.shell->osc_lib.shell- Break up
OpenStackShell.initialize_app()- leave all plugin initialization in OSC in
_load_plugins() - leave all command loading in OSC in
_load_commands()
- leave all plugin initialization in OSC in