摘要: 在完成了plugins和extensions的加载后,进行四个顶级resource(分别是network、subnet、subnetpool和port)的map过程。map过程指的是,将各个resource的相关请求(例如创建network、删除subnet)映射到相应的处理函数的过程。APIRou 阅读全文
posted @ 2018-01-10 14:28 卢卡_莫德里奇 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 上篇分析了core plugin和service plugin的加载过程。APIRouter的构造函数下一步将进行PluginAwareExtensionManager的初始化: PluginAwareExtensionManager也是一个单例模式。 在第一次调用get_instance函数时,其 阅读全文
posted @ 2018-01-09 11:28 卢卡_莫德里奇 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 在分析api-paste.ini时,曾分析到wsgi app neutronapiapp_v2_0是直接调用/neutron/api/v2/router.py中APIRouter的factory方法: APIRouter的factory方法是一个classmethod,直接调用APIRouter的构 阅读全文
posted @ 2018-01-09 11:05 卢卡_莫德里奇 阅读(547) 评论(0) 推荐(0) 编辑
摘要: 待完成。。。 阅读全文
posted @ 2018-01-09 10:53 卢卡_莫德里奇 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 在Neutron API启动过程分析中,曾分析到加载wsgi app是通过load_paste_app函数首先实例化oslo_service.wsgi.py中的Loader类,返回一个loader对象。然后再调用loader对象的load_app函数来实现的。 下面分析一下paste.deploy的 阅读全文
posted @ 2017-12-26 11:31 卢卡_莫德里奇 阅读(702) 评论(0) 推荐(0) 编辑
摘要: 1.概述 Openstack中有一个叫Launcher的概念,即专门用来启动服务的,这个类被放在了oslo_service这个包里面。Launcher分为两种,一种是ServiceLauncher,另一种为ProcessLauncher。ServiceLauncher用来启动单进程的服务,而Proc 阅读全文
posted @ 2017-12-21 17:29 卢卡_莫德里奇 阅读(2462) 评论(0) 推荐(1) 编辑
摘要: RPC启动跟Neutron API的启动在同一个函数中执行,neutron.server.wsgi_eventlet.py中的eventlet_wsgi_server。 start_api_and_rpc_workers函数中使用start_all_workers函数来启动RPC相关的workers 阅读全文
posted @ 2017-12-21 17:24 卢卡_莫德里奇 阅读(1010) 评论(0) 推荐(0) 编辑
摘要: 首先,Neutron Server作为一种服务(neutron-server.service),可以到Neutron项目目录中的setup.cfg配置文件中找到对应的代码入口。 neutron-server代码入口: 调用neutron.server.__init__中的boot_server函数: 阅读全文
posted @ 2017-12-20 11:14 卢卡_莫德里奇 阅读(1857) 评论(0) 推荐(0) 编辑