vpp honeycomb 总结

来源:互联网 发布:flotherm软件英文翻译 编辑:程序博客网 时间:2024/06/08 02:18

现在时间是2017.2.14

相关链接

控制拓扑介绍                     https://fd.io/technology 

honeycomb主页                 https://wiki.fd.io/view/Honeycomb  

netconf协议RFC                https://tools.ietf.org/html/rfc4741 

honeycomb 安装调试指导        https://docs.fd.io/honeycomb/1.16.12-SNAPSHOT/release-notes-aggregator/release_notes.html#_configuration_files  

ssh调试honeycomb           https://docs.fd.io/honeycomb/1.16.12-SNAPSHOT/release-notes-aggregator/user_running_honeycomb.html

ncclient 库(编写netconf程序用)  https://pypi.python.org/pypi/ncclient/           http://ncclient.readthedocs.io/en/latest/index.html



    上图主要说明了honeycomb作为中间件连接vpp和控制器。

    按照上面链接编译或是yum安装好vpp 和 honeycomb,首先用ssh调试honeycomb是否启动正常,在ssh的时候。honeycomb默认的用户和密码是admin(修改查看

https://git.fd.io/honeycomb/tree/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/honeycomb.json?h=master)

   用ssh正常启动后就可以用ncclient 库编写程序访问honeycomb程序了,按照\ncclient-0.5.3\examples里的例子可以修改相应程序访问honeycomb,这里必须注意,netconf协议有1.0和1.1版本,版本得重要区别是在发送语句的时候,语句前后结束符不一样!

A:1.0版本

<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:bde2c066-a0b0-4653-9d42-0d54cbc20f04"><nc:close-session/></nc:rpc>
]]>]]>

没有开始部分,只有结束部分\n]]>]]>


B: 1.1版本

#184 
<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:bde2c066-a0b0-4653-9d42-0d54cbc20f04"><nc:close-session/></nc:rpc>
##

#184是发送语句开始部分,以\n#开头带上语句长度,以\n##\n结束,可以查看\ncclient-0.5.3\ncclient\transport\ssh.py文件中END_DELIM参数


修改方案

现在的honeycomb只支持1.0(也许我没找到支持1.1的方法)

所以必须做以下修改,才能使用ncclient库

路径 \ncclient-0.5.3\ncclient\transport\ssh.py

http://pan.baidu.com/s/1o8M2OLc

主要修改点是默认使用1.0版本,

0 0
原创粉丝点击