From c4320cd03658ec38347315786104d4599fc150cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Mon, 22 Jan 2024 16:18:28 +0100 Subject: [PATCH] ietf-hardware: Add infix deviations --- src/confd/bin/bootstrap | 1 + src/confd/yang/infix-hardware@2024-01-18.yang | 100 ++++++++++++++---- 2 files changed, 80 insertions(+), 21 deletions(-) diff --git a/src/confd/bin/bootstrap b/src/confd/bin/bootstrap index faa22c63..3129bf61 100755 --- a/src/confd/bin/bootstrap +++ b/src/confd/bin/bootstrap @@ -212,6 +212,7 @@ sysrepoctl -s $SEARCH \ -i iana-if-type@2023-01-26.yang -g wheel -p 0660 \ -i iana-hardware@2018-03-13.yang -g wheel -p 0660 \ -i ietf-hardware@2018-03-13.yang -g wheel -p 0660 \ + -i infix-hardware@2024-01-18.yang -g wheel -p 0660 \ -i ieee802-dot1q-types@2022-10-29.yang -g wheel -p 0660 \ -i infix-ip@2023-09-14.yang -g wheel -p 0660 \ -i infix-if-type@2023-08-21.yang -g wheel -p 0660 \ diff --git a/src/confd/yang/infix-hardware@2024-01-18.yang b/src/confd/yang/infix-hardware@2024-01-18.yang index b7bc75fe..35e71553 100644 --- a/src/confd/yang/infix-hardware@2024-01-18.yang +++ b/src/confd/yang/infix-hardware@2024-01-18.yang @@ -1,31 +1,89 @@ module infix-hardware { - yang-version 1.1; - namespace "urn:infix:hardware:ns:yang:1.0"; - prefix ih; - import ietf-hardware { - prefix iehw; + yang-version 1.1; + namespace "urn:infix:hardware:ns:yang:1.0"; + prefix ih; + import ietf-hardware { + prefix iehw; + } + import iana-hardware { + prefix iahw; + } + + import ietf-yang-types { + prefix yang; + } + + revision 2024-01-18 { + description "Initial"; + reference "internal"; + } + typedef country-code { + type string { + length 2; + pattern "[A-Za-z]+"; } - import iana-hardware { - prefix iahw; - } - revision 2024-01-18 { - description "Initial"; - reference "internal"; - } - identity power { - base iahw:hardware-class; - } - identity product { - base iahw:hardware-class; - } - augment "/iehw:hardware/iehw:component" { + description "A two-letter country code."; + } + + augment "/iehw:hardware/iehw:component" { + container vpd-data { + config false; + leaf product-name { + type string; + } leaf part-number { type string; } - } - augment "/iehw:hardware/iehw:component" { + leaf serial-number { + type string; + } + leaf mac-address { + type yang:mac-address; + } + leaf manufacture-date { + type string; + } + leaf device-version { + type uint8; + } + leaf label-revision { + type string; + } + leaf label-version { + type string; + } + leaf platform-name { + type string; + } + leaf onie-version { + type string; + } + leaf num-macs { + type uint16; + } + leaf manufacturer { + type string; + } + leaf coutry-code { + type country-code; + } leaf vendor { type string; } + leaf diag-version { + type string; + } + leaf service-tag { + type string; + } + list vendor-extension { + leaf iana-enterprise-number { + type uint32; + } + leaf extension-data { + type string; + } + } } + } }