Add WG4 yangs published 2023-03 (v11)
[scp/oam/modeling.git] / data-model / yang / published / o-ran / ru-fh / o-ran-dhcp@2022-08-15.yang
diff --git a/data-model/yang/published/o-ran/ru-fh/o-ran-dhcp@2022-08-15.yang b/data-model/yang/published/o-ran/ru-fh/o-ran-dhcp@2022-08-15.yang
new file mode 100644 (file)
index 0000000..8d2967a
--- /dev/null
@@ -0,0 +1,408 @@
+module o-ran-dhcp {
+  yang-version 1.1;
+  namespace "urn:o-ran:dhcp:1.0";
+  prefix "o-ran-dhcp";
+
+  import ietf-interfaces {
+    prefix "if";
+  }
+
+  import ietf-inet-types {
+    prefix "inet";
+  }
+
+  import ietf-dhcpv6-types {
+    prefix dhcpv6-type;
+    revision-date 2018-09-04;
+  }
+
+  import ietf-dhcpv6-common {
+    prefix dhcpv6-type2;
+  }
+
+  import o-ran-wg4-features {
+    prefix or-feat;
+  }
+
+  organization "O-RAN Alliance";
+
+  contact
+    "www.o-ran.org";
+
+  description
+    "This module defines the YANG definitions for managing the DHCP client.
+
+    Copyright 2021 the O-RAN alliance.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+    POSSIBILITY OF SUCH DAMAGE.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+    this list of conditions and the above disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the above disclaimer in the documentation
+    and/or other materials provided with the distribution.
+    * Neither the Members of the O-RAN Alliance nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.";
+
+  revision "2022-08-15" {
+    description
+      "version 10.0.0
+
+      1) added DUID/IAID support for IPv4.
+      2) switched import FROM ietf-dhcpv6-types TO ietf-dhcpv6-common";
+
+    reference "ORAN-WG4.M.0-v10.00";
+  }
+
+  revision "2021-12-01" {
+    description
+      "version 5.2.0
+
+      1) Typographical corrections for british english.";
+
+    reference "ORAN-WG4.M.0-v05.00";
+  }
+
+  revision "2021-03-22" {
+    description
+      "version 5.1.0
+
+      1) typographical corrections in descriptions.";
+
+    reference "ORAN-WG4.M.0-v05.00";
+  }
+
+  revision "2020-12-10" {
+   description
+     "version 5.0.0
+
+     1) added new leafs for reporting discovered event-collectors
+     used";
+
+   reference "ORAN-WG4.M.0-v05.00";
+  }
+
+  revision "2019-07-03" {
+    description
+      "version 1.1.0
+
+      1) backward compatible changes to fix pen number which always
+      should have been 32 bits
+      2) backward compatible changes to introduce reporting of 3GPP
+      discovered MV-PnP information, including CA/RA Servers and SeGW
+      3) backward compatible changes to introduce groupings";
+
+    reference "ORAN-WG4.M.0-v01.00";
+  }
+
+  revision "2019-02-04" {
+    description
+      "version 1.0.0
+
+      1) imported model from xRAN
+      2) changed namespace and reference from xran to o-ran";
+
+    reference "ORAN-WG4.M.0-v01.00";
+  }
+
+  typedef netconf-client-id {
+    type union {
+      type inet:ip-address;
+      type inet:uri;
+    }
+    description "A NETCONF client identifier";
+  }
+
+  typedef ca-ra-server-id {
+    type union {
+      type inet:ip-address;
+      type inet:uri;
+    }
+    description "A CA/RA Server identifier";
+  }
+
+  typedef segw-id {
+    type union {
+      type inet:ip-address;
+      type inet:uri;
+    }
+    description "A SeGW identifier";
+  }
+
+  typedef event-collector-id {
+    type union {
+      type inet:ip-address;
+      type inet:uri;
+    }
+    description "An event collector identifier";
+  }
+
+  grouping ca-ra-servers {
+    description
+      "The CA/RA servers discovered using DHCP, discovered using the 3GPP
+      defined options in 3GPP 32.509 in vendor specific option 43/17";
+    list ca-ra-servers {
+      key servers;
+      description "A list of IP addresses or URIs for CA/RA Servers";
+
+      leaf servers{
+        type ca-ra-server-id;
+        description "the server identifier";
+      }
+      leaf port-number {
+        type inet:port-number;
+        description "an optional (non-default) port";
+      }
+      leaf ca-ra-path {
+        type string;
+        description
+          "ASCII string representing the path to the CMP server directory.
+          A CMP server may be located in an arbitrary path other than root.";
+      }
+      leaf subject-name {
+        type string;
+        description
+          "ASCII string representing the subject name of the CA/RA. ";
+      }
+      leaf protocol {
+        type enumeration {
+          enum HTTP {
+            description
+                "HTTP used to communicate with CA/RA server";
+          }
+          enum HTTPS{
+            description
+                "HTTPS used to communicate with CA/RA server";
+          }
+        }
+        description "the protocol used to communicate with a CA/RA server";
+      }
+    }
+  }
+
+  grouping security-gateways {
+    description
+      "The security gateways discovered using DHCP, discovered using the 3GPP
+      defined options in 3GPP 32.509 in vendor specific option 43/17";
+    list segw {
+      key gateways;
+      description "A list of IP addresses or URIs for SeGW";
+
+      leaf gateways{
+        type segw-id;
+        description "the SeGW identifier";
+      }
+    }
+
+  }
+
+  grouping netconf-clients {
+    description
+      "The NETCONF clients discovered using DHCP, discovered using the IANA
+      defined options or O-RAN defined syntax for encoding IP addresses or FQDNs
+      in vendor specific option 43/17";
+    list netconf-clients{
+      key client;
+      description "A list of IP addresses or URIs for NETCONF clients";
+      leaf client{
+        type netconf-client-id;
+        description "the client identifier";
+      }
+      leaf optional-port {
+        type inet:port-number;
+        description "an optional (non-default) port";
+      }
+    }
+  }
+
+  grouping event-collectors {
+    description
+      "The event-collectors discovered using DHCP, discovered using the O-RAN
+      defined syntax for encoding IP addresses or FQDNs in vendor specific
+      option 43/17";
+    leaf-list event-collectors{
+      if-feature "or-feat:NON-PERSISTENT-MPLANE";
+      type event-collector-id;
+      max-elements 1;
+      description
+        "An event-collector discovered using DHCP that can be used by the O-RU to
+        send pnfRegistration notification messages.
+
+        The O-RU behaviour when discovering more than one event-collector is not defined.";
+    }
+    leaf event-collector-format{
+      if-feature "or-feat:NON-PERSISTENT-MPLANE";
+      type enumeration {
+        enum ONAP {
+          description "ONAP format is used to signal the event-collector";
+        }
+      }
+      description "the event-collector notification format";
+    }
+  }
+
+  grouping dhcpv4-option {
+    description "DHCPv4 Configuration options";
+
+    leaf dhcp-server-identifier {
+      type  inet:ip-address;
+      description "DHCP server identifier";
+    }
+    leaf domain-name {
+      type  string;
+      description "Name of the domain";
+    }
+    leaf-list domain-name-servers {
+      type  inet:ip-address;
+      description "A list of DNS servers";
+    }
+    leaf interface-mtu {
+      type  uint32 {
+        range "0..65535";
+      }
+      description "Minimum Transmission Unit (MTU) of the interface";
+    }
+    leaf-list default-gateways{
+      type inet:ip-address;
+      description "the list of default gateways on the O-RUs subnet";
+    }
+    uses netconf-clients;
+    uses ca-ra-servers;
+    uses security-gateways;
+    uses event-collectors;
+  }
+
+  grouping dhcpv6-option {
+    description "DHCPv6 Configuration options";
+
+    container dhcp-server-identifier{
+      status deprecated;
+      description "dhcpv6 server identifier - deprecated as this uses import from ietf-dhcpv6-types and not ietf-dhcpv6-common";
+      uses dhcpv6-type:duid;
+    }
+    container dhcpv6-server-identifier{
+      description "dhcpv6 server identifier - replaces container dhcp-server-identifier and uses import from ietf-dhcpv6-common";
+      uses dhcpv6-type2:duid;
+    }
+    leaf domain-name {
+      type  string;
+      description "Name of the domain";
+    }
+    leaf-list domain-name-servers {
+      type  inet:ip-address;
+      description "A list of DNS servers";
+    }
+    uses netconf-clients;
+    uses ca-ra-servers;
+    uses security-gateways;
+    uses event-collectors;
+  }
+
+  grouping dhcp-group {
+    description "a dhcp grouping";
+    list interfaces {
+      key "interface";
+      description "Interface configuration";
+
+      leaf interface {
+        type if:interface-ref;
+        description "Name of the interface";
+      }
+
+      container dhcpv4 {
+        description "DHCPv4 information";
+        leaf client-id {
+          type string;
+          description "DHCP client identifier - used when the DHCPv4 client in the O-RU does not use DUID/IAID";
+        }
+        uses dhcpv6-type2:duid;
+
+        container identity-association {
+          description "an optional container - used when DHCPv4 client uses DUID/IAID as identifier";
+
+          leaf iaid {
+            type uint32;
+            description "IAID";
+          }
+          leaf ia-type {
+            type string;
+            description "IA type";
+          }
+        }
+        uses dhcpv4-option;
+      }
+      container dhcpv6 {
+        description "DHCPv6 information";
+        container dhcp-client-identifier{
+          status deprecated;
+          description "dhcpv6 client identifier - deprecated as this uses import from ietf-dhcpv6-types and not ietf-dhcpv6-common";
+          uses dhcpv6-type:duid;
+        }
+        container dhcpv6-client-identifier{
+          description "dhcpv6 client identifier using ietf-dhcpv6-common import";
+          uses dhcpv6-type2:duid;
+          container identity-association {
+            description "a container describing IAID information";
+
+            leaf iaid {
+              type uint32;
+              description "IAID";
+            }
+            leaf ia-type {
+              type string;
+              mandatory true;
+              description "IA type";
+            }
+          }
+        }
+        uses dhcpv6-option;
+      }
+    }
+
+    container m-plane-dhcp {
+      description "leafs covering off DHCP aspects of m-plane operations";
+      leaf private-enterprise-number {
+        type uint16;
+        default 53148;
+        status deprecated;
+        description "the private enterprise number allocated to O-RAN Alliance";
+      }
+      leaf private-enterprise-num {
+        type uint32;
+        default 53148;
+        description "the private enterprise number allocated to O-RAN Alliance";
+      }
+      leaf vendor-class-data {
+        type string;
+        description
+          "The string used in DHCPv4 option 60 or DHCPv4 option 124 and
+          DHCPv6 option 16";
+      }
+    }
+  }
+
+
+  // Top Level Container
+
+  container dhcp {
+    config false;
+    description
+      "DHCP client configuration";
+
+    uses dhcp-group;
+  }
+}