Add aaa-12 驱动适配层,yang定义

RCA:
SOL:
修改人:dongxiancun
检视人:dongxiancun
This commit is contained in:
dongxiancun 2019-08-09 18:59:05 +08:00
parent fccc3a7c69
commit b9b731a851
3 changed files with 155 additions and 28 deletions

View File

@ -1,36 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: --> <!-- vi: set et smarttab sw=4 tabstop=4: -->
<!-- <!-- Copyright © 2019 CMCC Corporation and others. All rights reserved. This
Copyright © 2019 CMCC Corporation and others. All rights reserved. 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">
This program and the accompanying materials are made available under the <modelVersion>4.0.0</modelVersion>
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>
<parent> <groupId>com.cmcc.cmhi</groupId>
<groupId>org.opendaylight.mdsal</groupId> <artifactId>adaptation-layer</artifactId>
<artifactId>binding-parent</artifactId> <version>0.1.0</version>
<version>0.12.4</version> <!-- <name> formatting is used by autorelease to parse and notify projects
<relativePath/> on build failure. Please do not modify this unless you have a good reason. -->
</parent> <name>ODL :: com.cmcc.cmhi :: ${project.artifactId}</name>
<packaging>bundle</packaging>
<groupId>com.cmcc.cmhi</groupId> <dependencyManagement>
<artifactId>adaptation-layer</artifactId> <dependencies>
<version>0.1.0</version> <dependency>
<!-- <name> formatting is used by autorelease to parse and notify projects on <groupId>org.opendaylight.controller</groupId>
build failure. Please do not modify this unless you have a good reason. --> <artifactId>mdsal-artifacts</artifactId>
<name>ODL :: com.cmcc.cmhi :: ${project.artifactId}</name> <version>1.7.4</version>
<packaging>bundle</packaging> <scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.opendaylight.mdsal.model</groupId> <groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>ietf-inet-types-2013-07-15</artifactId> <artifactId>ietf-inet-types-2013-07-15</artifactId>
</dependency> </dependency>
</dependencies> <dependency>
<groupId>org.opendaylight.controller.model</groupId>
<artifactId>model-topology</artifactId>
</dependency>
</dependencies>
</project> </project>

View File

@ -0,0 +1,49 @@
// Contents of "device-status"
module device-status {
namespace "urn:cmcc:cmhi:adaptation-layer:device-status";
prefix "device-status";
import network-topology { prefix "topo"; revision-date "2013-10-21"; }
import yang-ext { prefix ext; }
revision 2019-08-09 {
description "扩展CPU和内存状态信息";
}
grouping cpu-status {
container cpu-infos {
description "CPU的状态信息";
leaf usage-rate {
type int16 {
range "0..100";
}
}
}
}
grouping mem-status {
container memory-infos {
description "内存的状态信息";
leaf memory-total {
type int16 {
range "0..100";
}
}
leaf usage-rate {
type int16 {
range "0..100";
}
}
}
}
augment "/topo:network-topology/topo:topology/topo:node" {
ext:augment-identifier "node-cpu";
uses cpu-status;
}
augment "/topo:network-topology/topo:topology/topo:node" {
ext:augment-identifier "node-memory";
uses mem-status;
}
}

View File

@ -0,0 +1,64 @@
// Contents of "tp-extension"
module tp-extension {
namespace "urn:cmcc:cmhi:adaptation-layer:tp-extension";
prefix "tp-extension";
import network-topology { prefix "topo"; revision-date "2013-10-21"; }
import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; }
import yang-ext { prefix ext; }
revision 2019-08-09 {
description "扩展端口的scheme";
}
grouping tp-status {
container tp-infos {
description "端口的状态信息";
leaf tp-name {
type string;
}
leaf tp-phy-type {
type string ;
default "Ethernet";
}
leaf tp-number {
type string ;
}
container tp-admin-status {
leaf admin-status {
type enumeration {
enum up;
enum down;
}
}
}
leaf mtu {
type int16 ;
default 1500;
}
leaf tx-rate {
type int16 ;
default "单位为Mbps";
}
leaf rx-rate {
type int16 ;
default "单位为Mbps";
}
list ip-address {
leaf ip {
description "IPv4 or IPv6 address";
type inet:ip-address;
}
leaf prefix {
type inet:ip-prefix;
description "掩码格式255.255.255.0";
}
}
}
}
augment "/topo:network-topology/topo:topology/topo:node/topo:termination-point" {
ext:augment-identifier "tp-ext";
uses tp-status;
}
}