Commit ffd2ad47 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[gitlab3] Imported models from IETF Hackathon

parent 30a7dc7a
module ietf-dhcpv6-client {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-client";
prefix "dhcpv6-client";
import ietf-dhcpv6-options {
prefix dhcpv6-options;
}
import ietf-dhcpv6-types {
prefix dhcpv6-types;
}
import ietf-interfaces {
prefix if;
}
organization "DHC WG";
contact
"cuiyong@tsinghua.edu.cn
wangh13@mails.tsinghua.edu.cn
lh.sunlinh@gmail.com
ian.farrer@telekom.de
sladjana.zechlin@telekom.de
hezihao9512@gmail.com ";
description "This model defines a YANG data model that can be
used to configure and manage a DHCPv6 client.";
revision 2018-03-04 {
description "Resolved most issues on the DHC official
github";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-12-22 {
description "Resolve most issues on Ian's github.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-11-24 {
description "First version of the separated client specific
YANG model.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
/*
* Data Nodes
*/
container client {
presence "Enables the client";
description "dhcpv6 client portion";
container client-config {
description "configuration tree of client";
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
list client-if {
key if-name;
description "A client may have several interfaces, it is more reasonable to
configure and manage parameters on the interface-level. The list defines
specific client interfaces and their data. Different interfaces are
distinguished by the key which is a configurable string value.";
leaf if-name {
type if:interface-ref;
mandatory true;
description "interface name";
}
leaf cli-id {
type uint32;
mandatory true;
description "client id";
}
/*
leaf description {
type string;
description "description of the client interface";
}
*/
leaf pd-function {
type boolean;
mandatory true;
description "Whether the client can act as a requesting router
to request prefixes using prefix delegation ([RFC3633]).";
}
leaf rapid-commit {
type boolean;
mandatory true;
description "'1' indicates a client can initiate a Solicit-Reply message
exchange by adding a Rapid Commit option in Solicit message. '0' means
the client is not allowed to add a Rapid Commit option to request
addresses in a two-message exchange pattern.";
}
/*
container mo-tab {
description "The management tab label indicates the operation mode of the
DHCPv6 client.
'm'=1 and 'o'=1 indicate the client will use DHCPv6 to obtain all the configuration
data.
'm'=1 and 'o'=0 are a meaningless combination.
'm'=0 and 'o'=1 indicate the client will use stateless DHCPv6 to obtain configuration
data apart from addresses/prefixes data.
'm'=0 and 'o'=0 represent the client will not use DHCPv6 but use SLAAC to
achieve configuration.";
// if - not sure about the intended use here as it seems
// to be redfining what will be received in the PIO. Is
// the intention to be whether they PIO options will be
// obeyed as received or overridden?
leaf m-tab {
type boolean;
mandatory true;
description "m tab";
}
leaf o-tab {
type boolean;
mandatory true;
description "o tab";
}
}
*/
container client-configured-options {
description "client configured options";
uses dhcpv6-options:client-option-definitions;
}
}
}
container client-state {
config "false";
description "state tree of client";
container if-other-paras {
description "A client can obtain extra configuration
data other than address and prefix information through
DHCPv6. This container describes such data the client
was configured. The potential configuration data may
include DNS server addresses, SIP server domain names, etc.";
uses dhcpv6-options:server-option-definitions;
}
container packet-stats {
config "false";
description "A container records
all the packet status information
of a specific interface.";
leaf solicit-count {
type uint32;
mandatory true;
description "solicit counter";
}
leaf request-count {
type uint32;
mandatory true;
description "request counter";
}
leaf renew-count {
type uint32;
mandatory true;
description "renew counter";
}
leaf rebind-count {
type uint32;
mandatory true;
description "rebind counter";
}
leaf decline-count {
type uint32;
mandatory true;
description "decline counter";
}
leaf release-count {
type uint32;
mandatory true;
description "release counter";
}
leaf info-req-count {
type uint32;
mandatory true;
description "information request counter";
}
leaf advertise-count {
type uint32;
mandatory true;
description "advertise counter";
}
leaf confirm-count {
type uint32;
mandatory true;
description "confirm counter";
}
leaf reply-count {
type uint32;
mandatory true;
description "reply counter";
}
leaf reconfigure-count {
type uint32;
mandatory true;
description "recofigure counter";
}
}
}
}
/*
* Notifications
*/
notification notifications {
description "dhcpv6 client notification module";
container dhcpv6-client-event {
description "dhcpv6 client event";
container ia-lease-event {
description "raised when the client was allocated
a new IA from the server or it renew/rebind/release
its current IA";
leaf event-type {
type enumeration {
enum "allocation" {
description "allocate";
}
enum "rebind" {
description "rebind";
}
enum "renew" {
description "renew";
}
enum "release" {
description "release";
}
}
mandatory true;
description "event type";
}
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
leaf iaid {
type uint32;
mandatory true;
description "IAID";
}
leaf serv-name {
type string;
description "server name";
}
leaf description {
type string;
description "description of event";
}
}
container invalid-ia-detected {
description "raised when the identity association of the
client can be proved to be invalid. Possible condition
includes duplicated address, illegal address, etc.";
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
leaf cli-duid {
type uint32;
mandatory true;
description "duid of client";
}
leaf iaid {
type uint32;
mandatory true;
description "IAID";
}
leaf serv-name {
type string;
description "server name";
}
leaf description {
type string;
description "description of the event";
}
}
container retransmission-failed {
description "raised when the retransmission mechanism defined
in [RFC3315] is failed.";
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
leaf description {
type enumeration {
enum "MRC failed" {
description "MRC failed";
}
enum "MRD failed" {
description "MRD failed";
}
}
mandatory true;
description "description of failure";
}
}
container failed-status-turn-up {
description "raised when the client receives a message includes
an unsuccessful Status Code option.";
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
leaf status-code {
type enumeration {
enum "1" {
description "UnspecFail";
}
enum "2" {
description "NoAddrAvail";
}
enum "3" {
description "NoBinding";
}
enum "4" {
description "NotOnLink";
}
enum "5" {
description "UseMulticast";
}
}
mandatory true;
description "employed status code";
}
}
}
}
}
This diff is collapsed.
module ietf-dhcpv6-relay {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-relay";
prefix "dhcpv6-relay";
import ietf-inet-types {
prefix inet;
}
import ietf-dhcpv6-options {
prefix dhcpv6-options;
}
import ietf-dhcpv6-types {
prefix dhcpv6-types;
}
import ietf-interfaces {
prefix if;
}
organization
"IETF DHC (Dynamic Host Configuration) Working group";
contact
"cuiyong@tsinghua.edu.cn
lh.sunlinh@gmail.com
ian.farrer@telekom.de
sladjana.zechlin@telekom.de
hezihao9512@gmail.com";
description
"This model defines a YANG data model that can be
used to configure and manage a DHCPv6 relay.";
revision 2018-03-04 {
description "Resolved most issues on the DHC official
github";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-12-22 {
description
"Resolve most issues on Ian's github.";
reference
"I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-11-24 {
description
"First version of the separated relay specific
YANG model.";
reference
"I-D: draft-ietf-dhc-dhcpv6-yang";
}
/*
* Data Nodes
*/
container relay {
presence
"Enables the relay";
description
"DHCPv6 relay portion";
container relay-config {
description
"This container contains the configuration data
of the relay.";
container relay-attributes {
description
"A container describes some basic attributes of the relay
agent including some relay agent specific options data that
need to be configured previously.
Such options include Remote-Id option and Subscriber-Id
option.";
leaf name {
type string;
description
"Relay agent name";
}
leaf description {
type string;
description
"Textual description of the relay agent";
}
leaf-list dest-addrs {
type inet:ipv6-address;
description
"Each DHCPv6 relay agent may be configured with a list
of destination addresses.
This node defines such a list of IPv6 addresses that
may include unicast addresses, multicast addresses or
other addresses.";
}
list subscribers {
key subscriber;
description
"Subscribers";
leaf subscriber {
type uint8;
mandatory true;
description
"Subscriber";
}
leaf subscriber-id {
type string;
mandatory true;
description
"Subscriber id";
}
}
list remote-host {
key ent-num;
description
"Remote host";
leaf ent-num {
type uint32;
mandatory true;
description
"Enterprise number";
}
leaf remote-id {
type string;
mandatory true;
description
"Remote id";
}
}
uses dhcpv6-types:vendor-infor;
}
container rsoo-option-sets {
description
"DHCPv6 relay agent could provide some information that would
be useful to DHCPv6 client.
Since relay agent cannot provide options directly to the
client, RSOO-enabled options are defined to propose options
for the server to send to the client.
This container models such RSOO-enabled options.";
reference
"RFC6422";
list option-set {
key option-set-id;
description
"This list under the 'rsoo-option-sets' container is similar
to the that defined in server module.
It allows the relay to implement several sets of RSOO-enabled
options for different interfaces.
The list only includes the EAP Re-authentication Protocol
(ERP) Local Domain Name DHCPv6 Option defined in RFC6440,
since it is the only one RSOO-enabled options accepted by
IANA so far.";
leaf option-set-id {
type uint32;
description "Option sed id";
}
uses dhcpv6-options:relay-supplied-option-definitions;
}
}
list relay-if {
// if - This should reference an entry in ietf-interfaces
key if-name;
description
"A relay agent may have several interfaces, we should provide
a way to configure and manage parameters on the interface-level.
A list that describes specific interfaces and their corresponding
parameters is employed to fulfil the configfuration. Here we use
a string called 'if-name' as the key of list.";
leaf if-name {
type if:interface-ref;
mandatory true;
description
"Interface name";
}
leaf interface-id {
type string;
description
"Interface id";
}
/*
leaf enable {
type boolean;
mandatory true;
description "whether this interface is enabled";
}
*/
leaf ipv6-address {
type inet:ipv6-address;
description
"IPv6 address for this interface";
}
leaf rsoo-option-set-id {
type leafref {
path "/relay/relay-config/rsoo-option-sets/option-set/option-set-id";
}
description "Configured Relay Supplied Option set";
}
list next-entity {
key dest-addr;
description
"This node defines a list that is used to describe the
next hop entity of this relay distinguished by their
addresses.";
leaf dest-addr {
type inet:ipv6-address;
mandatory true;
description
"Destination addr";
}
leaf available {
type boolean;
mandatory true;
description
"Whether the next entity is available or not";
}
leaf multicast {
type boolean;
mandatory true;
description
"Whether the address is multicast or not";
}
leaf server {
type boolean;
mandatory true;
description
"Whether the next entity is a server";
}
}
}
}
container relay-state {
config "false";
description
"State data of relay";
list relay-if {
key if-name;
description
"A relay agent may have several interfaces, we should provide
a way to configure and manage parameters on the interface-level.
A list that describes specific interfaces and their corresponding
parameters is employed to fulfil the configfuration. Here we use
a string called 'if-name' as the key of list.";
leaf if-name{
type string;
mandatory true;
description
"Interface name";
}
list pd-route {
// if - need to look at if/how we model these. If they are
// going to be modelled, then they should be ro state
// entries (we're not trying to configure routes here)
key pd-route-id;
description "pd route";
leaf pd-route-id {
type uint8;
mandatory true;
description
"PD route id";
}
leaf requesting-router-id {
type uint32;
mandatory true;
description