当前位置: 首页 > news >正文

手机网站导航栏特效太原seo关键词排名优化

手机网站导航栏特效,太原seo关键词排名优化,wordpress插件获取数据库,wordpress wp queryOpenDayLight(硼Boron版本)实战开发入门OpenDayLight[1](简写为ODL)的硼Boron(0.5.0)版本于2016-09-16 这几天刚刚发布。作为一款开源SDN网络控制器#xff0c;依托于强大的社区支持以及丰富的功能特性#xff0c;ODL成为了目前主流的SDN网络控制器开发平台。不仅为开发者提供…OpenDayLight(硼Boron版本)实战开发入门OpenDayLight[1](简写为ODL)的硼Boron(0.5.0)版本于2016-09-16 这几天刚刚发布。作为一款开源SDN网络控制器依托于强大的社区支持以及丰富的功能特性ODL成为了目前主流的SDN网络控制器开发平台。不仅为开发者提供了大量的网络管理功能而且藉由AD-SAL(API驱动的服务层)和MD-SAL(模型驱动的服务层), 给独立的网络应用提供了完善的二次开发接口。由于OpenDaylight架构的复杂性和多样性以及ODL上官方wiki文档更新的比较缓慢往往给开发者带来很多的困难。下面我们以最新的版本硼Boron为例讲解ODL的入门应用开发技术。1. 介绍1.1 ODL应用开发ODL做为网络控制器, 将网络设备和应用程序连接起来。通过南向接口(例如OpenFlow协议等)管理和控制实际的网络物理设备, 通过北向接口(例如RESTConf形式的接口)向外部应用程序提供信息获取和操作下发的功能。如下图所示:图1-1 ODL和APP对于南向接口, 设备厂商会比较关注; 应用开发主要集中于北向接口。本文我们只关注于北向接口的APP的开发。开发ODL的应用有两种模式如下图所示模式一 外部应用应用通过ODL提供的RESTful接口使用ODL提供的全部功能模式二 内部应用, 应用内嵌于ODL中, 同时向外部暴露RESTful接口以供外部程序调用图1-2 应用开发模式采用RESTful接口的应用开发和传统的开发模式类似不再详细说明。完全使用RESTful的方式当业务逻辑复杂时可能会导致调用RESTful接口过多影响性能而且开发复杂。另一方面, ODL提供的RESTful接口不一定能满足业务逻辑要求, 此时就需要模式二的ODL内部应用开发, 然后通过自定义的RESTful接口向外暴露功能。1.2 OSGi简介OSGi[2]是采用Java语言的一种面向服务的组件模型, 它提供了模块化为基础开发应用的基本架构。模块可以动态加载/卸载向外暴露功能和隐藏内部实现细节等, 模块在称为容器的环境中运行。OSGi的实现有Apache Felix, Equinox , Spring DM 等.OpenDaylight基于OSGi的实现Apache Karaf(Apache Felix的一个子项目)来构造系统。 模块也称为bundle, ODL的内部应用就是一个个的bundle, 它们放置在ODL目录的system子目录下, 以maven的存储库形式组织。借助于OSGi的架构, ODL中的内部应用可以动态加载和卸载, 系统具有很好的灵活性和可扩展性, 这对于大型系统而言是非常重要的。模块不仅向外提供接口, 而且需要使用其它模块提供的功能, 也即模块之间具有依赖性。因此ODL内部应用的开发除了专注于功能, 而且对不同的ODL生产版本需要配置不同的依赖。2. ODL之硼Boron版本应用开发此部分内容主要来自于ODL的DOC。2.1 开发环境搭建开发环境配置如下:1) 64位Linux系统4G以上内存, 16G以上硬盘剩余空间(如果编译ODL发行版的话)2) JDK8, maven-3.3.x3) 环境变量设置(设置JAVA_HOME, M2_HOME, PATH变量设置, MAVEN_OPTS选项设置等, 略)export JAVA_HOME…export MAVEN_OPTS”-Xmx1024m”2.2 开发示例项目0) 获取ODL的maven配置文件(用于maven编译时下载ODL的相应jar文件)# cp ~/.m2/settings.xml ~/.m2/settings.xml.old1) 用maven生成项目框架(设项目为hello)# mvn archetype:generate -DarchetypeGroupIdorg.opendaylight.controller \-DarchetypeArtifactIdopendaylight-startup-archetype \-DarchetypeRepositoryhttps://nexus.opendaylight.org/content/repositories/public/ \-DarchetypeCataloghttps://nexus.opendaylight.org/content/repositories/public/archetype-catalog.xml(输入如下内容)Define value for property ‘groupId’: : org.bupt.siwind.helloDefine value for property ‘artifactId’: : helloDefine value for property ‘package’: org.bupt.siwind.hello: :Define value for property ‘classPrefix’: Hello: :Define value for property ‘copyright’: : BNRC, Inc.或者输入如下:mvn archetype:generate -DarchetypeGroupIdorg.opendaylight.controller \-DarchetypeArtifactIdopendaylight-startup-archetype \-DarchetypeVersion1.2.0-Boron \-DarchetypeRepositoryhttps://nexus.opendaylight.org/content/repositories/public/ \-DarchetypeCataloghttps://nexus.opendaylight.org/content/repositories/public/archetype-catalog.xml上述步骤完成后, 在当前目录下面会生成hello目录, 即为我们的APP目录.2) 修改依赖项(针对硼Boron版本)# cd hello (进入hello项目目录)# 依次打开文件: pom.xml, api/pom.xml, artifacts/pom.xml, features/pom.xml, impl/pom.xml, it/pom.xml, karaf/pom.xml, 修改内容(其中features/pom.xml修改多处)按照下面列出的各自修改对应的依赖的版本号:odlparent(odlparent-lite): 1.7.0-Boronbinding-parent: 0.9.0-Boronmdsal.model: 0.9.0-Boronmdsal: 1.4.0-Boronrestconf: 1.4.0-Boronyangtools: 1.0.0-Borondlux: 0.4.0-Boronconfig-parent: 0.5.0-Boronmdsal-it-parent: 1.4.0-Boronkaraf-parent: 1.7.0-Boron例如文件features/pom.xml, 修改后如下(蓝色部分):org.opendaylight.odlparentfeatures-parent1.7.0-Boron……0.9.0-Boron1.4.0-Boron1.4.0-Boron1.0.0-Boron0.4.0-Boronetc/opendaylight/karaf3) 编译和运行#mvn clean install#./karaf/target/assembly/bin/karaf进入ODL控制台,输入如下命令可以看到结果:opendaylight-userrootfeature:list -i | grep helloopendaylight-userrootlog:display | grep Hello4) 添加基于yang模型的RPC接口, 并编译运行添加接口并编译的内容看ODL的文档, 略.可以看到hello-world RPC接口, 输入{“input”: { “name”:”Good day”}} , 可以看到结果。图21 hello RPC exampleCurl访问RPC验证:#curl –user “admin”:”admin” \-H “Accept: application/json” \-H “Content-type: application/json” \-X POST –data “{‘hello:input’: { ‘name’:’Good day ODL’}}” \2.3 安装到ODL生产版本有三种方法: 方法一为将当前生成hello项目的bundle拷贝到已经正常部署运行的ODL的硼版本上; 方法二为重新编译一个包含hello项目的ODL发行版。方法三(推荐)为拷贝项目的maven结构到生产环境ODL的system目录下然后在生产环境ODL的features-integration-index处添加自己项目的repository仓库即可进行feature的安装。1) 方法一: 手动拷贝bundle由于ODL以OSGi的方式组织, 因此项目hello也是一个OSGi的bundle. 在ODL中, bundle位于ODL发行版的目录的system/子目录下,    并且各个bundle以maven的包形式组织。我们hello项目正常编译运行后, hello的bundle存在于当前hello目录下面的karaf/target/assembly/system下面(其它很多bundle不要拷贝), 我们从此目录拷贝hello自己的bundle到ODL的发行版即可。i) 拷贝: 假设当前正常部署运行的ODL发行版位于: /home/guest/distribution-karaf-0.5.0-Boron当前的hello项目位于/home/guest/bin/hello那么拷贝命令如下:#cp -Ru /home/guest/bin/hello/karaf/target/assembly/system/org/bupt /home/guest/distribution-karaf-0.5.0-Boron/system/orgii) 查看hello的maven路径:#cd hello (进入hello项目目录)#cat ./karaf/target/assembly/etc/org.apache.karaf.features.cfg查看这一行:featuresRepositories在最后有hello的mvn路径: “mvn:org.bupt.siwind.odl/hello-features/1.0.0-SNAPSHOT/xml/features”iii) 运行ODL并添加和安装hello的bundle:#cd /home/guest/distribution-karaf-0.5.0-Boron#./bin/karaf (启动ODL运行, 或者以干净模式启动: ./bin/karaf clean)#opendaylightroot feature:repo-addmvn:org.bupt.siwind.odl/hello-features/1.0.0-SNAPSHOT/xml/features# opendaylightroot feature:install odl-hello-ui# opendaylightroot feature:list | grep hello# opendaylightroot log:display | grep Hello可以看到运行结果正常。(移除bundle)# opendaylightroot feature:repo-remove mvn:org.bupt.siwind.odl/hello-features/1.0.0-SNAPSHOT/xml/features2) 方法二: 编译hello项目到ODL发行版中i) 编译ODL发行版:#git tag#git checkout release/boron (切换需要的版本)#mvn mvn clean install编译成功后在当前目录下的distribution-karaf\target下面有压缩包形式的发行版:distribution-karaf-0.5.0-Boron.tar.gz, distribution-karaf-0.5.0-Boron.zip当前目录下的distribution-karaf\target\assembly为解压缩后的karaf执行版本ii) 记录hello项目的信息# cat /features/pom.xml(记录hello-feature的版本等信息)# cat /karaf/target/assembly/etc/org.apache.karaf.features.cfg(记录hello的mvn路径: “mvn:org.bupt.siwind.odl/hello-features/1.0.0-SNAPSHOT/xml/features”)iii) 添加hello的bundle信息此步骤之前确保hello编译运行和测试例运行通过, 并且用mvn clean install 安装其bundle到了.m2/repository下面。在当前的distribution目录下面, 修改如下两个pom.xml文件# vim features-index/pom.xml , 添加如下内容:org.bupt.siwind.odlhello-features1.0.0-SNAPSHOTfeaturesxml# vim features-index/src/main/resources/features.xml, 添加如下内容:mvn:org.bupt.siwind.odl/hello-features/1.0.0-SNAPSHOT/xml/featuresiv) 重新编译发行版#mvn clean install3) 方法三(推荐)结合前述两种方法操作如下i) 拷贝 在当前编译运行成功项目的目录” karaf/target/assembly/system/”下面是maven格式的仓库拷贝我们项目的maven仓库内容到生成环境ODL的system目录下。例如#cp –R  /home/guest/bin/hello/karaf/target/assembly/system/org/bupt  /home/guest/distribution-karaf-0.5.0-Boron/system/orgii) 添加我们项目仓库信息到ODL生成环境的” features-integration-index”xml文件下面。此文件路径为“\system\org\opendaylight\integration\features-integration-index\\features-integration-index--features.xml”例如 Boson-SR1的路径为“system\org\opendaylight\integration\features-integration-index\0.5.1-Boron-SR1\features-integration-index-0.5.1-Boron-SR1-features.xml”打开此文件在末尾的标签之前添加一行内容mvn:org.bupt.siwind.odl/hello-features/1.0.0-SNAPSHOT/xml/featuresiii) 启动生产环境ODL安装feature即可。# /bin/karaf# opendaylightroot feature:install  xxxx图2-2 运行结果3. 结论本文介绍了目前2016最新的ODL硼Boron版本的应用开发基础步骤, 其也适用于其它版本的开发 以及介绍了一些OSGi相关的背景技术; 增加了将应用集成到发行版ODL的方法和简单的RPC接口示例。4. FAQ1) 不能在ODL发行版中正常加载hello项目A:查看是否hello的各个pom.xml中定义的依赖版本符合当前运行的ODL发行版2) 编译ODL的integration/distribution发行版时, 某些依赖的bundle不能下载A:查看报错的是哪个bundle, 这里是ODL的仓储, 用git自行下载此bundle源码, 编译到本机的.m2/repository中.例如# cd {PROJECT}# git checkout release/boron    (切换指定版本)# mvn clean installReferences[1] OpenDaylight开源SDN平台[2] OSGi: The Dynamic Module System for Java[EB/OL]. https://www.osgi.org/.赞过赞 正在加载……
http://wiki.neutronadmin.com/news/302285/

相关文章:

  • 天津宏宇网站建设淘宝网页设计模板html
  • 做网站需要哪个系统营销网络是什么意思
  • 网站开发 设计制作合同建设培训中心网站
  • 企业网站 asp源码h5制作开发价目表
  • 电商具体是什么工作网站优化套餐
  • 手机网站建设 苏州宁宁网seo
  • 茶叶网站策划凡客诚品官方网站首页
  • 史志网站建设方案广告装饰公司名称大全
  • 故城网站建设wordpress更改固定链接页面打不开
  • 怎么用手机网站做软件好网站平台建设可行性
  • 珠海模板建站平台营销云官网
  • 柳州做网站哪家好西安网站建设推广专家
  • 自己如何建设外贸网站建站基于php电子商务网站开发
  • 一对一直播网站开发设计公司设计
  • 深圳制作网站服务wordpress付费下载插件
  • 做淘宝客的网站宝塔如何添加ip域名做网站
  • 个人可以做商城网站网站是否能够被恶意镜像
  • 销售一个产品的网站怎么做设计网站排名
  • 手机商城网站Wordpress上传文件权限
  • 网页入口网站推广外贸建站费用
  • 建站好的公司泉州丰泽建设局网站
  • 建设商城网站公司吗度假区网站建设方案
  • 用jsp做的网站的代码国内做的好的帽子网站
  • 渑池县建设局网站怎么用手机做软件
  • 文化传媒公司 网站备案wordpress pdf 插件
  • 淄博网站建设及托管郑州网络营销推广机构
  • 外贸建站有什么用wordpress搜索主题
  • 建设厅教育培训网站太原门户网站
  • 集运网站建设番禺建设网站哪家好
  • 58同城做网站找谁长沙seo优化报价