From ebc8ba4b5b2e186b699e6f56be407df53b5df737 Mon Sep 17 00:00:00 2001 From: dongxiancun Date: Thu, 15 Aug 2019 16:34:09 +0800 Subject: [PATCH] =?UTF-8?q?Mod=20aaa-12=20=E4=B8=BA=E4=B8=8A=E5=B1=82?= =?UTF-8?q?=E6=8F=90=E4=BE=9B=E6=B7=BB=E5=8A=A0=E5=92=8C=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=8D=8E=E4=B8=BA=E8=AE=BE=E5=A4=87=E7=9A=84=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E3=80=82=20RCA=EF=BC=9A=20SOL=EF=BC=9A=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BA=BA=EF=BC=9Adongxiancun=20=E6=A3=80=E8=A7=86=E4=BA=BA?= =?UTF-8?q?=EF=BC=9Adongxiancun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/yang/device-status.yang | 15 +++++++ .../src/main/yang/huawei-connector.yang | 45 +++++++++++++++++++ .../features/feature-adaptation-layer/pom.xml | 1 + 3 files changed, 61 insertions(+) create mode 100644 ControlPlatform/driver-layer/drivers/huawei/src/main/yang/huawei-connector.yang diff --git a/ControlPlatform/driver-layer/adaptation-layer/src/main/yang/device-status.yang b/ControlPlatform/driver-layer/adaptation-layer/src/main/yang/device-status.yang index cb435f002..03f8ad40b 100644 --- a/ControlPlatform/driver-layer/adaptation-layer/src/main/yang/device-status.yang +++ b/ControlPlatform/driver-layer/adaptation-layer/src/main/yang/device-status.yang @@ -3,6 +3,7 @@ module device-status { namespace "urn:cmcc:cmhi:adaptation-layer:device-status"; prefix "device-status"; + import driver-register { prefix "dr"; revision-date 2019-07-29; } import network-topology { prefix "topo"; revision-date "2013-10-21"; } import yang-ext { prefix ext; } @@ -37,6 +38,15 @@ module device-status { } } + grouping driver-status { + container driver-id-info { + leaf-list driver { + type dr:driver-id; + description "该设备的驱动列表"; + } + } + } + augment "/topo:network-topology/topo:topology/topo:node" { ext:augment-identifier "node-cpu"; uses cpu-status; @@ -46,4 +56,9 @@ module device-status { ext:augment-identifier "node-memory"; uses mem-status; } + + augment "/topo:network-topology/topo:topology/topo:node" { + ext:augment-identifier "node-driver"; + uses driver-status; + } } diff --git a/ControlPlatform/driver-layer/drivers/huawei/src/main/yang/huawei-connector.yang b/ControlPlatform/driver-layer/drivers/huawei/src/main/yang/huawei-connector.yang new file mode 100644 index 000000000..a63bffa74 --- /dev/null +++ b/ControlPlatform/driver-layer/drivers/huawei/src/main/yang/huawei-connector.yang @@ -0,0 +1,45 @@ +// Contents of "huawei-connector" +module huawei-connector { + namespace "urn:cmcc:cmhi:huawei-connector"; + prefix "huawei-connector"; + + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + + revision 2019-08-09 { + description "Initial revision"; + } + + grouping connect-device { + leaf id { + type inet:uri; + } + leaf ip { + type inet:ip-address; + mandatory true; + } + leaf port { + type inet:port-number; + mandatory true; + } + leaf user-name { + type string; + mandatory true; + } + leaf password { + type string; + mandatory true; + } + leaf connect { + type boolean; + default true; + description "是否连接该设备,默认连接,当为false时,不与设备建联,仅仅用于保存配置"; + } + } + + container connector-info { + list remote-devices { + key "id"; + uses connect-device; + } + } +} diff --git a/ControlPlatform/driver-layer/features/feature-adaptation-layer/pom.xml b/ControlPlatform/driver-layer/features/feature-adaptation-layer/pom.xml index b5cabece8..97eb7102d 100644 --- a/ControlPlatform/driver-layer/features/feature-adaptation-layer/pom.xml +++ b/ControlPlatform/driver-layer/features/feature-adaptation-layer/pom.xml @@ -71,6 +71,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL features-restconf features xml + runtime