diff --git a/release/models/relay-agent/openconfig-relay-agent.yang b/release/models/relay-agent/openconfig-relay-agent.yang index 22889af66..221627946 100644 --- a/release/models/relay-agent/openconfig-relay-agent.yang +++ b/release/models/relay-agent/openconfig-relay-agent.yang @@ -10,8 +10,10 @@ module openconfig-relay-agent { // import some basic types import ietf-inet-types { prefix inet; } import ietf-yang-types { prefix yang; } + import openconfig-network-instance { prefix oc-ni; } import openconfig-interfaces { prefix oc-if; } import openconfig-extensions { prefix oc-ext; } + import openconfig-inet-types { prefix oc-inet; } // meta @@ -27,7 +29,14 @@ module openconfig-relay-agent { packets. The supports both DHCP and DHCPv6 and device-wide and per-interface settings."; - oc-ext:openconfig-version "0.1.2"; + oc-ext:openconfig-version "0.2.0"; + + revision "2024-09-18" { + description + "Turn helper-address into a keyed list and add attributes for + source and hostname configuration"; + reference "0.2.0"; + } revision "2023-02-06" { description @@ -624,6 +633,148 @@ module openconfig-relay-agent { } + grouping relay-agent-ipv4-helper-address-config { + description + "Configuration options for an IP helper-address"; + + leaf address { + type oc-inet:host; + description + "IP address to relay DHCP requests to"; + } + + leaf source-address { + type union { + type inet:ipv4-address; + type oc-if:interface-id; + } + description + "IP address or interface whose IP address is to be used as source in + relayed DHCP requests"; + } + + leaf network-instance { + type oc-ni:network-instance-ref; + description + "The network instance that this DHCP Server + is associated with"; + } + } + + grouping relay-agent-ipv6-helper-address-config { + description + "Configuration options for an IPv6 helper-address"; + + leaf address { + type oc-inet:host; + description + "IPv6 address to relay DHCPv6 requests to"; + } + + leaf source-address { + type union { + type inet:ipv6-address; + type oc-if:interface-id; + } + description + "IPv6 address or interface whose IPv6 address is to be used as source in + relayed DHCPv6 requests"; + } + + leaf network-instance { + type oc-ni:network-instance-ref; + description + "The network instance that this DHCP Server + is associated with"; + } + } + + grouping helper-addresses-ipv4-top { + description + "Top-level grouping for DHCPv4 helper-addresses on interfaces"; + + container helper-addresses { + description + "Enclosing container for helper addresses"; + list helper-address { + key "address"; + description + "List of IPv4 addresses of DHCP servers to which the + relay agent should forward DHCPv4 requests. The relay agent is + expected to forward DHCPv4/BOOTP requests to all listed + server addresses when DHCPv4 relaying is enabled globally, or + on the interface."; + + leaf address { + type leafref { + path "../config/address"; + } + description + "Reference to list key representing IP helper address"; + } + + container config { + description + "Configuration data for IP helper address"; + + uses relay-agent-ipv4-helper-address-config; + } + + container state { + config false; + + description + "Operational state for IP helper address"; + + uses relay-agent-ipv4-helper-address-config; + } + } + } + } + + grouping helper-addresses-ipv6-top{ + description + "Top-level grouping for DHCPv4 helper-addresses on interfaces"; + + container helper-addresses { + description + "Enclosing container for IPv6 helper addresses"; + list helper-address { + key "address"; + description + "List of IPv6 addresses of DHCP servers to which the + relay agent should forward DHCPv6 requests. The relay agent + is expected to forward DHCPv4/BOOTP requests to all listed + server addresses when DHCPv6 relaying is enabled globally, or + on the interface."; + + leaf address { + type leafref { + path "../config/address"; + } + description + "Reference to list key representing IP helper address"; + } + + container config { + description + "Configuration data for IP helper address"; + + uses relay-agent-ipv6-helper-address-config; + } + + container state { + config false; + + description + "Operational state for IP helper address"; + + uses relay-agent-ipv6-helper-address-config; + } + } + } + } + grouping relay-agent-ipv4-interfaces-config { description "Configuration data for interfaces enabled for relaying"; @@ -644,6 +795,7 @@ module openconfig-relay-agent { leaf-list helper-address { type inet:ip-address; + status deprecated; description "List of IPv4 or IPv6 addresses of DHCP servers to which the relay agent should forward DHCPv4 requests. The relay agent is @@ -712,6 +864,7 @@ module openconfig-relay-agent { uses oc-if:interface-ref; uses agent-information-ipv4-interface-top; + uses helper-addresses-ipv4-top; } } } @@ -736,6 +889,7 @@ module openconfig-relay-agent { leaf-list helper-address { type inet:ipv6-address; + status deprecated; description "List of IPv6 addresses of DHCP servers to which the relay agent should forward DHCPv6 requests. The relay agent @@ -804,6 +958,7 @@ module openconfig-relay-agent { uses oc-if:interface-ref; uses agent-options-ipv6-interface-top; + uses helper-addresses-ipv6-top; } } }