new module add in with lots of issues(part 2)
来源:互联网 发布:mac mini 加内存 编辑:程序博客网 时间:2024/05/07 09:55
上一篇中pkg_resources终于没问题了,但是发现keystone服务挂掉了:
keystone endpoint-list
/usr/lib/python2.7/site-packages/keystoneclient/shell.py:65: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
'python-keystoneclient.', DeprecationWarning)
Authorization Failed: Unable to establish connection to http://xxx:5000/v2.0/tokens
尝试启动服务无法成功:
systemctl start openstack-keystone.service
尝试重装一个keysstone覆盖现有的,发现可能存在问题,遇到问题无法甄别,还是重装RDO!
-------------------------
重装RDO之后,安装install guide一路继续配置,配nova,ironic,keystone。。。
现在要添加自己的模块,改变ironic-2014.2-py2.7.egg-info/中的 entry_points.txt PKG-INFO SOURCES.txt
分别子啊entry_points.txt的ironic.drivers下添加自己的module对应
在SOURCES.txt中添加自己新加入的class
运行:
pkg_resources.load_entry_point('ironic','ironic.drivers','new driver')
发现有些错误,自己看是因为有些包不匹配,打开自己的源码发现是import中有些包太新,2014.2版本中还没有这样的包,于是改成响应的老包
再次运行发现
AttributeError: 'module' object has no attribute 'passthru'
查看2014.2版本的源码,那个时候竟然连@base.passthru的语法糖也没有。。。
这个时候可以:
A,自己重新做一个包,使用新的包,可能会存在ironic中需要的oslo相关的包没有,因而报错,可能需要自己不断的修修补补,比较麻烦
B,整个RDO搭建出来的各个模块重新更新到较新的版本,太麻烦。。。
C,先用老的写法写自己的模块验证。。。工作量最小
@base.passthru的语法糖,转而使用:
def vendor_passthru(self, task, **kwargs):
"""Calls a valid vendor passthru method.
:param task: a TaskManager instance containing the node to act on.
:param kwargs: kwargs containing the vendor passthru method and its
parameters.
"""
method = kwargs['method']
xxxx
然后好了,终于在pkg_resouces.load_entry_point中出现了自己的driver
- new module add in with lots of issues(part 2)
- new module add in with lots of issues(part 1)
- new module add in with lots of issues(part 3)
- Add a New Module
- x264 add new module method
- New features in EJB3.1 (Part 2)
- Lots of warnings when building with Xcode 7 with 3rd party libraries
- Out Of Memory Issues in java
- Use jQuery to scroll to the bottom of a div with lots of text
- Some serious issues with the new -O option
- add new service in framworks
- What's new in windows server 2012 networking (Part 2)
- Android have lots of intent
- Do Lots of Deliberate Practice
- Do Lots of Deliberate Practice
- Lots of Buttons的故事
- How-to find the SQL that using lots of temp tablespace in Oracle
- Cacti - Add New Servers With A Script
- maven release
- android动画(一)Interpolator
- Git常用命令的使用情景
- 开博了,开博了!!!
- 黑马程序员——JAVA集合框架(一)
- new module add in with lots of issues(part 2)
- ckeditor插件引用
- MongoDB基本命令用
- 数学 hdu 1719
- JAVASCRIPT学习总结
- Apple WatchKit 初探
- Javascript的"预编译"思考
- 8种常用json解析示例(原创作者:smallbee 本文转载于:http://smallbee.iteye.com/)
- c语言中的static变量和static函数