<?xml version="1.0" encoding="US-ASCII"?>
<!-- This is built from a template for a generic Internet Draft. Suggestions for
     improvement welcome - write to Brian Carpenter, brian.e.carpenter @ gmail.com 
     This can be converted using the Web service at http://xml.resource.org/ -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<!-- You want a table of contents -->
<!-- Use symbolic labels for references -->
<!-- This sorts the references -->
<!-- Change to "yes" if someone has disclosed IPR for the draft -->
<!-- This defines the specific filename and version number of your draft (and inserts the appropriate IETF boilerplate -->
<?rfc sortrefs="yes"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc topblock="yes"?>
<?rfc comments="no"?>
<rfc category="std"
     docName="draft-wzwb-opsawg-network-inventory-management-04"
     ipr="trust200902">
  <front>
    <title abbrev="Network Inventory Management">A YANG Network Data Model of
    Network Inventory</title>

    <author fullname="Bo Wu" initials="B." surname="Wu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>

          <city>Nanjing</city>

          <region>Jiangsu</region>

          <code>210012</code>

          <country>China</country>
        </postal>

        <email>lana.wubo@huawei.com</email>
      </address>
    </author>

    <author fullname="Cheng Zhou" initials="C." surname="Zhou">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <code>100053</code>

          <country>China</country>
        </postal>

        <email>zhouchengyjy@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Qin Wu" initials="Q." surname="Wu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>

          <city>Nanjing</city>

          <region>Jiangsu</region>

          <code>210012</code>

          <country>China</country>
        </postal>

        <email>bill.wu@huawei.com</email>
      </address>
    </author>

    <author fullname="Mohamed Boucadair" initials="M." surname="Boucadair">
      <organization>Orange</organization>

      <address>
        <postal>
          <street>Rennes 35000</street>

          <country>France</country>
        </postal>

        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>

    <!---->

    <date day="" month="" year="2023"/>

    <area>OPS Area</area>

    <workgroup>OPSAWG</workgroup>

    <keyword>Network Inventory</keyword>

    <abstract>
      <t>This document defines a base YANG data model for network inventory
      that is application- and technology-agnostic. This data model can be
      augmented with application-specific and technology-specific details in
      other, more specific network inventory data models.</t>

      <t>This document is meant to help IVY base Network Inventory model
      discussion and ease agreement on a base model that would be flexible
      enough to be augmented with components that are covered by the IVY
      Charter.</t>

      <t>The hardware components definition are adapted from
      draft-ietf-ccamp-network-inventory-yang-02.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>Network inventory is a foundation for all types of network
      management. Network operators need to keep track of the equipment
      planned and installed in their networks (including product name,
      manufacturer, product family, embedded software, and hardware/software
      version). Building a network inventory from management system can be
      used to control and monitor the actual devices/instances in the network
      and expose this information in a consistent way to applications that
      would consume that data. This document does not make any assumptions on
      these applications.</t>

      <t>Network Inventory is a collection of data for network devices and
      their components managed by a specific management system. Per the
      definition of <xref target="RFC8969"/>,the network inventory model is a
      network model. </t>

      <t>The purpose of this document is to define a base network inventory
      YANG data model that is application- and technology-agnostic. The base
      data model can be augmented to describe application-specific or
      technology-specific information.</t>

      <t>The YANG data model defined in this document conforms to <xref
      target="RFC8342"/>.</t>

      <t><xref target="ex"/> provides a set of augmentation consideration for
      extensions of hardware, software, entitlement, and inventory topology
      mapping.</t>
    </section>

    <section title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP 14
      <xref target="RFC2119"/><xref target="RFC8174"/> when, and only when,
      they appear in all capitals, as shown here.</t>

      <t>This document defines the following terms:<list style="hanging">
          <t hangText="Network Inventory:">Network Inventory is a collection
          of data for network devices and their components managed by a
          specific management system. It consists of Network Element (NE),
          hardware, software, and entitlement/license data.</t>

          <t hangText="Network Element">Is a manageable network entity that
          contains hardware and software units, e.g. a network device
          installed on one or several chassis, or a network controller which
          may reside in any computing devices.</t>

          <t hangText="Component:">Is a unit of the network element, e.g.
          hardware components like chassis, card, port, software components
          like software-patch, bios, and boot-loader.</t>

          <t hangText="Entitlement">Is defined by a device vendor, that grants
          and restricts access to inventory items, such as NE, hardware
          component, software component.</t>
        </list></t>
    </section>

    <section title="YANG Data Model for Network Inventory">
      <t>The network element definition is generalized to support physical
      devices and other types of inventory objects (e.g., virtual network
      elements) that can be managed as physical network elements from an
      inventory perspective. The data model for Network Element presented in
      this document uses a flat list of network element. Each network element
      in the list is identified by its identifier, "ne-id". Furthermore, each
      network element has a "ne-type" leaf. </t>

      <t>The "ne-type" leaf is a YANG identity that describes the type of the
      network element. This document defines "physical-network-element"
      identity. </t>

      <t>The component definition is also generalized to support any type of
      component, such as hardware, software, or firmware. </t>

      <t>The component "class" is defined as a union between the hardware
      class identity, defined in "iana-hardware", and the "non-hardware"
      identity, defined in this document.</t>

      <t>The identity definition of additional types of "ne-type" and
      "non-hardware" identity of component are outside the scope of this
      document and could be defined in application-specific or
      technology-specific companion augmentation data models, such as <xref
      target="I-D.wzwb-ivy-network-inventory-software"/>.</t>

      <figure>
        <artwork><![CDATA[     +--rw network-elements
        +--rw network-element* [ne-id]
           +--rw ne-id            string
           +--rw ne-type?         identityref
           ............................................
           +--rw components
              +--rw component* [component-id]
                 +--rw component-id            string
                 +--rw class                   union
                 ......................................
]]></artwork>
      </figure>

      <t/>

      <section title="Network Element">
        <t>Some of the hardware and software attributes defined in Section 3.1
        of <xref target="RFC7317"/> are borrowed, such as platform-os version
        and machine. To be consistent with the component definition, some of
        the attributes defined in <xref target="RFC8348"/> for components are
        reused for network elements. These attributes include: </t>

        <t><figure title="YANG Structure of Network Element">
            <artwork><![CDATA[   +--ro network-elements
         +--ro network-element* [ne-id]
           ...................................
           +--ro hardware-rev?    string
           +--ro software-rev?    string
           +--ro mfg-name?        string
           +--ro mfg-date?        yang:date-and-time
           +--ro part-number?     string
           +--ro serial-number?   string
           +--ro product-name?    string
           ...................................
]]></artwork>
          </figure>Note: Whether the identity of device-type (e.g., optical
        device, router) is defined in the base model is to be discussed.</t>
      </section>

      <section title="Components of Network Element">
        <t>The component definition is generalized to both hardware components
        and non-hardware components (e.g., software components). </t>

        <figure anchor="comp" title="YANG Structure of Component">
          <artwork><![CDATA[     +--rw components
         +--rw component* [component-id]
           +--rw component-id            string
           +--rw uuid?                   yang:uuid
           +--rw name?                   string
           +--rw description?            string
           +--rw alias?                  string
           +--rw class                   union
           +--rw child-component-ref
           +--rw parent-rel-pos?         int32
           +--rw parent-component-ref
           +--rw hardware-rev?           string
           +--rw firmware-rev?           string
           +--rw software-rev?           string
           +--rw serial-num?             string
           +--rw mfg-name?               string
           +--rw part-number?            string
           +--rw asset-id?               string
           +--rw is-fru?                 boolean
           +--rw mfg-date?               yang:date-and-time
           +--rw uri*                    inet:uri

]]></artwork>
        </figure>
      </section>

      <section title="Hardware Components of Network Element">
        <t>The modelling of the hardware components of network elements mainly
        follow the same approach of [RFC8348]. The hardware components are
        reported in the list of components of a network element and for each
        component the mandatory 'class' leaf is used indicate the type of
        component (e.g., chassis, module, and port). </t>

        <t>The relationship between typical inventory objects in a physical
        network element can be described as shown in <xref target="rel"/>:</t>

        <figure anchor="rel"
                title="Relationship between typical inventory objects in                          physical network elements">
          <artwork><![CDATA[                       +-----------------+
                       | network element |
                       +-----------------+
                               ||
                               || 1:N
                               ||
                               \/
                         +-------------+
                         |   chassis/  |---+
                         | sub-chassis |<--|
                         +-------------+
                               ||
               ______1:N______||_____1:M_______
               ||------------------ ---------||
               \/                            \/
         +--------------+               +-----------+
     +---|     slot     |               |   board   |
     |-->|  /sub-slot   |               |           |
         +--------------+               +-----------+
                                             ||
                                             ||1:N
                                             \/
                                       +-----------+
                                       |    port   |
                                       +-----------+]]></artwork>
        </figure>

        <t> The "iana-hardware" module [IANA_YANG] defines YANG identities for
        the hardware component types in the IANA-maintained "IANA-ENTITY-MIB"
        registry. Some of the definitions taken from [RFC8348] are actually
        based on the ENTITY-MIB [RFC6933]. </t>

        <t>For the additional attributes of specific hardware, such as CPU,
        storage, port, power supply is defined in the hardware extension.</t>
      </section>

      <section title="Software Attributes of Network Element">
        <t>This document defines "software-rev" of NEs and components, which
        are basic software attributes of a Network Element. </t>

        <t>The software and hardware components share the same attributes of
        the component and have similar replaceable requirements. Generally,
        the device also has other software data, for example, one or more
        software patch information. The software components of other classes,
        such as platform software, BIOS, bootloader, and software patch
        information, defined in the software extension <xref
        target="I-D.wzwb-ivy-network-inventory-software"/>. </t>

        <t>Note: Whether the software patch is in the base inventory model is
        to be discussed. </t>
      </section>
    </section>

    <section anchor="ex" title="Extending Network Inventory">
      <t>This document defines the basic network inventory attributes
      applicable to typical network scenarios. For finer-grained and specific
      management scenarios, the relationship between this model and other
      models is illustrated in <xref target="mod-rel"/>.</t>

      <figure anchor="mod-rel">
        <artwork><![CDATA[             +-------------------------+
             |                         |
             | Base Network Inventory  |
             |                         |
             +------------+------------+
                          |
       +------------------+-------------------+
       |                  |                   |
+------V------+    +------V------      +------V------    +-------------+
|             |    |             |     |             |   |             |
| Hardware    |    |  Software   |     |             |   |  Inventory  |
| Extensions  |    |  Extensions |     | Entitlement |   |  Topology   |
| e.g. Power  |    |  e.g.       |     |             |   |  Mapping    |
| supply unit |    |  SW patch   |     |             |   |             |
+-------------+    +-------------+     +-------------+   +-------------+

]]></artwork>
      </figure>
    </section>

    <section title="Model Overview">
      <t>The following tree diagram <xref target="RFC8340"/> provides an
      overview of "ietf-network-inventory" module.</t>

      <figure>
        <artwork><![CDATA[module: ietf-network-inventory
  +--rw network-elements
     +--rw network-element* [ne-id]
        +--rw ne-id            string
        +--rw ne-type?         identityref
        +--rw uuid?            yang:uuid
        +--rw name?            string
        +--rw description?     string
        +--rw alias?           string
        +--rw hardware-rev?    string
        +--rw software-rev?    string
        +--rw mfg-name?        string
        +--rw mfg-date?        yang:date-and-time
        +--rw part-number?     string
        +--rw serial-number?   string
        +--rw product-name?    string
        +--rw components
           +--rw component* [component-id]
              +--rw component-id            string
              +--rw uuid?                   yang:uuid
              +--rw name?                   string
              +--rw description?            string
              +--rw alias?                  string
              +--rw class?                  union
              +--rw contained-child*        -> ../component-id
              +--rw parent-rel-pos?         int32
              +--rw parent-component-ref
              +--rw hardware-rev?           string
              +--rw firmware-rev?           string
              +--rw software-rev?           string
              +--rw serial-num?             string
              +--rw mfg-name?               string
              +--rw part-number?            string
              +--rw asset-id?               string
              +--rw is-fru?                 boolean
              +--rw mfg-date?               yang:date-and-time
              +--rw uri*                    inet:uri
]]></artwork>
      </figure>
    </section>

    <section title="YANG Data model for Network Inventory">
      <t/>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>The YANG module specified in this document defines a data schema
      designed to be accessed through network management protocols such as
      NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer is the
      secure transport layer, and the required secure transport is Secure
      Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the
      required secure transport is TLS [RFC8446].</t>

      <t>The Network Configuration Access Control Model (NACM) [RFC8341]
      provides a means of restricting access to specific NETCONF or RESTCONF
      users to a preconfigured subset of all available NETCONF or RESTCONF
      protocol operations and contents. Thus, NACM SHOULD be used to restrict
      the NSF registration from unauthorized users.</t>

      <t>There are a number of data nodes defined in this YANG module that are
      writable, creatable, and deletable (i.e., config true, which is the
      default). These data nodes may be considered sensitive or vulnerable in
      some network environments. Write operations to these data nodes could
      have a negative effect on network and security operations.</t>

      <t>Some of the readable data nodes in this YANG module may be considered
      sensitive or vulnerable in some network environments. It is thus
      important to control read access (e.g., via get, get-config, or
      notification) to these data nodes. These are the subtrees and data nodes
      and their sensitivity/vulnerability:</t>

      <t>&lt;&lt;&lt;to be completed&gt;&gt;&gt;</t>
    </section>

    <section title="Acknowledgements">
      <t>TBD</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>TBD</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.3688'?>

      <?rfc include='reference.RFC.6242'?>

      <?rfc include='reference.RFC.7950'?>

      <?rfc include='reference.RFC.8040'?>

      <?rfc include='reference.RFC.8446'?>

      <?rfc include='reference.RFC.8341'?>

      <?rfc include='reference.RFC.8342'?>

      <?rfc include="reference.RFC.8174"?>

      <?rfc include="reference.RFC.6241"?>

      <?rfc include="reference.RFC.8345"?>

      <?rfc include="reference.RFC.8348"?>

      <?rfc include="reference.RFC.7317"?>

      <?rfc include="reference.RFC.9179"?>

      <?rfc include="reference.RFC.6991"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.8340"?>

      <?rfc include="reference.RFC.8969"?>

      <?rfc include='reference.I-D.wzwb-ivy-network-inventory-software'?>
    </references>
  </back>
</rfc>
