<?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-ivy-network-inventory-software-02"
     ipr="trust200902">
  <front>
    <title abbrev="Network Inventory Software">A YANG Network Data Model of
    Network Inventory Software Extensions</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="2024"/>

    <area>OPS Area</area>

    <workgroup>IVY</workgroup>

    <keyword>Network Inventory Software</keyword>

    <abstract>
      <t>The base Network Inventory YANG model defines the physical network
      elements (NEs) and hardware components of NEs. This document extends the
      base Network Inventory model for software-enabled NEs (e.g.,
      controllers, virtual network functions (VNFs)) and software components
      (e.g., platform operating system (OS), software-patch).</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>The Network Inventory consists of the network element (NE), hardware
      components, firmware components, and software components on the a
      managed network domain.</t>

      <t><xref target="I-D.ietf-ivy-network-inventory-yang"/> defines the base
      Network Inventory YANG model for physical network element (NE) and
      hardware components of NEs. Examples of hardware components could be
      rack, shelf, slot, board and physical port.</t>

      <t>This document extends the base Network Inventory to support software
      extensions for software-enabled NEs (e.g. controllers, virtual network
      functions (VNFs)) and software components. Examples of software
      components could be platform operating system (OS), software-patch,
      bios, and boot-loader.</t>

      <t>The YANG data model in <xref target="ivy-sw-module"/> conforms to the
      Network Management Datastore Architecture (NMDA) <xref
      target="RFC8342"/>.</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>
    </section>

    <section title="Relationship to Other YANG Data Models">
      <t>The base network inventory model supports the software versions of
      NEs and software versions of hardware components. This document adds
      more software component identifiers (e.g. platformos, software patch)
      and more NE types (e.g. virtual NE) to provide enhanced software
      information on the NE to facilitate software compatibility check.</t>

      <t>Figure <xref target="mod-relation"/> depicts the relationship between
      the Software Extension model and other models. The Software Extension
      network inventory model enhances the model defined in the base network
      inventory model.</t>

      <t><figure anchor="mod-relation"
          title="Relationship of SW Extension Model to Other Inventory Models">
          <artwork><![CDATA[             +-------------------------+
             |                         |
             | Base Network Inventory  |
             |                         |
             +------------+------------+
                          |
       +------------------+-------------------+
       |                  |                   |
+------V------+    +------V------      +------V------
|             |    |             |     |             |
| Hardware    |    |  Software   |     |             |
| Extensions  |    |  Extensions |     | Entitlement |
| e.g. Power  |    |  e.g.       |     |             |
| supply unit |    |  SW patch   |     |             |
+-------------+    +-------------+     +-------------+

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

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

      <figure>
        <artwork><![CDATA[module: ietf-network-inventory-sw-ext
  augment /nwi:network-inventory/nwi:network-elements
            /nwi:network-element:
    +--ro software-ne-attributes
       +--ro current-revision?    string
       +--ro previous-revision?   string
       +--ro installation-time?   yang:date-and-time
       +--ro activation-time?     yang:date-and-time
  augment /nwi:network-inventory/nwi:network-elements
            /nwi:network-element/nwi:components/nwi:component:
    +--ro software-module-specific-info
       +--ro current-revision?    string
       +--ro previous-revision?   string
       +--ro installation-time?   yang:date-and-time
       +--ro activation-time?     yang:date-and-time
]]></artwork>
      </figure>
    </section>

    <section title=" Software-enabled Network Elements">
      <t>In the base Network Inventory YANG model, "ne-type" is a YANG
      identity that describes the type of the network element and only the
      "physical-network-element" identity" is defined. This document adds non-
      hardware identity, such as "ne-virtual" and "ne-virtual".</t>
    </section>

    <section title="Software components">
      <t>Software components refer to the software installed on the NE, such
      as software releases and software patches, and platform operating system
      (OS) of the software.</t>
    </section>

    <section anchor="ivy-sw-module"
             title="YANG Data model for Network Inventory Software Extensions">
      <t>The "ietf-network-inventory-sw-ext" module uses types defined in
      xxxx.</t>

      <figure>
        <artwork><![CDATA[<CODE BEGINS> file="ietf-network-inventory-sw-ext@2024-08-06.yang"
module ietf-network-inventory-sw-ext {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-network-inventory-sw-ext";
  prefix nwis;

  import ietf-yang-types {
    prefix yang;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-network-inventory {
    prefix nwi;
    reference
      "RFCAAAA: A YANG Data Model for Network Inventory";
  }

  organization
    "IETF Network Inventory YANG (ivy) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/ivy>
     WG List:  <mailto:inventory-yang@ietf.org>

     Editor: Bo Wu
             <lana.wubo@huawei.com>
     Editor: Cheng Zhou
          <zhouchengyjy@chinamobile.com>
     Editor: Qin Wu
             <bill.wu@huawei.com>
     Editor: Mohamed Boucadair
             <mohamed.boucadair@orange.com>";
  description
    "This YANG module defines a model for network inventory software
     extensions.

     Copyright (c) 2024 IETF Trust and the persons
     identified as authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Revised BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.

     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 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.";

  revision 2024-08-06 {
    description
      "Initial version";
    reference
      "RFC XXXX: A YANG Data Model for Network Inventory Software
                 Extensions.";
  }

  identity ne-software {
    base nwi:ne-type;
    description
      "A software network element (NE).";
  }

  identity ne-virtual {
    base ne-software;
    description
      "A virtual network element (NE).";
  }

  identity software-component {
    base nwi:non-hardware-component-class;
    description
      "Base identity for software components in a managed
       device.";
  }

  identity operating-system {
    base software-component;
    description
      "OS software type.";
  }

  identity operating-system-patch {
    base software-component;
    description
      "An operating system update - which should be a subcomponent
       of the `operating-system` running on a component. A patch is
       defined to be a set of software changes that are atomically
       installed (and uninstalled) together. ";
  }

  identity bios {
    base software-component;
    description
      "Legacy BIOS or UEFI firmware interface responsible for
       initializing hardware components and first stage boot
       loader.";
  }

  identity boot-loader {
    base software-component;
    description
      "Software layer responsible for loading and booting the
       device OS or network OS.";
  }

  identity software-module {
    base software-component;
    description
      "A base identity for software modules installed and/or
       running on the device.  Modules include user-space programs
       and kernel modules that provide specific functionality.
       A component with type SOFTWARE_MODULE should also have a
       module type that indicates the specific type of software
       module";
  }

  grouping software-info-grouping {
    description
      "Specific attributes applicable to Software.";
    leaf current-revision {
      type string;
      description
        "The current software revision.";
    }
    leaf previous-revision {
      type string;
      description
        "The previous software revision.";
    }
    leaf installation-time {
      type yang:date-and-time;
      description
        "Date and time the current revision last changed.";
    }
    leaf activation-time {
      type yang:date-and-time;
      description
        "Date and time the current revision last changed.";
    }
  }

  /* Main blocks */

  augment "/nwi:network-inventory/nwi:network-elements"
        + "/nwi:network-element" {
    description
      "Augment network element (NE) attributes.";
    container software-ne-attributes {
      when "derived-from-or-self(../nwi:ne-type,'ne-software')";
      config false;
      description
        "Container for the attributes applicable only to software
         Network Elements (NEs).";
      uses software-info-grouping;
    }
  }

  augment "/nwi:network-inventory/nwi:network-elements/"
        + "nwi:network-element/nwi:components/nwi:component" {
    description
      "Augment component attributes.";
    container software-module-specific-info {
      when
        "derived-from-or-self(../nwi:class,'software-module')";
      config false;
      description
        "This container contains some attributes belong to
         Software Modules only.";
      uses software-info-grouping;
    }
  }
}
<CODE ENDS>]]></artwork>
      </figure>
    </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 anchor="IANA" title="IANA Considerations">
      <t>This document registers a URI in the "IETF XML Registry" <xref
      target="RFC3688"/>. Following the format in <xref target="RFC3688"/>,
      the following registration has been made.</t>

      <figure>
        <artwork><![CDATA[     URI: urn:ietf:params:xml:ns:yang:ietf-network-inventory-sw-ext
     Registrant Contact: The IESG.
     XML: N/A, the requested URI is an XML namespace.]]></artwork>
      </figure>

      <t>This document registers a YANG module in the "YANG Module Names"
      registry<xref target="RFC7950"/> .</t>

      <figure>
        <artwork><![CDATA[     name:         ietf-network-inventory-sw-ext
     namespace:    urn:ietf:params:xml:ns:yang:ietf-network-inventory-sw-ext
     prefix:       nwis
     maintained by IANA: N
     reference:    RFC xxxx
]]></artwork>
      </figure>
    </section>

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

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

      <?rfc include='reference.I-D.ietf-ivy-network-inventory-yang'?>

      <?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"?>
    </references>

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