oslo_db.sqlalchemy.engines连库
_
mysql -uroot -pc1234
oslo_db.sqlalchemy.engines
root@devstack2019:/etc/keystone# more keystone.conf
[token]
provider = fernet
[database]
connection = mysql+pymysql://root:c1234@127.0.0.1/keystone?charset=utf8
========
pymysql
mysql+pymysql://<username>:<password>@<host>/<dbname>[?<options>]
/usr/local/bin/keystone-manage
grant all privileges on keystone.* to 'keystone'@'controller1' identified by 'keystone';
flush privileges;
OpenStack公共组件oslo之九——oslo.db
/var/log/keystone/keystone.log
外观模式(facade)又称为门面模式
systemctl stop
root@devstack2019:/etc/keystone# nova-
nova-api nova-api-wsgi nova-console nova-manage nova-novncproxy nova-rootwrap-daemon nova-spicehtml5proxy
nova-api-metadata nova-compute nova-consoleauth nova-metadata-wsgi nova-policy nova-scheduler nova-status
nova-api-os-compute nova-conductor nova-dhcpbridge nova-network nova-rootwrap nova-serialproxy nova-xvpvncproxy
root@devstack2019:/etc/keystone# nova-
root@devstack2019:/etc/keystone# key
keyring keystone-manage keystone-status keystone-wsgi-admin keystone-wsgi-public
root@devstack2019:/etc/keystone# key
https://int32bit.me 如何阅读 OpenStack 源码 付广平
/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py
class _TransactionFactory(object):
def _start(self, conf=False, connection=None, slave_connection=None):
conf.register_opts(options.database_opts, 'database')
def _setup_for_connection(
self, sql_connection, engine_kwargs, maker_kwargs):
engine = engines.create_engine(
sql_connection=sql_connection, **engine_kwargs)
/usr/local/lib/python2.7/dist-packages/oslo_db/options.py
database_opts
sys.path返回模块的搜索路径
SIX是用于python2与python3兼容的库。它存在的目的是为了拥有无需修改即可在Python2和Python3上同时工作的代码。