Skip to content

Commit

Permalink
update to support configuring an option source (intf or address), and…
Browse files Browse the repository at this point in the history
… configure server by hostname. This also adds network-instance.
  • Loading branch information
rachidtt committed Sep 25, 2024
1 parent 4513c14 commit 32db04a
Showing 1 changed file with 145 additions and 1 deletion.
146 changes: 145 additions & 1 deletion release/models/relay-agent/openconfig-relay-agent.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -624,6 +633,62 @@ 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 local-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 local-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 relay-agent-ipv4-interfaces-config {
description
"Configuration data for interfaces enabled for relaying";
Expand All @@ -644,13 +709,53 @@ 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
expected to forward DHCPv4/BOOTP requests to all listed
server addresses when DHCPv4 relaying is enabled globally, or
on the interface.";
}

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 relay-agent-ipv4-interfaces-state {
Expand Down Expand Up @@ -736,13 +841,52 @@ 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
is expected to forward DHCPv4/BOOTP requests to all listed
server addresses when DHCPv6 relaying is enabled globally, or
on the interface.";
}

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-ipv6-interfaces-state {
Expand Down

0 comments on commit 32db04a

Please sign in to comment.