Add aaa-12 提交“驱动适配层”骨架代码

RCA:
SOL:
修改人:dongxiancun
检视人:dongxiancun
This commit is contained in:
dongxiancun 2019-08-07 21:24:42 +08:00
parent dc059f9613
commit 468685104f
16 changed files with 1086 additions and 0 deletions

21
ControlPlatform/driver-layer/.gitignore vendored Normal file
View File

@ -0,0 +1,21 @@
*.class
**/target
bin/
dist
**/logs
*~
target
target-ide
.classpath
.project
.settings
.idea
xtend-gen
yang-gen-config
yang-gen-sal
classes
.DS_STORE
.metadata
*.ipr
*.iml
*.iws

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
Copyright © 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
<version>0.12.4</version>
<relativePath/>
</parent>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>adaptation-layer</artifactId>
<version>0.1.0</version>
<!-- <name> formatting is used by autorelease to parse and notify projects on
build failure. Please do not modify this unless you have a good reason. -->
<name>ODL :: com.cmcc.cmhi :: ${project.artifactId}</name>
<packaging>bundle</packaging>
<dependencies>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>ietf-inet-types-2013-07-15</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,132 @@
// Contents of "driver-register"
module driver-register {
namespace "urn:opendaylight:driver-register";
prefix "driver-register";
import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; }
organization "ZYHY cmhi Company.";
contact
"dongxiancun <dongxiancun@cmhi.chinamobile.com>";
revision 2019-07-29 {
description "驱动注册信息";
}
identity category-type {
description
"Base for all category(网元种类) supported by the 驱动适配层. New category
not listed here may be added in the future.";
}
identity router {
base category-type;
description "普通路由器";
}
identity swich {
base category-type;
description "普通交换机";
}
identity of13-swich {
base category-type;
description "openflow1.3的交换机";
}
identity l3-swich {
base category-type;
description "三层交换机";
}
identity firewall {
base category-type;
description "防火墙";
}
identity vpn-gateway {
base category-type;
description "VPN网关";
}
identity bras {
base category-type;
description "固网BRAS";
}
typedef driver-id {
type inet:uri;
description "An identifier for car entry.";
}
typedef drived-revision {
type string {
pattern "(19|20)[0-9][0-9]-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])";
}
description "定义yang module的revision-date格式";
}
container driver-register {
description
"Top-level container for all drivers' info";
list driver-entry {
description "A list of drivers.";
key id;
leaf id {
type driver-id;
description "identifier of the driver.";
}
leaf enable {
type boolean;
default true;
description "是否让该驱动生效,可以让该功能置位,达到驱动禁用、启用的目的";
}
leaf manufacturer {
type string;
description "驱动的厂商信息.";
config false;
mandatory true;
}
leaf driver-version {
type string;
config false;
mandatory true;
description "驱动的软件版本.";
}
list categories {
leaf category {
type identityref {
base category-type;
}
default 'router';
config false;
}
config false;
description "描述性信息,仅供展示:该驱动对应设备的网元类型、范畴,可以同时对应多种范畴。";
}
list drived-mudule {
key "drived-namespace drived-revision";
leaf drived-namespace {
type string;
config false;
mandatory true;
description "该驱动所支持的驱动适配层定义的yang module的namespace。";
}
leaf drived-revision {
type drived-revision;
config false;
mandatory true;
description "该驱动所支持的驱动适配层定义的yang module的revision-date。";
}
config false;
description "该驱动所支持的驱动适配层定义的yang module.";
}
}
}
}

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=2 tabstop=2: -->
<!--
Copyright (c) 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>deploy-site</artifactId>
<version>0.1.0</version>
<packaging>pom</packaging>
<properties>
<stream>latest</stream>
<nexus.site.url>dav:https://nexus.opendaylight.org/content/sites/site/${project.groupId}/${stream}/</nexus.site.url>
</properties>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>2.9</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.4</version>
<configuration>
<inputDirectory>${project.build.directory}/staged-site</inputDirectory>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<site>
<id>opendaylight-site</id>
<url>${nexus.site.url}</url>
</site>
</distributionManagement>
</project>

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
Copyright © 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
<version>0.12.4</version>
<relativePath/>
</parent>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>huawei-driver</artifactId>
<version>0.1.0</version>
<!-- <name> formatting is used by autorelease to parse and notify projects on
build failure. Please do not modify this unless you have a good reason. -->
<name>ODL :: com.cmcc.cmhi :: ${project.artifactId}</name>
<packaging>bundle</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-artifacts</artifactId>
<version>1.7.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>adaptation-layer</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-api</artifactId>
</dependency>
<!-- Testing Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,37 @@
/*
* Copyright © 2019 CMCC Corporation and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package com.cmcc.cmhi.huawei.impl;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HuaweiDriverProvider {
private static final Logger LOG = LoggerFactory.getLogger(HuaweiDriverProvider.class);
private final DataBroker dataBroker;
public HuaweiDriverProvider(final DataBroker dataBroker) {
this.dataBroker = dataBroker;
}
/**
* Method called when the blueprint container is created.
*/
public void init() {
LOG.info("HuaweiDriverProvider Session Initiated");
}
/**
* Method called when the blueprint container is destroyed.
*/
public void close() {
LOG.info("HuaweiDriverProvider Closed");
}
}

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
Copyright © 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
odl:use-default-for-reference-types="true">
<reference id="dataBroker"
interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
odl:type="default"/>
<bean id="provider"
class="com.cmcc.cmhi.huawei.impl.HuaweiDriverProvider"
init-method="init" destroy-method="close">
<argument ref="dataBroker"/>
</bean>
</blueprint>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<version>3.1.4</version>
<relativePath/>
</parent>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>drivers-aggregator</artifactId>
<version>0.1.0</version>
<packaging>pom</packaging>
<modules>
<module>huawei</module>
</modules>
</project>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
<version>3.1.4</version>
<relativePath/>
</parent>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>features-driver-all</artifactId>
<version>0.1.0</version>
<packaging>feature</packaging>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>feature-huawei-driver</artifactId>
<version>${project.version}</version>
<type>xml</type>
<classifier>features</classifier>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
<version>3.1.4</version>
<relativePath/>
</parent>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>feature-huawei-driver</artifactId>
<version>0.1.0</version>
<packaging>feature</packaging>
<name>CMCC :: CMHI :: HuaweiDriver</name>
<properties>
<controller.mdsal.version>1.7.4</controller.mdsal.version>
<mdsal.version>2.4.4</mdsal.version>
<mdsal.model.version>0.12.4</mdsal.model.version>
<netconf.version>1.4.4</netconf.version>
<restconf.version>1.7.4</restconf.version>
<yangtools.version>2.0.6.5</yangtools.version>
<dlux.version>0.7.4</dlux.version>
<dluxapps.version>0.7.4</dluxapps.version>
<configfile.directory>etc/opendaylight/karaf</configfile.directory>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>netconf-artifacts</artifactId>
<version>${netconf.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>restconf-artifacts</artifactId>
<version>${restconf.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>sal-rest-docgen</artifactId>
<version>${restconf.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>features-yangtools</artifactId>
<classifier>features</classifier>
<version>${yangtools.version}</version>
<type>xml</type>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>features-mdsal</artifactId>
<classifier>features</classifier>
<version>${controller.mdsal.version}</version>
<type>xml</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>features-restconf</artifactId>
<classifier>features</classifier>
<version>${restconf.version}</version>
<type>xml</type>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>features-netconf-connector</artifactId>
<classifier>features</classifier>
<version>${netconf.version}</version>
<type>xml</type>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>features-netconf</artifactId>
<classifier>features</classifier>
<version>${netconf.version}</version>
<type>xml</type>
</dependency>
<!--
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>odl-config-netconf-connector</artifactId>
<version>${netconf.version}</version>
<type>xml</type>
<classifier>features</classifier>
</dependency>
-->
<!-- Netconf will not provide schemas without monitoring -->
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>config-manager-facade-xml</artifactId>
<version>0.8.4</version>
</dependency>
<!--
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>odl-netconf-monitoring</artifactId>
<version>${netconf.version}</version>
<type>xml</type>
<classifier>features</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>odl-netconf-console</artifactId>
<version>${netconf.version}</version>
<type>xml</type>
<classifier>features</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>odl-netconf-topology</artifactId>
<version>${netconf.version}</version>
<type>xml</type>
<classifier>features</classifier>
</dependency>
-->
<!-- 在karaf中打包
<dependency>
<groupId>org.opendaylight.dluxapps</groupId>
<artifactId>features-dluxapps</artifactId>
<version>${dlux.version}</version>
<classifier>features</classifier>
<type>xml</type>
</dependency>
-->
<dependency>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>huawei-driver</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<version>3.1.4</version>
<relativePath/>
</parent>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>driver-layer-features-aggregator</artifactId>
<version>0.1.0</version>
<packaging>pom</packaging>
<modules>
<module>huawei-driver</module>
<module>features-driver-all</module>
</modules>
</project>

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-it-parent</artifactId>
<version>1.7.4</version>
<relativePath/>
</parent>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>driver-layer-it</artifactId>
<version>0.1.0</version>
<!-- <name> formatting is used by autorelease to parse and notify projects on
build failure. Please do not modify this unless you have a good reason. -->
<name>ODL :: com.cmcc.cmhi :: ${project.artifactId}</name>
<packaging>bundle</packaging>
<properties>
<skipITs>false</skipITs>
<karaf.distro.groupId>com.cmcc.cmhi</karaf.distro.groupId>
<karaf.distro.artifactId>driver-layer-karaf</karaf.distro.artifactId>
<karaf.distro.version>0.1.0</karaf.distro.version>
<karaf.distro.type>zip</karaf.distro.type>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>features-driver-all</artifactId>
<version>${project.version}</version>
<classifier>features</classifier>
<type>xml</type>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,60 @@
/*
* Copyright © 2019 CMCC Corporation and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package com.cmcc.cmhi.it;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
import org.ops4j.pax.exam.options.MavenUrlReference;
import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
import org.ops4j.pax.exam.spi.reactors.PerClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.ops4j.pax.exam.CoreOptions.composite;
import static org.ops4j.pax.exam.CoreOptions.maven;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
@RunWith(PaxExam.class)
@ExamReactorStrategy(PerClass.class)
public class DriverLayerIT extends AbstractMdsalTestBase {
private static final Logger LOG = LoggerFactory.getLogger(DriverLayerIT.class);
@Override
public MavenUrlReference getFeatureRepo() {
return maven()
.groupId("com.cmcc.cmhi")
.artifactId("features-driver-all")
.classifier("features")
.type("xml")
.versionAsInProject();
}
@Override
public String getFeatureName() {
return "features-driver-all";
}
@Override
public Option getLoggingOption() {
Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,
logConfiguration(DriverLayerIT.class),
LogLevel.INFO.name());
option = composite(option, super.getLoggingOption());
return option;
}
@Test
public void testDriverLayerFeatureLoad() {
Assert.assertTrue(true);
}
}

View File

@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>karaf4-parent</artifactId>
<version>3.1.4</version>
<relativePath/>
</parent>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>driver-layer-karaf</artifactId>
<version>0.1.0</version>
<!-- <name> formatting is used by autorelease to parse and notify projects on
build failure. Please do not modify this unless you have a good reason. -->
<name>ODL :: com.cmcc.cmhi :: ${project.artifactId}</name>
<properties>
<!-- <karaf.localFeature>odl-driver-layer-ui</karaf.localFeature> -->
<integration.version>0.8.4</integration.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opendaylight.integration</groupId>
<artifactId>all-artifacts</artifactId>
<version>${integration.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- scope is compile so all features (there is only one) are installed
into startup.properties and the feature repo itself is not installed
默认仅安装干净的karaf框架
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>framework</artifactId>
<type>kar</type>
</dependency>
-->
<!--
为了测试方便安装Integration版本的所有模块
-->
<!-- Integration index feature repository. -->
<dependency>
<groupId>org.opendaylight.integration</groupId>
<artifactId>features-index</artifactId>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>opendaylight-karaf4-empty</artifactId>
</exclusion>
<exclusion>
<groupId>org.opendaylight.controller</groupId>
<artifactId>opendaylight-karaf-empty</artifactId>
</exclusion>
<exclusion>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>opendaylight-karaf-empty</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Integration test feature repository. -->
<dependency>
<groupId>org.opendaylight.integration</groupId>
<artifactId>features-test</artifactId>
<classifier>features</classifier>
<type>xml</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>opendaylight-karaf4-empty</artifactId>
</exclusion>
<exclusion>
<groupId>org.opendaylight.controller</groupId>
<artifactId>opendaylight-karaf-empty</artifactId>
</exclusion>
<exclusion>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>opendaylight-karaf-empty</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.opendaylight.aaa</groupId>
<artifactId>aaa-cli-jar</artifactId>
<!-- This scope test here is just a trick, so that we can use aaa-cli-jar in maven-dependency-plugin, but don't have karaf-maven-plugin choke on it -->
<scope>test</scope>
</dependency>
<!--自己的模块-->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>features-driver-all</artifactId>
<classifier>features</classifier>
<version>${project.version}</version>
<type>xml</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- DO NOT deploy the karaf artifact -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,181 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
Copyright © 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
<version>0.12.4</version>
<relativePath/>
</parent>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>driver-layer-parent</artifactId>
<version>0.1.0</version>
<!-- <name> formatting is used by autorelease to parse and notify projects on
build failure. Please do not modify this unless you have a good reason. -->
<name>ODL :: com.cmcc.cmhi :: ${project.artifactId}</name>
<packaging>pom</packaging>
<!--
<scm>
<connection>scm:git:ssh://git.opendaylight.org:29418/driver-layer.git</connection>
<developerConnection>scm:git:ssh://git.opendaylight.org:29418/driver-layer.git</developerConnection>
<tag>HEAD</tag>
<url>https://wiki.opendaylight.org/view/driver-layer:Main</url>
</scm>
-->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-artifacts</artifactId>
<version>1.7.4</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compile.plugin.version}</version>
<configuration>
<source>${java.version.source}</source>
<target>${java.version.target}</target>
</configuration>
</plugin>
<!-- Ignore/Execute plugin execution -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<versionRange>[0.0,)</versionRange>
<goals>
<goal>set-system-properties</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<versionRange>[0.0,)</versionRange>
<goals>
<goal>prepare-agent</goal>
<goal>pre-test</goal>
<goal>post-test</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>maven-paxexam-plugin</artifactId>
<versionRange>[1.2.4,)</versionRange>
<goals>
<goal>generate-depends-file</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>false</runOnIncremental>
</execute>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-maven-plugin</artifactId>
<versionRange>[0.5,)</versionRange>
<goals>
<goal>generate-sources</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute/>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<versionRange>1.0</versionRange>
<goals>
<goal>execute</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<versionRange>${enforcer.version}</versionRange>
<goals>
<goal>enforce</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<failOnError>true</failOnError>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2019 CMCC Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<version>3.1.4</version>
<relativePath/>
</parent>
<groupId>com.cmcc.cmhi</groupId>
<artifactId>driver-layer-aggregator</artifactId>
<version>0.1.0</version>
<name>driver-layer</name> <!-- DO NOT CHANGE - Used by Sonar to set project name -->
<packaging>pom</packaging>
<modules>
<module>parent</module>
<module>adaptation-layer</module>
<module>drivers</module>
<module>features</module>
<module>karaf</module>
<module>it</module>
</modules>
</project>