Add aaa-12 驱动适配层,yang定义
RCA: SOL: 修改人:dongxiancun 检视人:dongxiancun
This commit is contained in:
parent
fccc3a7c69
commit
b9b731a851
|
@ -1,13 +1,11 @@
|
||||||
<?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
|
||||||
This program and the accompanying materials are made available under the
|
is available at http://www.eclipse.org/legal/epl-v10.html -->
|
||||||
terms of the Eclipse Public License v1.0 which accompanies this distribution,
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
and is available at http://www.eclipse.org/legal/epl-v10.html
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
-->
|
|
||||||
<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">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -16,21 +14,37 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
<groupId>org.opendaylight.mdsal</groupId>
|
<groupId>org.opendaylight.mdsal</groupId>
|
||||||
<artifactId>binding-parent</artifactId>
|
<artifactId>binding-parent</artifactId>
|
||||||
<version>0.12.4</version>
|
<version>0.12.4</version>
|
||||||
<relativePath/>
|
<relativePath />
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>com.cmcc.cmhi</groupId>
|
<groupId>com.cmcc.cmhi</groupId>
|
||||||
<artifactId>adaptation-layer</artifactId>
|
<artifactId>adaptation-layer</artifactId>
|
||||||
<version>0.1.0</version>
|
<version>0.1.0</version>
|
||||||
<!-- <name> formatting is used by autorelease to parse and notify projects on
|
<!-- <name> formatting is used by autorelease to parse and notify projects
|
||||||
build failure. Please do not modify this unless you have a good reason. -->
|
on build failure. Please do not modify this unless you have a good reason. -->
|
||||||
<name>ODL :: com.cmcc.cmhi :: ${project.artifactId}</name>
|
<name>ODL :: com.cmcc.cmhi :: ${project.artifactId}</name>
|
||||||
<packaging>bundle</packaging>
|
<packaging>bundle</packaging>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
<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>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.opendaylight.controller.model</groupId>
|
||||||
|
<artifactId>model-topology</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue