<?xml version="1.0" encoding="utf-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.17 (Ruby 2.7.0) -->


<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6241 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml">
<!ENTITY RFC7223 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7223.xml">
<!ENTITY RFC7950 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7950.xml">
<!ENTITY RFC8040 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8040.xml">
<!ENTITY RFC8340 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8340.xml">
<!ENTITY RFC8341 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8341.xml">
]>
<!---
<?rfc comments="yes"?>
-->
<rfc ipr="trust200902" docName="draft-hi-ccamp-cmis-control-yang-00" category="std">
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

  <?rfc toc="yes" ?>

  <?rfc symrefs="yes" ?>

  <?rfc sortrefs="yes"?>

  <?rfc iprnotified="no" ?>

  <?rfc strict="yes" ?>

  <front>
    <title abbrev="YANG-CMIS-Access-Control">A YANG Data Model for CMIS Access and Control</title>

    <author initials="S." surname="Homma" fullname="Shunsuke Homma" role="editor">
      <organization>NTT</organization>
      <address>
        <email>shunsuke.homma.ietf@gmail.com</email>
      </address>
    </author>
    <author initials="H." surname="Irino" fullname="Hitoshi Irino" role="editor">
      <organization>NTT</organization>
      <address>
        <email>hitoshi.irino.ntt@gmail.com</email>
      </address>
    </author>
    <author initials="T." surname="Mano" fullname="Toru Mano">
      <organization>NTT</organization>
      <address>
        <email>toru.mano@ntt.com</email>
      </address>
    </author>
    <author initials="K." surname="Anazawa" fullname="Kazuya Anazawa">
      <organization>NTT</organization>
      <address>
        <email>kazuya.anazawa@ntt.com</email>
      </address>
    </author>

    <date/>

    
    <workgroup>CCAMP Working Group</workgroup>
    

    <abstract>
      <t>
      This document provides a YANG data model to access to and control CMIS for controlling 
      Digital Coherent Optics device equipped in a router or a switch from outside. 
      CMIS has custom pages which enables to be defined by the module vendor for its own usage, 
      and allows to extend the uses of the optics devices.
      </t>
    </abstract>



  </front>

  <middle>

    <section anchor="sec:introduction" title="Introduction">

    <t>
    Digital Coherent Optics (DCO) modules enable routers or switches to directly connect to 
    transport network, such as Optical Transport Network (e.g., DWDM or OTN) or Wavelength Division 
    Multiplexing (WDM) network. DCO modules, such as CFP2-DCO and QSFP-DD DCO, implement
    optical connector (i.e., Tx and Rx) and Digital Signal Processor (DSP), and provide 
    higher data rates (100 Gbps, 400 Gbps, and beyond) and flexible data transport. 
    </t>

    <t>
    DCO transceivers, equipped by a platform device (e.g., a switch or a router), is generally 
    controlled by network OS running on the device with Content Management Interoperability 
    Specifications (CMIS) which is an open standard protocol designed to facilitate interoperability 
    between management systems. The specification is defined in <xref target='OIF-CMIS'/>. 
    CMIS also allows vendor-specific extensions of its transceiver features by 
    using custom pages. For example, CMIS custom pages can be used for debugs of the transceiver. 
    This document defines a YANG data model for accessing to and controlling CMIS for controlling 
    DCO transceivers from outside of the platform device.
    </t>


      <section anchor="sec:terms" title='Terminology and Notations'>
      <t> 
      The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" 
      this document are to be interpreted as described in BCP14, 
      <xref target='RFC2119'/>, <xref target='RFC8340'/> when, 
      and only when, they appear in all capitals, as shown here.
      </t>


      <t>
      The terms and their definitions used in this specification are described below:
      </t>

      <t>
      <list style="symbols">
        <t>CMIS (Common Management Interface Specifications): A generic management
        communication interface together with a generic management interaction protocol between
        host and managed modules. The specification is defined in <xref target="OIF-CMIS"/>;</t>
        <t>NACM (Network Configuration Access Control Model): A standard access control model to 
        restrict NETCONF or RESTCONF protocol access for particular users to a preconfigured 
        subset of all available NETCONF or RESTCONF protocol operations and content.  
        The specification is defined in <xref target='RFC8341'/>.</t>
        <t>NETCONF (Network Configuration Protocol): Mechanisms to install, manipulate, and delete 
        the configuration of network devices. The definitions and specification is described in 
        <xref target='RFC6241'/>;</t>
        <t>RESTCONF: An HTTP-based protocol that provides a programmatic interface for accessing 
        data defined in YANG, using the datastore concepts defined in NETCONF. The specification is 
        defined in <xref target='RFC8040'/>.</t>
      </list>
      </t>


      <t>
      The following terms of NETCONF defined in <xref target='RFC6241'/> are also used in this specification:
      </t>

      <t>
      <list style="symbols">
        <t>(NETCONF) client</t>
        <t>configuration data</t>
        <t>datastore</t>
        <t>message</t>
        <t>remote procedure call (RPC)</t>
        <t>(NETCONF) server</t>
        <t>state data</t>
        <t>(NETCONF) user</t>
      </list>
      </t>

      <t>
      This document makes use of the terms defined in <xref target='RFC7950'/>.
      </t>


      </section>

      <section anchor="sec:acronyms" title='Acronyms'>
      <t>
      The following acronyms are used in this document:
      </t>

      <t>
      <list hangIndent="8" style="hanging">
        <t hangText="CE">Customer Edge</t>
        <t hangText="CDB">Command Data Block</t>
        <t hangText="DCO">Digital Coherent Optics</t>
        <t hangText="DSP">Digital Signal Processor</t>
        <t hangText="DWDM">Dense Wavelength Division Multiplexing</t>
        <t hangText="GSNR">Generalized Signal-to-Noise Ratio</t>
        <t hangText="i2c">Inter-Integrated Circuit</t>
        <t hangText="NOS">Network Operating System</t>
        <t hangText="NMS">Network Management System</t>
        <t hangText="OTN">Optical Transport Network</t>
        <t hangText="QoT">Quality of Transmission</t>
        <t hangText="TPA">Third Party Application</t>
        <t hangText="WDM">Wavelength Division Multiplexing</t>
      </list>
      </t>
      </section>

      <section anchor="sec:tree-diagram" title='Tree Diagram'>
      <t>
      The tree diagrams used in this document follow the notation defined in <xref target='RFC8340'/>.
      </t>
      </section>

      <section anchor="sec:prefix-data-node-name" title='Prefixes in Data Node Names'>
      <t>
      In this document, names of data nodes and other data model objects are prefixed using the standard 
      prefix associated with the corresponding YANG imported modules. 
      </t>

<texttable title="Prefixes and corresponding YANG module" anchor="tab-prefixes">
      <ttcol align='left'>Prefix</ttcol>
      <ttcol align='left'>YANG module</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>if</c>
      <c>ietf-interfaces</c>
      <c><xref target='RFC7223'/></c>
      <c>cmis-ctrl</c>
      <c>ietf-cmis-control</c>
      <c>RFC XXXX</c>
</texttable>

      <t>
      Note: The RFC Editor will replace XXXX with the number assigned to the RFC once this draft becomes an RFC.
      </t>
      </section>

    </section>


<section anchor="sec:usecase-implementation" title='Usecases and Implementation Patterns'>

<t>
This section describes usecases of this YANG data model for accessing to and control CMIS and 
implementation patterns for using such YANG.
</t>

<section anchor="sec:usecase" title='Usecases'>
  <section anchor="sec:usecase-1" title='Centralized Control of Pluggable Modules'>
  <t>
  This YANG data model disaggregates management features for pluggable modules which 
  a platform device equips with from NOS, and enables centralized control of such modules. 
  For example, in case that a customer's router (i.e., CE) is connected to DWDM/OTN provided by a service provider, 
  this enables pluggable optics modules installed to the customer's router to be controlled by a 
  controller of the service provider as shown in <xref target='fig-centralized-pluggables-control'/>. The service 
  provider can configure DCO transceivers installed in customer devices directly depending on its own policy. 
  Then, some access control with NACM defined in <xref target='RFC8341'/> should be applied for preventing 
  illegal configuration of the other than target modules or leak of information of the customer's devices.
  </t>

<figure title="Centralized Control of Pluggable Modules" anchor="fig-centralized-pluggables-control"><artwork align="center"><![CDATA[

                         +-------------+
                   . . . | Contrroller |. . .
                   .     +-------------+    .
                   .           .            .
   ,--------.      .           .            .      ,--------.
  (          )     .       ,--------.       .     (          )
 ( Customer +----+ .      (          )      . +----+ Customer )
(   Network | CE [DCO]---(  DWDM/OTN  )---[DCO] CE |  Network  )
 (          +----+        (          )        +----+          )
  `----------'             `--------'             `----------'

`-------v-------' `------------v------------' `--------v------'
 Customer Domain    Service Provider Domain    Customer Domain

                                      Legend
                                      . . . : C-plane Interface 

]]></artwork></figure>

    <t>
    On the other hand, in case that NOS of the platform device manages pluggable modules, 
    CMIS control from remote controller might cause inconsistency problem of pluggable modules. 
    More details of this problem is considered in <xref target='sec:security-consideration'/>.
    </t>
    </section>

    <section anchor="sec:usecase-2" title='Obtaining Non-standardized Information with Custom Pages'>
    <t>
    By using this YANG data model, operators can obtain detailed DSP information contained in CMIS custom
    pages even if the modeling of the data is not standardized. Example uses of such detailed DSP information 
    including fiber sensing (Ref. <xref target='ECOC48923.2020.9333176'/>), physical layer monitoring 
    (Ref. <xref target='JLT.2021.3139167'/>), and accurate estimation (e.g., GSNR) (Ref. <xref target='JOCN.505729'/>).
    </t>
    </section>
  </section>

  <section anchor='implementation' title='Implementation Patterns'>
    <t>
    This document introduce two patterns to implement a client using an interface in which this YANG data model is available:
    </t>

    <t>
    <list style="hanging">
      <t hangText="Pattern1:">Controller/NMS on Remote Host</t>
      <t> 
      In this pattern, a controller or an NMS implements a client using this YANG data model, and control pluggable modules 
      installed to a platform device. The overview is shown in <xref target="fig-implement-pattern1"/>.
      </t>
      <t hangText="Pattern2:">Application Running on the Platform Device</t>
      <t>
      In this pattern, a 3rd party's application running on a platform device implements a client using this YANG data model, 
      and control pluggable modules installed to the device. That application can behave as a server using this YANG data model, 
      or provide more generic interface, such as REST API to remote systems. The overview is shown in <xref target="fig-implement-pattern2"/>.
      </t>
    </list>
    </t>

<figure title="Implementation Pattern1 Overview" anchor="fig-implement-pattern1"><artwork align="center"><![CDATA[

+-----------------------+
|    Controller/NMS     |
+-----------------------+
            A
            | This YANG over NETCONF,
            | RESTCONF or RPC.
            |
            V
+-----------------------+
|   Platform Device     |
|   ,---------------.   |
|  |       NOS       |  |
|   `---------------'   |
|           A           |
|           | CMIS via  |
|           V i2c bus   |
|       +-------+       |
+-------|  DCO  |-------+
        +-------+

]]></artwork></figure>

<figure title="Implementation Pattern2 Overview" anchor="fig-implement-pattern2"><artwork align="center"><![CDATA[

+-----------------------+
|    Controller/NMS     |
+-----------------------+
            A
            | This YANG over NETCONF/
            | RESTCONF/RPC,or REST API.
            +------+
+------------------|----+
| Platform Device  |    |
|                  V    |
| This YANG over ,---.  |
| NETCONF etc.  | TPA | |
|       +-----> | APL | |
|       |        `---'  | 
|   ,---V-----------.   |
|  |       NOS       |  |
|   `---------------'   |
|           A           |
|           | CMIS via  |
|           V i2c bus   |
|       +-------+       |
+-------|  DCO  |-------+
        +-------+

]]></artwork></figure>

    </section>
  </section>

  <section anchor="sec:cmis-access-control-module" title="CMIS Access and Control Model and Contents">
  <t>
  The ietf-cmis-control is an augment to the ietf-interface. It allows the user to set the operating mode 
  of CMIS for control pluggable devices as well as other operational parameters.
  cmis-control. The structure is shown below:
  </t>

<figure><artwork><![CDATA[
module: ietf-cmis-control

  augment /if:interfaces/if:interface:
    +--rw cmis-control
       +--ro cmis-enabled?   boolean
       +--ro cmis-version?   string
       +--rw cmis-page* [page-num]
          +--rw page-num            uint8
          +--rw bank                uint8
          +--ro page-access-type?   access-type
          +--rw description?        string
          +--rw value* [offset]
             +--rw offset               uint8
             +--rw size                 uint8
             +--ro value-access-type?   access-type
             +--rw value-data           binary
             +--rw description?         string
]]></artwork></figure>
  
  
  <t>
  The "ietf-cmis-control" module contains the following YANG
  reusable YANG data types, identities and groupings:</t>

<dl>
  <dt>cmis-control:</dt>
  <dd>
    <t>
    A base YANG identity for data nodes to access and control CMIS supported by 
    the pluggable device equipped in the interface. 
    </t>
  </dd>
  <dt>cmis-version:</dt>
  <dd>
    <t>
    A base YANG identity for the version of CMIS supported by the device.
    </t>
  </dd>
  <dt>cmis-pages:</dt>
  <dd>
    <t>
    A base YANG identity for the list of pages to be accessed or controlled.
    </t>
  </dd>
  <dt>cmis-page:</dt>
  <dd>
    <t>
    A base YANG identity for the page to be accessed or controlled.
    </t>
  </dd>
  <dt>cmis-page:page-num:</dt>
  <dd>
    <t>
    A base YANG identity for the number of the target CMIS page.
    The value is selected from 0 to 255.</t>
  </dd>
  <dt>cmis-page:bank:</dt>
  <dd>
    <t>
    A base YANG identity for the bank corresponding to the target CMIS page.
    </t>
  </dd>
  <dt>cmis-page:page-access-type:</dt>
  <dd>
    <t>
    A base YANG identity for access type of the target CMIS page.
    An access type is selected from among rw (A readable and writable element), 
    rww (A readable and writable element that can be modified by the module),
    ro (A read-only element), wo(A write-only element), wo/sc (A write-only element 
    with self-clearing side effect), and ro/cor (A write-only element with 
    clean-on-read side effect).
    </t>
  </dd>
  <dt>cmis-page:description:</dt>
  <dd>
    <t>
    A base YANG identity for the description about the content of the target CMIS page.
    </t>
  </dd>

  <dt>cmis-page:value:</dt>
  <dd>
    <t>
    A base YANG identity for the subject area to be controlled.
    </t>
  </dd>
  <dt>value:offset</dt>
  <dd>
    <t>
    A base YANG identity for the location of the data within about the target CMIS page.
    The value is selected from 0 to 255. 
    </t>
  </dd>
  <dt>value:size</dt>
  <dd>
    <t>
    A base YANG identity for the size of the value. The value is selected from 1 to 128.
    </t>
  </dd>
  <dt>value:value-access-type:</dt>
  <dd>
    <t>
    A base YANG identity for access type of the value.
    An access type is selected from among rw, rww, ro, wo, wo/sc, and ro/cor.
    </t>
  </dd>
  <dt>value:value-data</dt>
  <dd>
    <t>
    A base YANG identity for the data contained into the value. The data format is basically 
    binary, but any other format (e.g., ASCII, JIS) can be also used. The length of the value 
    must be the same with the indicated size. The value is writable only when the access-type 
    is neither ro or ro/cor. In case that the value is across multiple subject areas 
    which have different access-types, all access-type conditions must be satisfied. 
    For example, if the value across subject-areas whose access-types are ro and rw, 
    the access-type of the value is ro. When all conditions cannot be satisfied 
    (e.g., ro and wo co-exists), an error should be responded.
    </t>
  </dd>
  <dt>value:description</dt>
  <dd>
    <t>
    A base YANG identity for the description of the value. 
    </t>
  </dd>
</dl>

<ul empty="true"><li>
  <t>Note that the values related to CMIS pages are defined in <xref target="OIF-CMIS"/>.</t>
</li></ul>
  </section>

  <section anchor="sec:yang-module-cmis-access-control" title="YANG Module for CMIS Acccess and Control">
  <t>
  The ietf-cmis-control is defined as an extension to ietf-interfaces.
  </t>

<figure><artwork><![CDATA[
<CODE BEGINS> file "ietf-cmis-control.yang"
module ietf-cmis-control {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-cmis-control";
  prefix cmis-ctrl;

  import ietf-interfaces {
    prefix if;
  }

  organization
    "IETF CCAMP Working Group";

  contact
    "WG Web:   <http://tools.ietf.org/wg/ccamp/>
    WG List:  <mailto:ccamp@ietf.org>

    Editor:   Shunsuke Homma
      <mailto:shunsuke.homma.ietf@gmail.com>
    
    Editor:   Hitoshi Irino
      <mailto:hitoshi.irino@ntt.com>";

  description
    "This YANG module defines a data model for the management 
    of CMIS (Common Management Interface Specification) pages 
    as specified by OIF. It enables configuration and retrieval 
    of CMIS page data, including access types and value fields, 
    to support the management of pluggable optical modules via 
    NETCONF or RESTCONF.

    Copyright (c) 2025 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
    (http://trustee.ietf.org/license-info).

    This version of this YANG module is part of RFC XXXX
    (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
    for full legal notices.";
  
// RFC Ed.: replace XXXX with actual RFC number and remove this note

  revision "2025-04-21" {
    description
      "Initial revision.";
    reference
      "I-D.hi-ccamp-cmis-control-yang-00";
  }

  /*
   * CMIS control data nodes
   */

  typedef access-type {
      type enumeration {
        enum rw {
          description "A readable and writable element.";
        }
        enum rww {
          description "A readable and writable element that can be 
          modified by the module.";
        }
        enum ro {
          description "A read-only element.";
        }
        enum wo {
          description "A write-only element.";
        }
        enum wo/sc {
          description "A write-only element with self-clearing side 
          effect.";
        }
        enum ro/cor {
          description "A write-only element with celan-on-read side 
          effect.";
        }
      }
      description "Defines access types for CMIS elements.";
  }

  grouping cmis-page {
    description
      "Parameters stored in the CMIS page";

    leaf page-num{
      type uint8 {
        range "0 .. 255";
      }
      mandatory true;
      description 
        "The number of the CMIS page.";
    }
    
    leaf bank {
      type uint8;
      mandatory true;
      description
        "The banks corresponding to the CMIS page.";
    }

    leaf page-access-type {
      type access-type;
      config false;
      description "Access type of the CMIS page.";
    }

    leaf description {
      type string;
      description 
        "The description of the CMIS page.";
    }
      
    list value {
      key "offset";
      description 
      "The value contained in the CMIS page.";

      leaf offset {
        type uint8;
        mandatory true;
        description 
          "The memory address of the value.";
      }

      leaf size {
        type uint8 {
          range "1 .. 128";
        }
        mandatory true;
        description 
          "The memory size of the value.";
      }
        
      leaf value-access-type {
        type access-type;
        config false;
        description "Access type of the target value.";
      }

      leaf value-data {
        type binary;
        mandatory true;
        description
          "The data contained in the value. It is writable only 
          when the access-type is not Read-Only or Read-Only with 
          clean-on-read side effect.";
      }

      leaf description {
        type string;
        description 
          "The description of the value.";
      }
    }
  }
  

  grouping cmis-pages {
    description
      "The list of the accessible CMIS pages supported by the 
      pluggable device accommodated into the interface.";

    list cmis-page {
      key "page-num";
      uses cmis-page;
      }
  }

  grouping cmis-control {
    description
      "Parameters for primitive CMIS control of the pluggable device 
      equipped in the interface.";
    
    leaf cmis-enabled {
      type boolean;
      default "false";
      config false;
      description
        "The availability of the CMIS for control the pluggable 
        device equipped in the interface. If the device does not 
        support CMIS, this value is false.";
    }
    
    leaf cmis-version {
      type string;
      config false;
      description
        "The version of the CMIS by the pluggable device.";
    }

    uses cmis-pages;

  }

  /*
   * Augment Interface
   */
  
  augment "/if:interfaces/if:interface" {
    container cmis-control {
      uses cmis-control;
    }
  }
}
<CODE ENDS>
]]></artwork></figure>


  </section>

  <section anchor="sec:primitive-mode" title="Primitive Mode">
  <t>
  This section provides a more primitive YANG data model for CMIS access and control. 
  This is called as "Primitive Mode" and it doesn't manage supplemental information, 
  such as access-types or description, of the fields in a CMIS page, and treat accessed 
  memories as flat data structure.
  </t>
  
  <t>
  This mode enables implementation of client side be simple, but on the other hand, 
  server side is needed strict management of data of CMIS pages. For example, when a 
  server is changing any value, the server need to comprehend the page number, the 
  offset, and the data size in which the data is contained.
  </t>

    <section anchor="sec:primitive-mode-yang-identities-structure" title='YANG Module Identities and Structure'>
    <t>
    The name of data node and prefix are described in <xref target="tab-primitive-prefixes"/>. 
    This module is also an augment to the ietf-interface.
    </t>

<texttable title="Data Node Name and Prefix of Primitive Mode" anchor="tab-primitive-prefixes">
      <ttcol align='left'>Prefix</ttcol>
      <ttcol align='left'>YANG module</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>if</c>
      <c>ietf-interfaces</c>
      <c><xref target='RFC7223'/></c>
      <c>cmis-ctrl-pm</c>
      <c>ietf-cmis-control-primitive</c>
      <c>RFC YYYY</c>
</texttable>

      <t>
      The tree diagram of ietf-cmis-control-primitive is shown below:
      </t>
<figure><artwork><![CDATA[
module: ietf-cmis-control-primitive

  augment /if:interfaces/if:interface:
    +--rw cmis-control-primitive
       +--ro cmis-enabled?          boolean
       +--ro cmis-version?          string
       +--rw primitive-cmis-page* [page-num]
          +--rw page-num    uint8
          +--rw bank        uint8
          +--rw offset      uint8
          +--rw size        uint8
          +--rw value       binary
]]></artwork></figure>
      </section>

      <section anchor="sec:yang-module-cmis-control-primitive" title="Primitive Mode YANG Module for CMIS Access and Control">
      <t>
      The ietf-cmis-control-primitive is also defined as an extension to ietf-interfaces.
      </t>

<figure><artwork><![CDATA[
<CODE BEGINS> file "ietf-cmis-control-primitive.yang"
module ietf-cmis-control-primitive {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-cmis-control-primitive";
  prefix cmis-ctrl-pm;

  import ietf-interfaces {
    prefix if;
  }

  organization
    "IETF CCAMP Working Group";

  contact
    "WG Web:   <http://tools.ietf.org/wg/ccamp/>
    WG List:  <mailto:ccamp@ietf.org>

    Editor:   Shunsuke Homma
      <mailto:shunsuke.homma.ietf@gmail.com>
    
    Editor:   Hitoshi Irino
      <mailto:hitoshi.irino@ntt.com>";

  description
    "This YANG module defines a primitive data model for the 
    management of CMIS (Common Management Interface Specification) 
    pages as specified by OIF. It enables configuration and 
    retrieval of CMIS page data, including access types and value 
    fields, to support the management of pluggable optical modules 
    via NETCONF or RESTCONF.

    Copyright (c) 2025 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
    (http://trustee.ietf.org/license-info).

    This version of this YANG module is part of RFC XXXX
    (https://www.rfc-editor.org/info/rfc YYYY); see the RFC itself
    for full legal notices.";
  
// RFC Ed.: replace XXXX with actual RFC number and remove this note

  revision "2025-04-21" {
    description
      "Initial revision.";
    reference
      "I-D.hi-ccamp-cmis-control-yang-00";
  }

  /*
   * Primitive Mode of CMIS control data nodes
   */

  grouping primitive-cmis-page {
    description
      "Parameters stored in the CMIS page as flat data structure";

    leaf page-num{
      type uint8 {
        range "0 .. 255";
      }
      mandatory true;
      description 
        "The number of the CMIS page.";
    }
    
    leaf bank {
      type uint8;
      mandatory true;
      description
        "The banks corresponding to the CMIS page.";
    }

      
    leaf offset {
      type uint8;
      mandatory true;
      description 
        "The memory address of the value.";
    }

    leaf size {
      type uint8 {
        range "1 .. 128";
      }
      mandatory true;
      description 
        "The memory size of the value.";
    }

    leaf value {
      type binary;
      mandatory true;
      description 
        "The actual data to write to the CMIS memory.";
    }
  }

  grouping cmis-control-primitive {
    description
      "Parameters for primitive CMIS control of the pluggable 
      device equipped in the interface.";
    
    leaf cmis-enabled {
      type boolean;
      default "false";
      config false;
      description
        "The availability of the CMIS for control the pluggable 
        device equipped in the interface. If the device does not 
        support CMIS, this value is false.";
    }
    
    leaf cmis-version {
      type string;
      config false;
      description
        "The version of the CMIS by the pluggable device.";
    }

    list primitive-cmis-page {
      key "page-num";
      config true;
      uses primitive-cmis-page;
    }
  }
  
  /*
   * Augment Interface
   */
  
  augment "/if:interfaces/if:interface" {
    container cmis-control-primitive {
      uses cmis-control-primitive;
    }
  }
}
<CODE ENDS>
]]></artwork></figure>

    </section>
  </section>

  

  <section anchor="sec:security-consideration" title="Security Consideration">
  <t>
  This YANG allows remote systems to control the equipped pluggable devices directly. 
  It might cause conflict of management of the pluggable devices among the platform node 
  and remote systems. For avoiding this problem, only the minimum necessary CMIS pages 
  (e.g., custom pages) should be exposed to external by using access control features 
  such as <xref target='RFC8341'/>.
  </t>

  <t>
  Regarding to use of the primitive mode, the control rights of the accessible pages 
  are delegated to a controller. Therefore, it is recommended that the mode is used 
  in case that the controller can be trusted, for example, the controlled device and 
  controller are managed by the same operator. Otherwise, specific pages which 
  may affect on data plane signaling should not exposed by using access control features 
  such as <xref target='RFC8341'/>
  </t>

  </section>

  
  
  <section anchor="iana-considerations"><name>IANA Considerations</name>

  <t>
  This document requests IANA to register the following YANG modules in
  the "YANG Module Names" registry [RFC6020] within the "YANG Parameters" registry group.
  </t>
  
  <figure><artwork><![CDATA[
   Name:  ietf-cmis-control
   Maintained by IANA?  N
   Namespace:  urn:ietf:params:xml:ns:yang:ietf-cmis-ctrl
   Prefix:  cmis-ctrl
   Reference:  RFC XXXX
  ]]></artwork></figure>

    <figure><artwork><![CDATA[
   Name:  ietf-cmis-control-primitive
   Maintained by IANA?  N
   Namespace:  urn:ietf:params:xml:ns:yang:ietf-cmis-ctrl-pm
   Prefix:  cmis-ctrl-pm
   Reference:  RFC YYYY
  ]]></artwork></figure>

  <ul empty="true"><li>
    <t>RFC Editor Note: Please replace XXXX and YYYY with the RFC number assigned to this document and remove this note.</t>
  </li></ul>

  </section> 


  </middle>

  <back>


    <references title='Normative References'>
      <reference anchor="OIF-CMIS" >
        <front>
          <title>Common Management Interface Specification (CMIS) Revision 5.2</title>
          <author>
            <organization>OIF</organization>
          </author>
          <date year="2022" month="April"/>
        </front>
      </reference>

      &RFC2119;
      &RFC7223;
      &RFC7950;
      &RFC8340;
    </references>

    <references title='Informative References'>
      &RFC6241;
      &RFC8040;
      &RFC8341;
      <reference anchor="ECOC48923.2020.9333176">
        <front>
          <title>Sub-Hertz Spectral Analysis of Polarization of Light in a Transcontinental Submarine Cable</title>
          <author initials='M.' surname='Cantono'>
            <organization>Google</organization>
          </author>
          <author initials='V.' surname='Kamalov'>
            <organization>Google</organization>
          </author>
          <author initials='M.' surname='Salsi'>
            <organization>Google</organization>
          </author>
          <author initials='M.' surname='Newland'>
            <organization>Google</organization>
          </author>
          <author initials='Z.' surname='Zhan'>
            <organization>Caltech</organization>
          </author>
          <date year='2020' month='December'/>
        </front>
        <seriesInfo name='European Conference on Optical Communications' value='ECOC 2020'/>
        <seriesInfo name='DOI' value='10.1109/ECOC48923.2020.9333176'/>
      </reference>

      <reference anchor="JLT.2021.3139167">
        <front>
          <title>Digital Longitudinal Monitoring of Optical Fiber Communication Link</title>
          <author initials='T.' surname='Sasai'>
            <organization>NTT</organization>
          </author>
          <author initials='M.' surname='Nakamura'>
            <organization>NTT</organization>
          </author>
          <author initials='E.' surname='Yamazaki'>
            <organization>NTT</organization>
          </author>
          <author initials='S.' surname='Yamamoto'>
            <organization>NTT</organization>
          </author>
          <author initials='H.' surname='Nishizawa'>
            <organization>NTT</organization>
          </author>
          <author initials='Y.' surname='Kisaka'>
            <organization>NTT</organization>
          </author>
          <date year='2022' month='April'/>
        </front>
        <seriesInfo name='Journal of Lightwave Technology' value='volume:40'/>
        <seriesInfo name='DOI' value='10.1109/JLT.2021.313917'/>
      </reference>


      <reference anchor='JOCN.505729'>
        <front>
          <title>Fast WDM provisioning with minimal probing: the first field experiments for DC exchanges</title>
          <author initials='H.' surname='Nishizawa'>
            <organization>NTT</organization>
          </author>
          <author initials='T.' surname='Mano'>
            <organization>NTT</organization>
          </author>
          <author initials='T.' surname='Ferreira de Lima'>
            <organization>NEC Labs America</organization>
          </author>
          <author initials='Y.' surname='Huang'>
            <organization>NEC Labs America</organization>
          </author>
          <author initials='Z.' surname='Wang'>
            <organization>Duke Univ.</organization>
          </author>
          <author initials='W.' surname='Ishida'>
            <organization>NTT</organization>
          </author>
          <author initials='M.' surname='Kawashima'>
            <organization>NTT</organization>
          </author>
          <author initials='E.' surname='Ip'>
            <organization>NEC Labs America</organization>
          </author>
          <author initials='A.' surname="D'Amico">
            <organization>Politecnico di Torino</organization>
          </author>
          <author initials='S.' surname='Okamoto'>
            <organization>NTT</organization>
          </author>
          <author initials='T.' surname='Inoue'>
            <organization>NTT</organization>
          </author>
          <author initials='K.' surname='Anazawa'>
            <organization>NTT</organization>
          </author>
          <author initials='V.' surname='Curri'>
            <organization>Politecnico di Torino</organization>
          </author>
          <author initials='G.' surname='Zussman'>
            <organization>Columbia Univ.</organization>
          </author>
          <author initials='D.' surname='Kilper'>
            <organization>CONNECT Centre</organization>
          </author>
          <author initials='T.' surname='Chen'>
            <organization>Duke Univ.</organization>
          </author>
          <author initials='T.' surname='Wang'>
            <organization>NEC Labs America</organization>
          </author>
          <author initials='K.' surname='Asahi'>
            <organization>NEC Corp.</organization>
          </author>
          <author initials='K.' surname='Takasugi'>
            <organization>NTT</organization>
          </author>
          <date year='2024' month='February'/>
        </front>
        <seriesInfo name='JOCN' value='505729'/>
        <seriesInfo name='DOI' value='10.1364/JOCN.505729'/>
      </reference>
    </references>


  </back>

</rfc>

