博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
从零开始学OpenDaylight之五:Hello安装到Controller
阅读量:6824 次
发布时间:2019-06-26

本文共 3256 字,大约阅读时间需要 10 分钟。

 一、手动拷贝方式

1. 将Hello项目生成的发布包拷贝至ODL发布版本的

 Hello项目(mvn clean install)后,Hello的feature存在于karaf/target/assembly/system目录下,更进一步\karaf\target\assembly\system\org\opendaylight

 

其中,org\opendaylight为输入的groupId的值

2. 安装Hello组件:

(1) 启动OpenDayLight: 

D:\CODE\distribution-karaf-0.6.0-Carbon\bin>karafApache Karaf starting up. Press Enter to open the shell now...100% [========================================================================]Karaf started in 26s. Bundle stats: 296 active, 296 total________ ________ .__ .__ .__ __\_____ \ ______ ____ ____ \______ \ _____ ___.__.| | |__| ____ | |___/ |_/ | \\____ \_/ __ \ / \ | | \\__ \< | || | | |/ ___\| | \ __\/ | \ |_> > ___/| | \| ` \/ __ \\___ || |_| / /_/ > Y \ |\_______ / __/ \___ >___| /_______ (____ / ____||____/__\___ /|___| /__|\/|__| \/ \/ \/ \/\/ /_____/ \/Hit '
' for a list of available commandsand '[cmd] --help' for help on a specific command.Hit '
' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

(2). 将Hello 仓库添加到featue list中:

opendaylight-user@root>feature:repo-add mvn:org.opendaylight.hello/hello-features/0.1.0-SNAPSHOT/xml/featuresAdding feature url mvn:org.opendaylight.hello/hello-features/0.1.0-SNAPSHOT/xml/features

其中斜体部分的值在:D:\CODE\odlexample\hello\hello\karaf\target\assembly\etc\org.apache.karaf.features.cfg 文件的最后部分:

featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.8/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.8/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.2.9/xml/features,mvn:org.apache.karaf.features/spring/3.0.8/xml/features,mvn:org.opendaylight.hello/hello-features/0.1.0-SNAPSHOT/xml/features

 

(3). 查看hello是否已安装:

opendaylight-user@root>feature:list|grep helloodl-hello-api | 0.1.0-SNAPSHOT | | odl-hello-0.1.0-SNAPSHOT | OpenDaylight :: hello :: apiodl-hello | 0.1.0-SNAPSHOT | | odl-hello-0.1.0-SNAPSHOT | OpenDaylight :: helloodl-hello-rest | 0.1.0-SNAPSHOT | | odl-hello-0.1.0-SNAPSHOT | OpenDaylight :: hello :: RESTodl-hello-ui | 0.1.0-SNAPSHOT | | odl-hello-0.1.0-SNAPSHOT | OpenDaylight :: hello :: UIodl-hello-cli | 0.1.0-SNAPSHOT | | odl-hello-0.1.0-SNAPSHOT | OpenDaylight :: hello :: CLIopendaylight-user@root>feature:list -i | grep hello

(4). 安装Hello:

opendaylight-user@root>feature:install odl-hello-uiopendaylight-user@root>feature:list -i | grep helloodl-hello-api | 0.1.0-SNAPSHOT | x | odl-hello-0.1.0-SNAPSHOT | OpenDaylight :: hello :: apiodl-hello | 0.1.0-SNAPSHOT | x | odl-hello-0.1.0-SNAPSHOT | OpenDaylight :: helloodl-hello-rest | 0.1.0-SNAPSHOT | x | odl-hello-0.1.0-SNAPSHOT | OpenDaylight :: hello :: RESTodl-hello-ui | 0.1.0-SNAPSHOT | x | odl-hello-0.1.0-SNAPSHOT | OpenDaylight :: hello :: UI

如果要将hello移除feature list,使用 feature:repo-remove mvn:org.opendaylight.hello/hello-features/0.1.0-SNAPSHOT/xml/features

移除后,查不到,装不上

opendaylight-user@root> feature:repo-remove mvn:org.opendaylight.hello/hello-features/0.1.0-SNAPSHOT/xml/featuresopendaylight-user@root>feature:list -i | grep helloopendaylight-user@root>feature:list|grep helloopendaylight-user@root>feature:install odl-hello-uiError executing command: Can't install feature odl-hello-ui/0.0.0:null

二、 编译方式:

   参考链接:http://www.sdnlab.com/17863.html

 

转载于:https://www.cnblogs.com/FrankZhou2017/p/7251168.html

你可能感兴趣的文章
/var/lock/subsys作用
查看>>
mvc项目架构搭建之UI层的搭建
查看>>
Android RxJava
查看>>
【linux】su和sudo命令的区别
查看>>
Servlet基础
查看>>
Lind.DDD.Repositories.Mongo层介绍
查看>>
纸板上的虚拟现实和代码中的Cardboard
查看>>
[原] Jenkins Android 自动打包配置(转)
查看>>
[Redux] Passing the Store Down with <Provider> from React Redux
查看>>
javascript笔记7-事件
查看>>
大数据处理分析的六大最好工具
查看>>
【转】俞军给淘宝产品经理的分享
查看>>
Thrift使用实例
查看>>
Nand flash uboot 命令详解【转】
查看>>
曲线的奇点
查看>>
【Linux】了解服务器的情况
查看>>
解决Spring配置文件不显示design和source, namespace 问题
查看>>
Efficiently traversing InnoDB B+Trees with the page directory--slot
查看>>
算法笔记_191:历届试题 大臣的旅费(Java)
查看>>
乐为物联网平台初步体验(1)
查看>>