From 1bf1f06a216c0d703ef8fa018ee05e50fdb97c2e Mon Sep 17 00:00:00 2001 From: Jon-Olov Vatn Date: Fri, 15 Sep 2023 12:05:24 +0200 Subject: [PATCH] Updating infix-ip to clarify non-support deviations of ietf-ip Setting deviations of non-supported parts of ietf-ip Idea is that "pyang -f tree ietf-ip.yang infix-ip.yang" should show what we really support (and should make tests for). --- src/confd/confd-bootstrap.sh | 2 +- src/confd/yang/infix-ip@2023-04-24.yang | 47 --------- src/confd/yang/infix-ip@2023-09-14.yang | 131 ++++++++++++++++++++++++ 3 files changed, 132 insertions(+), 48 deletions(-) delete mode 100644 src/confd/yang/infix-ip@2023-04-24.yang create mode 100644 src/confd/yang/infix-ip@2023-09-14.yang diff --git a/src/confd/confd-bootstrap.sh b/src/confd/confd-bootstrap.sh index 2fadf71c..30964169 100755 --- a/src/confd/confd-bootstrap.sh +++ b/src/confd/confd-bootstrap.sh @@ -76,7 +76,7 @@ sysrepoctl -s $SEARCH \ -i ieee802-dot1q-types@2022-10-29.yang -g wheel -p 0660 \ -i ietf-if-vlan-encapsulation@2023-01-26.yang \ -g wheel -p 0660 \ - -i infix-ip@2023-04-24.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 \ -i infix-interfaces@2023-09-19.yang -g wheel -p 0660 \ -e vlan-filtering \ diff --git a/src/confd/yang/infix-ip@2023-04-24.yang b/src/confd/yang/infix-ip@2023-04-24.yang deleted file mode 100644 index 663d8904..00000000 --- a/src/confd/yang/infix-ip@2023-04-24.yang +++ /dev/null @@ -1,47 +0,0 @@ -module infix-ip { - yang-version 1.1; - namespace "urn:infix:params:xml:ns:yang:infix-ip"; - prefix infix-ip; - - import ietf-interfaces { - prefix if; - } - import ietf-ip { - prefix ip; - } - import ietf-inet-types { - prefix inet; - } - import ietf-yang-types { - prefix yang; - } - - description - "This module augments ietf-ip with an IPv4 link-local autoconf"; - - revision 2023-04-24 { - description - "Initial revision."; - reference - "RFC 7277: A YANG Data Model for IP Management"; - } - - /* - * Data nodes - */ - augment "/if:interfaces/if:interface/ip:ipv4" { - container autoconf { - description - "Parameters to control the autoconfiguration of IPv4 address."; - - leaf enabled { - type boolean; - default false; - description - "Use a ZeroConf/IPv4LL agent to retrieve an 169.254/16 address."; - reference - "RFC 3927: Dynamic Configuration of IPv4 Link-Local Addresses"; - } - } - } -} diff --git a/src/confd/yang/infix-ip@2023-09-14.yang b/src/confd/yang/infix-ip@2023-09-14.yang new file mode 100644 index 00000000..ae5db0ec --- /dev/null +++ b/src/confd/yang/infix-ip@2023-09-14.yang @@ -0,0 +1,131 @@ +module infix-ip { + yang-version 1.1; + namespace "urn:infix:params:xml:ns:yang:infix-ip"; + prefix infix-ip; + + import ietf-interfaces { + prefix if; + } + import ietf-ip { + prefix ip; + } + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + + description + "This module augments ietf-ip with an IPv4 link-local autoconf"; + + revision 2023-09-14 { + description + "Added deviations for unsupported parts of ietf-ip."; + } + + revision 2023-04-24 { + description + "Initial revision."; + reference + "RFC 7277: A YANG Data Model for IP Management"; + } + + /* + * Data nodes + */ + augment "/if:interfaces/if:interface/ip:ipv4" { + container autoconf { + description + "Parameters to control the autoconfiguration of IPv4 address."; + + leaf enabled { + type boolean; + default false; + description + "Use a ZeroConf/IPv4LL agent to retrieve an 169.254/16 address."; + reference + "RFC 3927: Dynamic Configuration of IPv4 Link-Local Addresses"; + } + } + } + + deviation "/if:interfaces/if:interface/ip:ipv4/ip:address/ip:subnet/ip:netmask" { + deviate not-supported; + } + + deviation "/if:interfaces/if:interface/ip:ipv4/ip:address/ip:origin" { + deviate not-supported; + } + + deviation "/if:interfaces/if:interface/ip:ipv4/ip:neighbor/ip:origin" { + deviate not-supported; + } + + deviation "/if:interfaces/if:interface/ip:ipv6/ip:address/ip:origin" { + deviate not-supported; + } + + deviation "/if:interfaces/if:interface/ip:ipv6/ip:address/ip:status" { + deviate not-supported; + } + + deviation "/if:interfaces/if:interface/ip:ipv6/ip:neighbor/ip:origin" { + deviate not-supported; + } + + deviation "/if:interfaces/if:interface/ip:ipv6/ip:neighbor/ip:is-router" { + deviate not-supported; + } + + deviation "/if:interfaces/if:interface/ip:ipv6/ip:neighbor/ip:state" { + deviate not-supported; + } + + deviation "/if:interfaces/if:interface/ip:ipv6/ip:autoconf/ip:create-temporary-addresses" { + deviate not-supported; + } + + deviation "/if:interfaces/if:interface/ip:ipv6/ip:autoconf/ip:temporary-valid-lifetime" { + deviate not-supported; + } + + deviation "/if:interfaces/if:interface/ip:ipv6/ip:autoconf/ip:temporary-preferred-lifetime" { + deviate not-supported; + } + + deviation "/if:interfaces-state/if:interface/ip:ipv4/ip:forwarding" { + deviate not-supported; + } + + deviation "/if:interfaces-state/if:interface/ip:ipv4/ip:address/ip:subnet/ip:netmask" { + deviate not-supported; + } + + deviation "/if:interfaces-state/if:interface/ip:ipv4/ip:address/ip:origin" { + deviate not-supported; + } + + deviation "/if:interfaces-state/if:interface/ip:ipv4/ip:neighbor" { + deviate not-supported; + } + + deviation "/if:interfaces-state/if:interface/ip:ipv6/ip:forwarding" { + deviate not-supported; + } + + deviation "/if:interfaces-state/if:interface/ip:ipv6/ip:mtu" { + deviate not-supported; + } + + deviation "/if:interfaces-state/if:interface/ip:ipv6/ip:address" { + deviate not-supported; + } + + deviation "/if:interfaces-state/if:interface/ip:ipv6/ip:neighbor" { + deviate not-supported; + } + +} + +