From 5e707753e9ed411a8c47efea728dabbcb8290eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Wed, 7 Feb 2024 18:18:46 +0100 Subject: [PATCH] ietf-hardware: YANG: Deviate everything not supported yet --- src/confd/yang/infix-hardware@2024-01-18.yang | 52 ++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/src/confd/yang/infix-hardware@2024-01-18.yang b/src/confd/yang/infix-hardware@2024-01-18.yang index 35e71553..ec7b2d58 100644 --- a/src/confd/yang/infix-hardware@2024-01-18.yang +++ b/src/confd/yang/infix-hardware@2024-01-18.yang @@ -8,7 +8,7 @@ module infix-hardware { import iana-hardware { prefix iahw; } - + import ietf-yang-types { prefix yang; } @@ -25,6 +25,56 @@ module infix-hardware { description "A two-letter country code."; } + identity hardware-class { + description "infix hardware base class"; + } + + identity usb { + base hardware-class; + description "This identity is used to describe a USB port"; + } + identity vpd { + base hardware-class; + description "This identity is used to a VPD memory on the device."; + } + + deviation "/iehw:hardware/iehw:component/iehw:class" { + deviate replace { + type identityref { + base hardware-class; + } + } + } + + deviation "/iehw:hardware/iehw:component/iehw:state/iehw:admin-state" { + deviate add { + must ". = 'locked' or . = 'unlocked'" { + error-message "Only 'locked' and 'unlocked' states are allowed here."; + } + } + } + + deviation "/iehw:hardware/iehw:component/iehw:state/iehw:standby-state" { + deviate not-supported; + } + deviation "/iehw:hardware/iehw:component/iehw:sensor-data" { + deviate not-supported; + } + deviation "/iehw:hardware/iehw:component/iehw:parent" { + deviate not-supported; + } + deviation "/iehw:hardware/iehw:component/iehw:parent-rel-pos" { + deviate not-supported; + } + deviation "/iehw:hardware/iehw:component/iehw:alias" { + deviate not-supported; + } + deviation "/iehw:hardware/iehw:component/iehw:uri" { + deviate not-supported; + } + deviation "/iehw:hardware/iehw:component/iehw:asset-id" { + deviate not-supported; + } augment "/iehw:hardware/iehw:component" { container vpd-data { config false;