<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<?rfc compact="no" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" consensus="true" docName="draft-ietf-dtn-adm-yang-07" ipr="trust200902" submissionType="IETF" symRefs="true" tocInclude="true" version="3" xml:lang="en">
  <front>
    <title abbrev="DTNMA ADM YANG">DTNMA Application Data Model (ADM) YANG Syntax</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-dtn-adm-yang-07"/>
    <author fullname="Edward J. Birrane, III" initials="E.J." surname="Birrane">
      <organization abbrev="JHU/APL">The Johns Hopkins University Applied Physics Laboratory</organization>
      <address>
        <postal>
          <street>11100 Johns Hopkins Rd.</street>
          <city>Laurel</city>
          <region>MD</region>
          <code>20723</code>
          <country>United States of America</country>
        </postal>
        <phone>+1 443 778 7423</phone>
        <email>Edward.Birrane@jhuapl.edu</email>
      </address>
    </author>
    <author fullname="Brian Sipos" initials="B." surname="Sipos">
      <organization abbrev="JHU/APL">The Johns Hopkins University Applied Physics Laboratory</organization>
      <address>
        <email>brian.sipos+ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Justin Ethier" initials="J." surname="Ethier">
      <organization abbrev="JHU/APL">The Johns Hopkins University Applied Physics Laboratory</organization>
      <address>
        <email>Justin.Ethier@jhuapl.edu</email>
      </address>
    </author>
    <date/>
    <area>Transport</area>
    <workgroup>Delay-Tolerant Networking</workgroup>
    <keyword>DTN</keyword>
    <keyword>Network Management</keyword>
    <keyword>Autonomy</keyword>
    <abstract>
      <t>
This document defines a concrete syntax for encoding a Delay-Tolerant Networking Management Architecture (DTNMA) Application Data Model (ADM) using the syntax and modular structure, but not the full data model, of YANG.
Extensions to YANG are defined to capture the specifics needed to define DTNMA Application Management Model (AMM) objects and to use the Application Resource Identifier (ARI) data-value syntax.
      </t>
    </abstract>
  </front>
  <middle>
    <section>
      <name>Introduction</name>
      <t>
The Delay-Tolerant Networking Management Architecture (DTNMA) of <xref target="RFC9675"/> defines a concept for remote management in a challenged network environment, and the Application Management Model (AMM) of <xref target="I-D.ietf-dtn-amm"/> defines a meta-model for the structure of object types and literal-value types used in DTNMA and separates static definitions of Application Data Models (ADMs) from dynamic Operational Data Models (ODMs).
      </t>
      <t>
This document defines a text representation of an ADM using the types and structures of the AMM combined with the syntax and processing semantics of YANG modules <xref target="RFC7950"/>, while using AMM-specific extensions for object and data modeling.
With this representation, individual applications can capture their static management information in module files and make use of existing YANG processing and module-level logic (<em>e.g.</em>, file naming, revision history, imports).
      </t>
      <t>
Because the YANG syntax and data modeling language are closely coupled, there is no pre-existing example of using YANG for its syntax (and its module infrastructure) while using different domain-specific language (DSL) of extensions for data modeling.
Separating the syntax from the data modeling is similar in concept to making use of ASN.1 syntax of <xref target="X.680"/> without using the SMIv2 data modeling language <xref target="RFC2578"/>, which is how unrelated things like certificate profile of X.509 <xref target="RFC5280"/> use ASN.1 module syntax.
      </t>
      <t>
One way of thinking of this is that the ADM modules use a syntax that has "YANG characteristics" but does not make use of all YANG tooling or infrastructure and do not interoperate with existing YANG modules or their contained data models.
      </t>
      <section>
        <name>Scope</name>
        <t>
This document defines a specific syntax for representing individual revisions of individual ADMs as text files.
        </t>
        <t>
It does not define a representation for the runtime objects and literal values modeled by an ADM or ODM. 
Encodings of values within the AMM are defined in the Application Resource Identifier (ARI) specification <xref target="I-D.ietf-dtn-ari"/>.
While the Agent ADM provides an introspection capability to indicate <em>which </em> objects are present in an ODM, encodings of the runtime state of those objects are outside of the scope of this document.
        </t>
        <t>
It is not required that the YANG encoding be used for transmission of ADM information over the wire in the context of a network deployment.
Since the AMM is designed to allow for multiple encodings, the expression of ADMs in YANG syntax is intended to support translation to other encodings without loss of information.
        </t>
      </section>
      <section>
        <name>Terminology</name>
        <t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <xref target="RFC2119"/>.
        </t>
        <t>
The terms "Application Data Model", "Application Resource Identifier", "Operational Data Model", "Externally Defined Data", "Variable", "Constant", "Control", "Literal", "Macro", "Namespace", "Operator", "Report", "Report Template", "Rule", "State-Based Rule", "Table", and "Time-Based Rule" are used without modification from the definitions provided in <xref target="I-D.ietf-dtn-amm"/>.
        </t>
        <t>
The terms "Comment", "Keyword", and "Module" are used without modification from the definitions provided in <xref target="RFC7950"/>.
        </t>
        <t>
Additional terms defined in this document are as follows.
        </t>
        <dl>
          <dt>ADM Module:</dt>
          <dd>
The specific use of a YANG module to represent a DTNMA ADM.
          </dd>
        </dl>
      </section>
    </section>
    <section anchor="sec-yang-syntax">
      <name>ADM Module Syntax</name>
      <t>
Some aspects of this ADM module profile restrict the allowable definitions to conform with <xref section="4" target="I-D.ietf-dtn-amm"/> and by doing so make YANG modules defining ADMs incompatible with YANG modules intended for NETCONF, RESTCONF, or other applications.
Because of this, YANG modules defining ADMs <bcp14>SHALL</bcp14> be managed separately from the "YANG Module Names" registry of <xref target="IANA-YANG"/>.
See the ADM registry defined in <xref section="9.3" target="I-D.ietf-dtn-ari"/> for registration of ADM modules.
For the remainder of this document, a YANG module defining an ADM will be referred to as an "ADM module" and a YANG module for any other purpose will be referred to as an "Other Module" to differentiate it.
      </t>
      <t>
After explanation of extensions in <xref target="sec-yang-ext"/>, the following minimal ADM module will be expanded upon for further examples.
      </t>
      <figure>
        <name>Minimal Example ADM Module</name>
        <sourcecode markers="false" name="example-adm.yang" type="yang" originalSrc="example-adm.yang">module example-adm {
  yang-version 1.1;
  namespace "ari://example/adm/";
  prefix example-adm;

  import ietf-amm {
    prefix amm;
  }

  organization
    "Example Org." {
    amm:enum 65535;
  }
  contact
    "Some User &lt;user@example.org&gt;";
  description
    "Example ADM module with YANG syntax.
     The organization name and enumeration are IANA reserved.";
  reference
    "draft-ietf-dtn-adm-yang";

  revision 2025-01-31 {
    description
      "Updated for latest ADM document.";
    reference
      "draft-ietf-dtn-adm-yang";
  }
  amm:enum 1;
}
</sourcecode>
      </figure>
    </section>
    <section anchor="sec-adm-module">
      <name>ADM Module Contents</name>
      <t>
An ADM module is identified, as defined in <xref target="sec-yang-proc-reuse"/>, by the module "namespace" having an "ari" scheme.
Within an ADM module, this profile makes restrictions in <xref target="sec-yang-proc-restrict"/> which are formalized in the following table of allowed module substatements.
This table is adapted from <xref section="7.1" target="RFC7950"/>.
      </t>
      <t>
The "yang-version" of all ADM modules conforming to this document <bcp14>SHALL</bcp14> be "1.1".
Later versions of YANG syntax could introduce incompatible changes and will need to be examined for consistency with the ADM module use.
      </t>
      <table>
        <name>ADM <tt>module</tt> Substatements</name>
        <thead>
          <tr>
            <th>Substatement</th>
            <th>Cardinality</th>
            <th>Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>yang-version</td>
            <td>1</td>
            <td>
              <xref section="7.1.2" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>namespace</td>
            <td>1</td>
            <td>
              <xref section="7.1.3" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>prefix</td>
            <td>1</td>
            <td>
              <xref section="7.1.4" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>include</td>
            <td>0..n</td>
            <td>
              <xref section="7.1.6" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>import</td>
            <td>0..n</td>
            <td>
              <xref section="7.1.5" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>status</td>
            <td>0..1</td>
            <td>
              <xref section="7.21.2" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>reference</td>
            <td>0..1</td>
            <td>
              <xref section="7.21.4" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>organization</td>
            <td>0..1</td>
            <td>
              <xref section="7.1.7" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>description</td>
            <td>0..1</td>
            <td>
              <xref section="7.21.3" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>revision</td>
            <td>0..n</td>
            <td>
              <xref section="7.1.9" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>extension</td>
            <td>0..n</td>
            <td>
              <xref section="7.19" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>feature</td>
            <td>0..n</td>
            <td>
              <xref section="7.20.1" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>deviation</td>
            <td>0..n</td>
            <td>
              <xref section="7.20.3" target="RFC7950"/>
            </td>
          </tr>
          <tr>
            <td>amm:enum</td>
            <td>1</td>
            <td>
              <xref target="sec-yang-ext-enum"/>
            </td>
          </tr>
          <tr>
            <td>amm:typedef</td>
            <td>0..n</td>
            <td>
              <xref target="sec-yang-ext-typedef"/>
            </td>
          </tr>
          <tr>
            <td>amm:const</td>
            <td>0..n</td>
            <td>
              <xref target="sec-yang-ext-const"/>
            </td>
          </tr>
          <tr>
            <td>amm:ctrl</td>
            <td>0..n</td>
            <td>
              <xref target="sec-yang-ext-ctrl"/>
            </td>
          </tr>
          <tr>
            <td>amm:edd</td>
            <td>0..n</td>
            <td>
              <xref target="sec-yang-ext-edd"/>
            </td>
          </tr>
          <tr>
            <td>amm:oper</td>
            <td>0..n</td>
            <td>
              <xref target="sec-yang-ext-oper"/>
            </td>
          </tr>
          <tr>
            <td>amm:sbr</td>
            <td>0..n</td>
            <td>
              <xref target="sec-yang-ext-sbr"/>
            </td>
          </tr>
          <tr>
            <td>amm:tbr</td>
            <td>0..n</td>
            <td>
              <xref target="sec-yang-ext-tbr"/>
            </td>
          </tr>
          <tr>
            <td>amm:var</td>
            <td>0..n</td>
            <td>
              <xref target="sec-yang-ext-var"/>
            </td>
          </tr>
        </tbody>
      </table>
    </section>
    <section anchor="sec-yang-proc">
      <name>Inherited YANG Module Processing</name>
      <t>
The benefit of using the pre-existing YANG syntax is to take advantage of both tools that process YANG modules as well as some of the syntax and module-level semantics provided by YANG.
      </t>
      <section anchor="sec-yang-proc-reuse">
        <name>Direct Reuse</name>
        <t>
The following statements and behaviors of YANG are usable within an ADM with no modification:
        </t>
        <dl>
          <dt>File Layout:</dt>
          <dd>
The existing file naming defined in <xref section="5.2" target="RFC7950"/> is unchanged for ADM modules.
Because ADM modules occupy a separate ecosystem than Other Modules, their file stores <bcp14>SHALL</bcp14> be kept separate.
          </dd>
          <dt>Modules and Submodules:</dt>
          <dd>
The existing concepts and syntax of modules and submodules defined in <xref section="5.1" target="RFC7950"/> is unchanged for ADM modules.
Because ADM modules occupy a separate ecosystem than Other Modules, there will not be any cross-imports between the two ecosystems.
There is no harm in including an ADM module in an Other Module store, but it will have no data definitions usable with NETCONF, RESTCONF, <em>etc.</em>
          </dd>
          <dt>Module Naming:</dt>
          <dd>
            <t>
The existing module naming convention and recommendation from <xref section="4.1" target="RFC8407"/> is strengthened to a requirement for ADM modules.
All ADM modules <bcp14>SHALL</bcp14> be named by concatenating from the ADM namespace reference: the organization ID, a dash "-", and the model ID.
            </t>
          </dd>
          <dt>Module Importing:</dt>
          <dd>
The existing concept and syntax of importing a module namespace, to reference objects in another module, defined in <xref section="5.1.1" target="RFC7950"/> is unchanged for ADM modules.
Because the import includes a specific revision, the ARI references to objects in that imported module do not need any ADM revision information.
          </dd>
          <dt>Module Prefix:</dt>
          <dd>
The existing concept and syntax of the "prefix" statement defined in <xref section="7.1.4" target="RFC7950"/> is unchanged for ADM modules.
The only aspect of ADM modules that the prefix applies to, however, are references to feature names from "if-feature" statements.
          </dd>
          <dt>Module Namespace:</dt>
          <dd>
            <t>
Although an ADM module has no use for an XML namespace (as defined in <xref section="5.3" target="RFC7950"/>), the "namespace" statement is used to provide an explicit ARI namespace reference (see <xref section="3.4" target="I-D.ietf-dtn-ari"/>).
For ADM modules, the "namespace" statement argument <bcp14>SHALL</bcp14> be the text-form ARI referencing the ADM itself.
            </t>
            <t>
For example, the ADM "example-adm" will have a namespace of <tt>ari://example/adm/</tt> which is valid YANG but does not conform to the guidelines of <xref section="4.9" target="RFC8407"/>.
            </t>
          </dd>
          <dt>Module Organization:</dt>
          <dd>
The existing concept and use of the "organization" statement defined in <xref section="7.1.7" target="RFC7950"/> is unchanged for ADM modules.
The organization statement is augmented for ADM modules by adding an <tt>amm:enum</tt> substatement as defined in <xref target="sec-yang-ext-enum"/>.
          </dd>
          <dt>Name Resolution:</dt>
          <dd>
The existing name resolution logic described in <xref section="5.4" target="RFC7950"/> is unchanged for ADM modules.
Because ADM modules are a flat object namespace, the complexity of namespaces is significantly simplified compared to Other Modules.
          </dd>
          <dt>Features:</dt>
          <dd>
The existing definition and use of features as described in <xref section="5.6.2" target="RFC7950"/> is unchanged for ADM modules.
This includes the declaration of a "feature" statement within an ADM module and the conditioning of the presence of an object on an "if-feature" statement.
This also treats feature identifiers as module-prefix-qualified references.
          </dd>
          <dt>Documentation Statements:</dt>
          <dd>
The existing <tt>status</tt>, <tt>description</tt>, and <tt>reference</tt> statements are unchanged from their definitions in Sections <relref displayFormat="bare" section="7.21.2" target="RFC7950"/>, <relref displayFormat="bare" section="7.21.3" target="RFC7950"/>, and <relref section="7.21.4" target="RFC7950"/> respectively.
          </dd>
          <dt>Reusable Groups:</dt>
          <dd>
The existing <tt>grouping</tt> and <tt>uses</tt> statements and logic described in <xref section="4.2.6" target="RFC7950"/> is unchanged for ADM modules generally.
Because ADM modules are a flat object namespace, the utility of reuse in an ADM module is limited to the contents of object definitions as shown in <xref target="tab-grouping-substmts"/>.
See <xref target="sec-auth-consid"/> for author considerations about the distinction between semantic type groupings and TYPEDEF instances.
          </dd>
        </dl>
        <table anchor="tab-grouping-substmts">
          <name>Allowed <tt>grouping</tt> Substatements</name>
          <thead>
            <tr>
              <th>Substatement</th>
              <th>Cardinality</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>amm:parameter</td>
              <td>0..*</td>
            </tr>
            <tr>
              <td>amm:operand</td>
              <td>0..*</td>
            </tr>
            <tr>
              <td>amm:result</td>
              <td>0..1</td>
            </tr>
            <tr>
              <th colspan="2">One of the semantic type:</th>
            </tr>
            <tr>
              <td>amm:type</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:ulist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:dlist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:tblt</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:umap</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:union</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:seq</td>
              <td>0..1</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="sec-yang-proc-restrict">
        <name>Restrictions and Exclusions</name>
        <t>
Because of the different interpretation of data definitions for an ADM module, the following restrictions are used to limit pre-existing valid YANG syntax within an ADM module:
        </t>
        <dl>
          <dt>Built-In Types:</dt>
          <dd>
Because ADM modules have data that ultimately follows the AMM value model (see <xref section="3.1" target="I-D.ietf-dtn-amm"/>), the built-in types listed in <xref section="4.2.4" target="RFC7950"/>, the "type" statement of <xref section="7.4" target="RFC7950"/>, and the "typedef" statement of <xref section="7.3" target="RFC7950"/> do not directly apply to ADM modules.
As defined in this document, there is no direct deterministic mapping between Other Module typing and ADM module typing.
An ADM module <bcp14>SHALL NOT</bcp14> contain any YANG built-in type or any "type" or "typedef" statements.
            </dd>
          <dt>Data Node Structure:</dt>
          <dd>
As defined in this document, there is no direct deterministic mapping between the complex, hierarchical, named data nodes of YANG and unnamed AMM values.
An ADM module <bcp14>SHALL NOT</bcp14> contain any YANG data node statements, among them "container", "leaf", "leaf-list", "list", "anydata", "anyxml", "choice".
            </dd>
          <dt>Configuration Versus State:</dt>
          <dd>
Because of the different semantics of an ADM module from an Other Module, there is no concept of a labeling of some data as "configuration" and other as "state".
An ADM module <bcp14>SHALL NOT</bcp14> contain any "config" statements.
            </dd>
          <dt>Data Presence Versus Value:</dt>
          <dd>
Rather than being an extrinsic notion of presence or absence, AMM objects can use type unions with the <tt>NULL</tt> type to indicate optional values and AMM values can use the <tt>null</tt> value to represent that state.
In the case of formal parameters, the use of a "default" statement is used to indicate behavior when an actual parameter is <tt>undefined</tt>.
In any case, the AMM value is always present when defined in the structure of an AMM object.
An ADM module <bcp14>SHALL NOT</bcp14> contain any "mandatory" statements.
            </dd>
          <dt>Nested Object Definitions:</dt>
          <dd>
Because of the flat structure of an ADM, the nesting allowed and encouraged by <xref section="5.5" target="RFC7950"/>, are not allowed to be present in an ADM module.
An ADM module <bcp14>SHALL</bcp14> contain all AMM object definitions at the top (module) level.
            </dd>
          <dt>XPath Expressions:</dt>
          <dd>
The ADM module makes no use of XML or XPath in its definitions or logical constraints, so the behaviors described in <xref section="6.4" target="RFC7950"/> and in statements containing XPath expressions ("must", "when", "path", "augment") do not apply to ADM modules.
All references in an ADM module take the form of an ARI.
            </dd>
          <dt>NETCONF Operations:</dt>
          <dd>
Because an ADM module will not be used for modeling in NETCONF and related protocols, the statements associated with NETCONF operations (notably "action", "notification", "rpc") <bcp14>SHALL NOT</bcp14> be present in an ADM module.
            </dd>
          <dt>Extending Models:</dt>
          <dd>
Because the transport of AMM values takes the form of an ARI, which does not include identity information the way XML elements do, the concept of extending an existing Legacy model by another model as described in <xref section="4.2.8" target="RFC7950"/> cannot apply to an ADM.
The model extension "augment" statement <bcp14>SHALL NOT</bcp14> be present in an ADM module.
            </dd>
        </dl>
      </section>
    </section>
    <section anchor="sec-yang-types">
      <name>Built-In Types, TYPEDEFs, and Semantic Types</name>
      <t>
As discussed in <xref target="sec-yang-proc-restrict"/>, the YANG type and node models are fundamentally different from the AMM value model of <xref section="3.1" target="I-D.ietf-dtn-amm"/>.
While YANG modules have been used to model data for XML representation for NETCONF (or equivalent representations for equivalent protocols), AMM values do not have explicit identifiers and have ARI representation.
      </t>
      <t>
Similar to how YANG treats built-in types, the AMM built-in type names are used without any namespace context.
Differently to YANG, the AMM type names are encoded in ARI syntax and compared in a case-insensitive manner.
One example of naming a built-in type <tt>UINT</tt> is below.
      </t>
      <sourcecode>
/ARITYPE/UINT
</sourcecode>
      <t>
A TYPEDEF is a way for an ADM to apply a name and descriptive metadata to a specific semantic type (see <xref section="3.3" target="I-D.ietf-dtn-amm"/>).
The TYPEDEF is also a top-level ADM object, as explained in <xref section="3.4.2" target="I-D.ietf-dtn-amm"/> with a syntax in <xref target="sec-yang-ext-typedef"/>.
Because they are ADM objects, they can be referenced by ARIs when necessary as in the example below.
      </t>
      <sourcecode>
//example/adm-a/TYPEDEF/mytype
</sourcecode>
      <t>
Except for the case of a simple "type" with no restrictions or annotations, anywhere one of the <xref target="sec-yang-ext-semtype">semantic type statements</xref> occurs in an object definition can be considered as an "anonymous" unnamed semantic type.
The behavior in those cases is identical to a TYPEDEF just without a name associated with the semantic type.
      </t>
    </section>
    <section anchor="sec-yang-ext">
      <name>ADM Module Extensions</name>
      <t>
In order to provide syntax necessary for AMM Object instance definitions this document defines, via the <xref target="sec-yang-ietf-amm">DTNMA ADM</xref>, the following extensions for ADM modules.
      </t>
      <section anchor="sec-yang-ext-enum">
        <name>The <tt>amm:enum</tt> Statement</name>
        <t>
This statement is used to apply an integer enumeration to an ADM module, organization, or AMM object.
Integer enumeration enables the compressed form of ARI discussed in <xref section="3.1" target="I-D.ietf-dtn-ari"/>.
The argument to this statement is an integer in the YANG range <tt>0..2^31-1</tt> to fit within the ARI syntax.
There are no substatements defined in this profile.
        </t>
        <t>
All well-known registered ADMs <bcp14>SHALL</bcp14> contain an <tt>amm:enum</tt> substatement within the top <tt>module</tt> statement and its <tt>organization</tt> statement.
The value in the organization enumeration <bcp14>SHALL</bcp14> agree with the registration in the "Namespace Organizations" registry of <xref target="IANA-DTNMA"/>.
        </t>
      </section>
      <section anchor="sec-yang-ext-semtype">
        <name>Semantic Type Statements</name>
        <t>
The statements within this section enable the various semantic type classes, as explained in <xref section="3.3" target="I-D.ietf-dtn-amm"/>.
They are all used as substatements within one of the AMM object definition statements, sometimes directly (<em>e.g.</em>, for CONST or EDD typing) and sometimes indirectly (<em>e.g.</em>, for parameter or operand typing), but always as a choice between the need for one of the semantic type statements.
        </t>
        <section anchor="sec-yang-ext-type">
          <name>The <tt>amm:type</tt> Statement</name>
          <t>
This statement creates a Named Type Use semantic type (see <xref section="3.3.1" target="I-D.ietf-dtn-amm"/>) for its parent statement.
The argument to this statement is the text form of the ARI for the type being used, which can either be a built-in <tt>ARITYPE</tt> or a <tt>TYPEDEF</tt> object reference.
          </t>
          <t>
The substatements under this are annotations or constraints on the type being used.
The <tt>units</tt>, <tt>range</tt>, <tt>length</tt>, and <tt>pattern</tt> statements have the same syntax and semantics as defined in <xref target="RFC7950"/> when applied to AMM values.
For compatibility reasons, the arguments used for <tt>pattern</tt> statements <bcp14>SHALL</bcp14> be limited to the constructs compatible with I-Regexp of <xref target="RFC9485"/>.
          </t>
          <table>
            <name><tt>amm:type</tt> Substatements</name>
            <thead>
              <tr>
                <th>Substatement</th>
                <th>Cardinality</th>
                <th>Valid for These Types</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>description</td>
                <td>0..1</td>
                <td>any</td>
              </tr>
              <tr>
                <td>reference</td>
                <td>0..1</td>
                <td>any</td>
              </tr>
              <tr>
                <th colspan="3">Display annotations</th>
              </tr>
              <tr>
                <td>units</td>
                <td>0..1</td>
                <td>Any <tt>NUMERIC</tt></td>
              </tr>
              <tr>
                <td>amm:display-hint</td>
                <td>0..1</td>
                <td>any</td>
              </tr>
              <tr>
                <td>amm:int-labels</td>
                <td>0..1</td>
                <td>Any <tt>INTEGER</tt> type</td>
              </tr>
              <tr>
                <th colspan="3">Value constraints</th>
              </tr>
              <tr>
                <td>range</td>
                <td>0..1</td>
                <td>Any <tt>INTEGER</tt> or <tt>FLOAT</tt>, with appropriate quantized values in the argument</td>
              </tr>
              <tr>
                <td>length</td>
                <td>0..1</td>
                <td>For <tt>TEXTSTR</tt> as number of characters. For <tt>BYTESTR</tt> or <tt>CBOR</tt> as number of bytes.</td>
              </tr>
              <tr>
                <td>pattern</td>
                <td>0..1</td>
                <td>For <tt>TEXTSTR</tt> only</td>
              </tr>
              <tr>
                <td>amm:cddl</td>
                <td>0..1</td>
                <td>For <tt>CBOR</tt> only</td>
              </tr>
              <tr>
                <td>amm:base</td>
                <td>0..*</td>
                <td>For <tt>IDENT</tt> only</td>
              </tr>
            </tbody>
          </table>
          <t>
Examples of the "type" statement are below, some as simple use and some as restriction.
          </t>
          <sourcecode type="yang">
amm:type "/aritype/uint" {
  description
    "unconstrained";
}
amm:type "/aritype/uint" {
  description
    "constrained number";
  units "meter";
  range "3..10";
}
amm:type "/aritype/textstr" {
  description
    "constrained text size";
  length "10..100";
}
</sourcecode>
          <section anchor="sec-yang-ext-display-hint">
            <name>The <tt>amm:display-hint</tt> Statement</name>
            <t>
This statement provides general purpose tailoring of how AMM values are intended to be displayed.
The argument to this statement is the text form of the ARI referencing an IDENT object derived from the root <tt>ari://ietf-amm/IDENT/display-hint</tt> object.
            </t>
            <t>
The description of any leaf IDENT derived from this root object <bcp14>SHALL</bcp14> contain specific requirements for how the display hint affects text form of any associated values, including restrictions on which built-in types the hint can be used with.
            </t>
          </section>
          <section anchor="sec-yang-ext-int-labels">
            <name>The <tt>amm:int-labels</tt> Statement</name>
            <t>
This statement provides human-friendly labels for enumerated values or bit positions within an integer type.
There is no argument to this statement.
            </t>
            <t>
The substatements under this are either "enum" or "bit" statements from YANG, each of which define a single value or bit name within the type.
A single "amm:int-labels" <bcp14>SHALL NOT</bcp14> use a mix of "enum" and "bit" substatements as this would result in ambiguous interpretation.
When present, each "enum" statement <bcp14>SHALL</bcp14> contain an explicit and unique "value" substatement.
When present, each "bit" statement <bcp14>SHALL</bcp14> contain an explicit and unique "position" substatement.
            </t>
            <table>
              <name><tt>amm:int-labels</tt> Substatements</name>
              <thead>
                <tr>
                  <th>Substatement</th>
                  <th>Cardinality</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>enum</td>
                  <td>0..n</td>
                </tr>
                <tr>
                  <td>bit</td>
                  <td>0..n</td>
                </tr>
              </tbody>
            </table>
          </section>
          <section anchor="sec-yang-ext-cddl">
            <name>The <tt>amm:cddl</tt> Statement</name>
            <t>
This statement provides annotation of allowed content within a <tt>CBOR</tt> type byte string in the form of a Concise Data Definition Language (CDDL) fragment.
The argument to this statement is a CDDL fragment in accordance with <xref target="RFC8610"/>, escaped as necessary to conform to the YANG syntax.
            </t>
            <t>
There are no substatements within this statement.
            </t>
          </section>
          <section anchor="sec-yang-ext-base-use">
            <name>The <tt>amm:base</tt> Statement</name>
            <t>
This statement constrains an <xref target="sec-yang-ext-ident">IDENT</xref> object reference to allow only objects with a particular base themselves.
The argument to this statement is the text form of the ARI referencing the required base object.
            </t>
            <t>
There are no substatements within this statement.
            </t>
          </section>
        </section>
        <section anchor="sec-yang-ext-ulist">
          <name>The <tt>amm:ulist</tt> Statement</name>
          <t>
This statement creates a Uniform List semantic type (see <xref section="3.3.2" target="I-D.ietf-dtn-amm"/>) for its parent statement.
There is no argument to this statement.
          </t>
          <table>
            <name><tt>amm:ulist</tt> Substatements</name>
            <thead>
              <tr>
                <th>Substatement</th>
                <th>Cardinality</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>description</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>reference</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>min-elements</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>max-elements</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>uses</td>
                <td>0..1</td>
              </tr>
              <tr>
                <th colspan="2">One of the semantic type:</th>
              </tr>
              <tr>
                <td>amm:type</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:ulist</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:dlist</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:umap</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:union</td>
                <td>0..1</td>
              </tr>
            </tbody>
          </table>
          <t>
Examples of the "amm:ulist" statement are below, some as simple use and some as restriction.
          </t>
          <sourcecode type="yang">
amm:ulist {
  amm:type "/aritype/uint";
}
amm:ulist {
  amm:type "/aritype/uint" {
    range "3..10";
    units "meter";
  }
  min-elements 2;
  max-elements 10;
}
</sourcecode>
        </section>
        <section anchor="sec-yang-ext-dlist">
          <name>The <tt>amm:dlist</tt> Statement</name>
          <t>
This statement creates a Diverse List semantic type (see <xref section="3.3.3" target="I-D.ietf-dtn-amm"/>) for its parent statement.
There is no argument to this statement.
          </t>
          <t>
Each of the type use substatements defines a single element within the AC, except for the <tt>amm:seq</tt> which defines a sequence of type-matching elements within the AC (rather than as a sub-AC).
          </t>
          <table>
            <name><tt>amm:dlist</tt> Substatements</name>
            <thead>
              <tr>
                <th>Substatement</th>
                <th>Cardinality</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>description</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>reference</td>
                <td>0..1</td>
              </tr>
              <tr>
                <th colspan="2">One or more of the semantic type:</th>
              </tr>
              <tr>
                <td>amm:type</td>
                <td>0..n</td>
              </tr>
              <tr>
                <td>amm:ulist</td>
                <td>0..n</td>
              </tr>
              <tr>
                <td>amm:dlist</td>
                <td>0..n</td>
              </tr>
              <tr>
                <td>amm:umap</td>
                <td>0..n</td>
              </tr>
              <tr>
                <td>amm:union</td>
                <td>0..n</td>
              </tr>
              <tr>
                <td>amm:seq</td>
                <td>0..n</td>
              </tr>
            </tbody>
          </table>
          <t>
Examples of the "amm:dlist" statement are below, one as simple structure and the other as a complex sequence.
          </t>
          <sourcecode type="yang">
amm:dlist {
  // each "type" substatement is one element of the AC
  amm:type "/aritype/uint";
  amm:type "/aritype/uint";
}
amm:dlist {
  // first AC element is text
  amm:type "/aritype/textstr";
  // remaining 2-10 element are int
  amm:seq {
    amm:type "/aritype/int";
    min-elements 2;
    max-elements 10;
  }
}
</sourcecode>
        </section>
        <section anchor="sec-yang-ext-umap">
          <name>The <tt>amm:umap</tt> Statement</name>
          <t>
This statement creates a Uniform Map semantic type (see <xref section="3.3.4" target="I-D.ietf-dtn-amm"/>) for its parent statement.
There is no argument to this statement.
          </t>
          <t>
When present, each of the <tt>amm:keys</tt> and <tt>amm:values</tt> substatements constrains the associated aspect of all map items to the specific type; when absent the aspect is left unconstrained.
Keep in mind that AM keys are always constrained to untyped literal values and the use of <tt>amm:keys</tt> can only narrow this constraint.
          </t>
          <table>
            <name><tt>amm:umap</tt> Substatements</name>
            <thead>
              <tr>
                <th>Substatement</th>
                <th>Cardinality</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>description</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>reference</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:keys</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:values</td>
                <td>0..1</td>
              </tr>
            </tbody>
          </table>
          <table>
            <name><tt>amm:keys</tt> and <tt>amm:values</tt> Substatements</name>
            <thead>
              <tr>
                <th>Substatement</th>
                <th>Cardinality</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>description</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>reference</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>uses</td>
                <td>0..1</td>
              </tr>
              <tr>
                <th colspan="2">One of the semantic type:</th>
              </tr>
              <tr>
                <td>amm:type</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:ulist</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:dlist</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:umap</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:union</td>
                <td>0..1</td>
              </tr>
            </tbody>
          </table>
          <t>
Examples of the "amm:umap" statement are below, some as simple use and some as restriction.
          </t>
          <sourcecode type="yang">
amm:umap {
  description
    "restrict only keys";
  amm:keys {
    amm:type "/aritype/uint";
  }
}
amm:umap {
  description
    "Map uint to text values.";
  amm:keys {
    amm:type "/aritype/uint";
  }
  amm:values {
    amm:type "/aritype/textstr";
  }
}
</sourcecode>
        </section>
        <section anchor="sec-yang-ext-tblt">
          <name>The <tt>amm:tblt</tt> Statement</name>
          <t>
This statement creates a Table Template semantic type (see <xref section="3.3.5" target="I-D.ietf-dtn-amm"/>) for its parent statement.
There is no argument to this statement.
          </t>
          <t>
The substatements are a combination of "amm:column" statements defining table structure and "amm:key", "amm:unique", "min-elements", "max-elements" statements defining constraints on the table rows.
          </t>
          <table>
            <name><tt>amm:tblt</tt> Substatements</name>
            <thead>
              <tr>
                <th>Substatement</th>
                <th>Cardinality</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>description</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>reference</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>min-elements</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>max-elements</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:key</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:unique</td>
                <td>0..n</td>
              </tr>
              <tr>
                <td>amm:column</td>
                <td>0..n</td>
              </tr>
            </tbody>
          </table>
          <t>
Examples of the "amm:tblt" statement are below.
          </t>
          <sourcecode type="yang">
amm:tblt {
  amm:column first {
    amm:type "/aritype/uint";
  }
  amm:column second {
    amm:type "/aritype/textstr";
  }
  amm:key "first";
}
</sourcecode>
          <section>
            <name>The <tt>amm:column</tt> Statement</name>
            <t>
This statement defines the name and type of each column of a table.
The argument to this statement is an identifier for the column.
All columns <bcp14>SHALL</bcp14> have unique names within the same parent table.
            </t>
            <t>
The primary substatement under this are one of the <xref target="sec-yang-ext-semtype">semantic type statements</xref> which defines the type for values in this column.
If present, any "if-feature" substatement within a column indicates that an Agent which does not implement the named feature(s) will: always use the undefined value in this column when producing tables associated with the parent template and/or always ignore (but not modify) given values in this column when processing these tables.
            </t>
            <table>
              <name><tt>amm:column</tt> Substatements</name>
              <thead>
                <tr>
                  <th>Substatement</th>
                  <th>Cardinality</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>if-feature</td>
                  <td>0..1</td>
                </tr>
                <tr>
                  <td>description</td>
                  <td>0..1</td>
                </tr>
                <tr>
                  <td>reference</td>
                  <td>0..1</td>
                </tr>
                <tr>
                  <td>uses</td>
                  <td>0..1</td>
                </tr>
                <tr>
                  <th colspan="2">One of the semantic type:</th>
                </tr>
                <tr>
                  <td>amm:type</td>
                  <td>0..1</td>
                </tr>
                <tr>
                  <td>amm:ulist</td>
                  <td>0..1</td>
                </tr>
                <tr>
                  <td>amm:dlist</td>
                  <td>0..1</td>
                </tr>
                <tr>
                  <td>amm:umap</td>
                  <td>0..1</td>
                </tr>
                <tr>
                  <td>amm:union</td>
                  <td>0..1</td>
                </tr>
              </tbody>
            </table>
          </section>
        </section>
        <section anchor="sec-yang-ext-union">
          <name>The <tt>amm:union</tt> Statement</name>
          <t>
This statement creates a <xref target="I-D.ietf-dtn-amm">Type Union</xref> semantic type for its parent statement.
There is no argument to this statement.
          </t>
          <t>
Each of the substatements defines one of the possible choices of the union.
The order of the list of choices is significant, especially when converting ARI values, because the first choice which matches or converts will be used regardless of any other choices.
          </t>
          <table>
            <name><tt>amm:union</tt> Substatements</name>
            <thead>
              <tr>
                <th>Substatement</th>
                <th>Cardinality</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>description</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>reference</td>
                <td>0..1</td>
              </tr>
              <tr>
                <th colspan="2">Ordered choice of semantic types:</th>
              </tr>
              <tr>
                <td>amm:type</td>
                <td>0..n</td>
              </tr>
              <tr>
                <td>amm:ulist</td>
                <td>0..n</td>
              </tr>
              <tr>
                <td>amm:dlist</td>
                <td>0..n</td>
              </tr>
              <tr>
                <td>amm:tblt</td>
                <td>0..n</td>
              </tr>
              <tr>
                <td>amm:umap</td>
                <td>0..n</td>
              </tr>
            </tbody>
          </table>
          <t>
Examples of the "union" statement are below, some as simple use and some as restriction.
          </t>
          <sourcecode type="yang">
amm:union {
  description
    "an optional int";
  amm:type "/aritype/int";
  amm:type "/aritype/null";
}
amm:union {
  amm:type "/aritype/uint" {
    range "3..10";
    units "meter";
  }
  amm:type "/aritype/textstr";
}
</sourcecode>
        </section>
        <section anchor="sec-yang-ext-seq">
          <name>The <tt>amm:seq</tt> Statement</name>
          <t>
This statement creates a Sequence semantic type (see <xref section="3.3.7" target="I-D.ietf-dtn-amm"/>) for its parent statement.
There is no argument to this statement.
          </t>
          <t>
This statement is distinct from the "amm:ulist" statement, which types the AC container itself, while the "amm:seq" types a portion of elements within an AC.
The "amm:seq" is not present as a top-level value type except for the special case of a greedy capturing parameter type.
          </t>
          <table>
            <name><tt>amm:seq</tt> Substatements</name>
            <thead>
              <tr>
                <th>Substatement</th>
                <th>Cardinality</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>description</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>reference</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>min-elements</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>max-elements</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>uses</td>
                <td>0..1</td>
              </tr>
              <tr>
                <th colspan="2">One of the semantic type:</th>
              </tr>
              <tr>
                <td>amm:type</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:ulist</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:dlist</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:umap</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:union</td>
                <td>0..1</td>
              </tr>
            </tbody>
          </table>
          <t>
Examples of the "seq" statement are below.
          </t>
          <sourcecode type="yang">
amm:dlist {
  amm:type "/aritype/textstr";
  amm:seq {
    amm:type "/aritype/uint";
    min-elements 1;
  }
}
</sourcecode>
        </section>
      </section>
      <section anchor="sec-yang-ext-parameter">
        <name>The <tt>amm:parameter</tt> Statement</name>
        <t>
This statement is used to define one formal parameter that apply to the parent object.
The argument to this statement is an identifier for the parameter.
All parameters <bcp14>SHALL</bcp14> have unique names within the same parent object.
        </t>
        <t>
The substatements under this are one of the <xref target="sec-yang-ext-semtype">semantic type statements</xref> which defines the type of the parameter.
When the "amm:seq" statement is used to type a formal parameter, it <bcp14>SHALL</bcp14> be the last parameter in the list and represents a greedy matching of that an all subsequent given parameters.
        </t>
        <table>
          <name><tt>amm:parameter</tt> Substatements</name>
          <thead>
            <tr>
              <th>Substatement</th>
              <th>Cardinality</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>description</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>reference</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:default</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>uses</td>
              <td>0..1</td>
            </tr>
            <tr>
              <th colspan="2">One of the semantic type:</th>
            </tr>
            <tr>
              <td>amm:type</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:ulist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:dlist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:tblt</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:umap</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:union</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:seq</td>
              <td>0..1</td>
            </tr>
          </tbody>
        </table>
        <t>
An example of the "parameter" statement is below, where there are three defined parameters two of which have default values.
        </t>
        <sourcecode type="yang">
  amm:parameter first {
    amm:type "/aritype/uint" {
      range "3..10";
    }
  }
  amm:parameter second {
    amm:type "/aritype/textstr";
    amm:default "\"value\"";
  }
  amm:parameter third {
    amm:ulist {
      amm:type "/aritype/uint";
    }
    amm:default "/AC/(3,5,8)"
  }
</sourcecode>
        <section anchor="sec-yang-ext-default">
          <name>The <tt>amm:default</tt> Statement</name>
          <t>
This statement is used to define default parameter as an AMM value.
The argument to this statement is the text form of the ARI for the default value.
          </t>
          <t>
The default value is used in the Parameter Handling procedure (see <xref section="6.4" target="I-D.ietf-dtn-amm"/>) to normalize given parameters into actual parameters.
          </t>
        </section>
      </section>
      <section anchor="sec-yang-ext-typedef">
        <name>The <tt>amm:typedef</tt> Statement</name>
        <t>
This statement is used to define a Semantic Type (TYPEDEF) object (see <xref section="3.4.2" target="I-D.ietf-dtn-amm"/>).
The argument to this statement is the name of the object instance.
        </t>
        <t>
The substatements under this are a choice of a top-level semantic type (see <xref target="sec-yang-ext-semtype"/>) being named by the typedef.
        </t>
        <table>
          <name><tt>amm:typedef</tt> Substatements</name>
          <thead>
            <tr>
              <th>Substatement</th>
              <th>Cardinality</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>if-feature</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:enum</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>status</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>description</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>reference</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>uses (for semantic type)</td>
              <td>0..1</td>
            </tr>
            <tr>
              <th colspan="2">One of the semantic type:</th>
            </tr>
            <tr>
              <td>amm:type</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:ulist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:dlist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:tblt</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:umap</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:union</td>
              <td>0..1</td>
            </tr>
          </tbody>
        </table>
        <t>
Examples of the "typedef" statement are below, some as restriction and some as union.
        </t>
        <sourcecode type="yang">
  amm:typedef restricted-uint {
    description
      "Example restriction";
    amm:type "/aritype/uint" {
      range "3..10";
    }
  }
  amm:typedef annotated-uint {
    description
      "Example units annotation";
    amm:type "/aritype/uint" {
      units "meter";
    }
  }
  amm:typedef structured-ac {
    description
      "Example units on AC items";
    amm:ulist {
      amm:type "/aritype/real32";
      amm:units "meter";
      min-elements 3;
      max-elements 10;
    }
  }
</sourcecode>
      </section>
      <section anchor="sec-yang-ext-ident">
        <name>The <tt>amm:ident</tt> Statement</name>
        <t>
This statement is used to define an Identity (IDENT) object (see <xref section="3.4.3" target="I-D.ietf-dtn-amm"/>).
The argument to this statement is the name of the object instance.
        </t>
        <t>
The substatements under this are the common object metadata, optional formal parameters, and any number of base IDENT objects from which this one is derived.
        </t>
        <table>
          <name><tt>amm:ident</tt> Substatements</name>
          <thead>
            <tr>
              <th>Substatement</th>
              <th>Cardinality</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>if-feature</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:enum</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:parameter</td>
              <td>0..n</td>
            </tr>
            <tr>
              <td>status</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>description</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>reference</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:abstract</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:base</td>
              <td>0..*</td>
            </tr>
            <tr>
              <td>uses (for parameters)</td>
              <td>0..1</td>
            </tr>
          </tbody>
        </table>
        <t>
An example of a multiple-base hierarchy of IDENT objects is below.
        </t>
        <sourcecode type="yang">
  amm:ident base-a {
    amm:abstract true;
    description
      "A base identity object.";
  }
  amm:ident base-b {
    amm:abstract true;
    description
      "Another base identity object.";
  }
  amm:ident use-1 {
    amm:base "./IDENT/base-a";
    description
      "An identity derived from base-a.";
  }
  amm:ident use-2 {
    amm:base "./IDENT/use-1";
    amm:base "./IDENT/base-b";
    description
      "An identity derived from base-a (via use-1) and base-b.";
  }
  amm:ident use-3 {
    amm:base "./IDENT/base-b";
    amm:parameter option {
      amm:type "/aritype/int";
    }
    description
      "An identity derived from base-b which includes a parameter.";
  }
</sourcecode>
        <section anchor="sec-yang-ext-abstract">
          <name>The <tt>amm:abstract</tt> Statement</name>
          <t>
This statement causes the parent <xref target="sec-yang-ext-ident">IDENT</xref> object to be explicitly marked as abstract or not, as defined in <xref section="3.4.3" target="I-D.ietf-dtn-amm"/>.
The argument to this statement is a boolean ("true" or "false") value in accordance with <xref section="9.5" target="RFC7950"/>.
If not present, the default marking of the IDENT object is not-abstract.
          </t>
          <t>
There are no substatements within this statement.
          </t>
        </section>
        <section anchor="sec-yang-ext-base">
          <name>The <tt>amm:base</tt> Statement</name>
          <t>
This statement causes the parent <xref target="sec-yang-ext-ident">IDENT</xref> object to be derived from a referenced base object.
The argument to this statement is the text form of the ARI referencing the required base object.
          </t>
          <t>
Similar to YANG logic, in the AMM derivation of an <tt>IDENT</tt> from a base has the following properties.
          </t>
          <ul>
            <li>It is irreflexive, which means that an identity is not derived from itself.</li>
            <li>It is transitive, which means that if identity B is derived from A and C is derived from B, then C is also derived from A.</li>
          </ul>
          <t>
There are no substatements within this statement.
          </t>
        </section>
      </section>
      <section anchor="sec-yang-ext-const">
        <name>The <tt>amm:const</tt> Statement</name>
        <t>
This statement is used to define a Constant (CONST) object (see <xref section="3.4.5" target="I-D.ietf-dtn-amm"/>).
The argument to this statement is the name of the object instance.
        </t>
        <t>
The substatements under this are the common object metadata, optional formal parameters, and one of the <xref target="sec-yang-ext-semtype">semantic type statements</xref> that represents the produced value of the CONST.
The <tt>amm:const</tt> statement <bcp14>SHALL</bcp14> contain a an <tt>amm:init-value</tt>, which is the constant represented by this object.
        </t>
        <table>
          <name><tt>amm:const</tt> Substatements</name>
          <thead>
            <tr>
              <th>Substatement</th>
              <th>Cardinality</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>if-feature</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:enum</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:parameter</td>
              <td>0..n</td>
            </tr>
            <tr>
              <td>status</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>description</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>reference</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:init-value</td>
              <td>1</td>
            </tr>
            <tr>
              <td>uses (for parameters and semantic type)</td>
              <td>0..1</td>
            </tr>
            <tr>
              <th colspan="2">One of the semantic type:</th>
            </tr>
            <tr>
              <td>amm:type</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:ulist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:dlist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:tblt</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:umap</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:union</td>
              <td>0..1</td>
            </tr>
          </tbody>
        </table>
        <t>
An example of a simple-typed CONST is below.
        </t>
        <sourcecode type="yang">
  amm:const pi32 {
    amm:type "/aritype/real32";
    amm:init-value "3.14159";
    description
      "A truncated value of Pi.";
  }
</sourcecode>
        <t>
Another example of a semantic-typed MAC-valued CONST (see <xref section="4.2.4" target="I-D.ietf-dtn-amm"/>) is below.
        </t>
        <sourcecode type="yang">
  amm:const do_thing {
    amm:type "//ietf-amm/typedef/mac";
    amm:init-value "/AC/(../CTRL/first,../CTRL/second(2))";
    description
      "Execute two controls in sequence.";
  }
</sourcecode>
      </section>
      <section anchor="sec-yang-ext-ctrl">
        <name>The <tt>amm:ctrl</tt> Statement</name>
        <t>
This statement is used to define a Control (CTRL) object (see <xref section="3.4.6" target="I-D.ietf-dtn-amm"/>).
The argument to this statement is the name of the object instance.
        </t>
        <t>
The substatements under this are the common object metadata, optional formal parameters, and an optional execution result.
If the <tt>amm:result</tt> substatement is present it <bcp14>SHALL</bcp14> be used to constrain Result Storage for the execution procedure (see <xref section="6.6" target="I-D.ietf-dtn-amm"/>).
If the <tt>amm:result</tt> substatement is omitted the assumed result type <bcp14>SHALL</bcp14> be <tt>NULL</tt> with a default value of <tt>null</tt>.
Regardless of the presence or type indicated by an <tt>amm:result</tt> substatement, the failure to execute any control always results in an <tt>undefined</tt> result value.
        </t>
        <table>
          <name><tt>amm:ctrl</tt> Substatements</name>
          <thead>
            <tr>
              <th>Substatement</th>
              <th>Cardinality</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>if-feature</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:enum</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:parameter</td>
              <td>0..n</td>
            </tr>
            <tr>
              <td>status</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>description</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>reference</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:result</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>uses (for parameters and result)</td>
              <td>0..1</td>
            </tr>
          </tbody>
        </table>
        <t>
An example of a single-parameter CTRL is below.
        </t>
        <sourcecode type="yang">
  amm:ctrl reset_count {
    amm:parameter src {
      type textstr;
      description
        "The name of the source.";
    }
    amm:result previous {
      type UVAST;
      description
        "The value just before reset.";
    }
    description
      "This control resets counts for the given source.";
  }
</sourcecode>
        <section>
          <name>The <tt>amm:result</tt> Statement</name>
          <t>
The result statement contains one of the <xref target="sec-yang-ext-semtype">semantic type statements</xref> which represents the result expected from executing a CTRL or evaluating an OPER.
The argument to this statement is an identifier for the result.
          </t>
          <table>
            <name><tt>amm:result</tt> Substatements</name>
            <thead>
              <tr>
                <th>Substatement</th>
                <th>Cardinality</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>description</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>reference</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>uses (for semantic type)</td>
                <td>0..1</td>
              </tr>
              <tr>
                <th colspan="2">One of the semantic type:</th>
              </tr>
              <tr>
                <td>amm:type</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:ulist</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:dlist</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:tblt</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:umap</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:union</td>
                <td>0..1</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="sec-yang-ext-edd">
        <name>The <tt>amm:edd</tt> Statement</name>
        <t>
This statement is used to define an Externally Defined Data (EDD) object (see <xref section="3.4.4" target="I-D.ietf-dtn-amm"/>).
The argument to this statement is the name of the object instance.
        </t>
        <t>
The substatements under this are the common object metadata, optional formal parameters, and one of the <xref target="sec-yang-ext-semtype">semantic type statements</xref> that represents the produced value of the EDD.
        </t>
        <table>
          <name><tt>amm:edd</tt> Substatements</name>
          <thead>
            <tr>
              <th>Substatement</th>
              <th>Cardinality</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>if-feature</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:enum</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:parameter</td>
              <td>0..n</td>
            </tr>
            <tr>
              <td>status</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>description</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>reference</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>uses (for parameters and semantic type)</td>
              <td>0..1</td>
            </tr>
            <tr>
              <th colspan="2">One of the semantic type:</th>
            </tr>
            <tr>
              <td>amm:type</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:ulist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:dlist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:tblt</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:umap</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:union</td>
              <td>0..1</td>
            </tr>
          </tbody>
        </table>
        <t>
An example of a simple-typed EDD is below.
        </t>
        <sourcecode type="yang">
  amm:edd tx_count {
    amm:type "//ietf-amm/typedef/counter64" {
      units "frames";
    }
    description
      "The count of the number of frames sent.";
  }
</sourcecode>
      </section>
      <section anchor="sec-yang-ext-oper">
        <name>The <tt>amm:oper</tt> Statement</name>
        <t>
This statement is used to define an Operator (OPER) object (see <xref section="3.4.7" target="I-D.ietf-dtn-amm"/>).
The argument to this statement is the name of the object instance.
        </t>
        <t>
The substatements under this are the common object metadata, optional formal parameters, an operands list, and an evaluation result.
        </t>
        <table>
          <name><tt>amm:edd</tt> Substatements</name>
          <thead>
            <tr>
              <th>Substatement</th>
              <th>Cardinality</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>if-feature</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:enum</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:parameter</td>
              <td>0..n</td>
            </tr>
            <tr>
              <td>status</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>description</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>reference</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:operand</td>
              <td>0..*</td>
            </tr>
            <tr>
              <td>result</td>
              <td>1</td>
            </tr>
            <tr>
              <td>uses (for parameters, operands, and/or result)</td>
              <td>0..1</td>
            </tr>
          </tbody>
        </table>
        <t>
An example of an arithmetic OPER is below.
        </t>
        <sourcecode type="yang">
  amm:oper add {
    amm:operand val-a {
      amm:type "//ietf-amm/typedef/numeric";
    }
    amm:operand val-b {
      amm:type "//ietf-amm/typedef/numeric";
    }
    amm:result sum {
      amm:type "//ietf-amm/typedef/numeric";
    }
    description
      "Sum together the two operands.";
  }
</sourcecode>
        <t>
A more complex "variadic" OPER with parameters is below.
Also note the anonymous semantic type used to restrict the parameter.
        </t>
        <sourcecode type="yang">
  amm:oper sum {
    description
      "Sum together a sequence from the stack.";
    parameter count {
      description
        "The number of operands to pop."
      amm:type "/aritype/uint" {
        range "1..max";
      }
    }
    operand value {
      description
        "This is not within a container, so does not represent an AC;
        it is multiple operands.";
      amm:type "//ietf-amm/typedef/numeric";
    }
    result sum {
      amm:type "//ietf-amm/typedef/numeric";
    }
  }
</sourcecode>
        <section>
          <name>The <tt>amm:operand</tt> Statement</name>
          <t>
This statement is used to define one operand that applies to the parent object.
The argument to this statement is an identifier for the operand.
All operands <bcp14>SHALL</bcp14> have unique names within the same parent object.
          </t>
          <table>
            <name><tt>amm:operand</tt> Substatements</name>
            <thead>
              <tr>
                <th>Substatement</th>
                <th>Cardinality</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>description</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>reference</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>uses (for semantic type)</td>
                <td>0..1</td>
              </tr>
              <tr>
                <th colspan="2">One of the semantic type:</th>
              </tr>
              <tr>
                <td>amm:type</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:ulist</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:dlist</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:tblt</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:umap</td>
                <td>0..1</td>
              </tr>
              <tr>
                <td>amm:union</td>
                <td>0..1</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="sec-yang-ext-sbr">
        <name>The <tt>amm:sbr</tt> Statement</name>
        <t>
This statement is used to define a State Based Rule object (see <xref section="3.4.8" target="I-D.ietf-dtn-amm"/>).
The argument to this statement is the name of the object instance.
        </t>
        <t>
The substatements under this are the common object metadata, the action to execute upon trigger, and rule control fields defined below.
        </t>
        <table>
          <name><tt>amm:sbr</tt> Substatements</name>
          <thead>
            <tr>
              <th>Substatement</th>
              <th>Cardinality</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>if-feature</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:enum</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>status</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>description</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>reference</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:action</td>
              <td>1</td>
            </tr>
            <tr>
              <td>amm:condition</td>
              <td>1</td>
            </tr>
            <tr>
              <td>amm:min-interval</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:max-count</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:init-enabled</td>
              <td>0..1</td>
            </tr>
          </tbody>
        </table>
        <t>
An example of an SBR with some default fields is below.
        </t>
        <sourcecode type="yang">
  amm:sbr enable_safe_mode {
    description
      "Enable safe mode below threshold.";
    amm:action "/AC/(./CTRL/ensure_safe_mode(true))";
    amm:condition "/AC/(./EDD/sensor,./VAR/min_threshold,"
      +"/ietf-amm/OPER/compare_lt)";
  }
</sourcecode>
        <section>
          <name>The <tt>amm:min-interval</tt> Statement</name>
          <t>
This statement is used to define the Minimum Interval field of <xref target="sec-yang-ext-sbr">SBR</xref> objects.
The argument to this statement is the text form of a <tt>TD</tt> value.
If not present, the default value of zero (meaning no minimum) is used.
          </t>
        </section>
        <section>
          <name>The <tt>amm:max-count</tt> Statement</name>
          <t>
This statement is used to define the Maximum Count field of <xref target="sec-yang-ext-sbr">SBR</xref> and <xref target="sec-yang-ext-tbr">TBR</xref> objects.
The argument to this statement is the text form of a <tt>UVAST</tt> value.
If not present, the default value of zero (meaning no limit) is used.
          </t>
        </section>
        <section>
          <name>The <tt>amm:init-enabled</tt> Statement</name>
          <t>
This statement is used to define the Initial Enabled state of <xref target="sec-yang-ext-sbr">SBR</xref> and <xref target="sec-yang-ext-tbr">TBR</xref> objects.
The argument to this statement is a boolean ("true" or "false") value in accordance with <xref section="9.5" target="RFC7950"/>.
If not present, the default value of <tt>true</tt> is used.
          </t>
        </section>
      </section>
      <section anchor="sec-yang-ext-tbr">
        <name>The <tt>amm:tbr</tt> Statement</name>
        <t>
This statement is used to define a Time-Based Rule (TBR) object (see <xref section="3.4.9" target="I-D.ietf-dtn-amm"/>).
The argument to this statement is the name of the object instance.
        </t>
        <t>
The substatements under this are the common object metadata, the action to execute upon trigger, and rule control fields defined below.
        </t>
        <table>
          <name><tt>amm:tbr</tt> Substatements</name>
          <thead>
            <tr>
              <th>Substatement</th>
              <th>Cardinality</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>if-feature</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:enum</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>status</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>description</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>reference</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:action</td>
              <td>1</td>
            </tr>
            <tr>
              <td>amm:start</td>
              <td>1</td>
            </tr>
            <tr>
              <td>amm:period</td>
              <td>1</td>
            </tr>
            <tr>
              <td>amm:max-count</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:init-enabled</td>
              <td>0..1</td>
            </tr>
          </tbody>
        </table>
        <t>
An example of an TBR with some default fields is below.
        </t>
        <sourcecode type="yang">
  amm:tbr tlm_rule {
    description
      "Generate telemetry reports.";
    amm:action "/AC/(./CTRL/first,/adm2/CTRL/other)";
    amm:period "/TD/PT30s";
  }
</sourcecode>
        <section>
          <name>The <tt>amm:start</tt> Statement</name>
          <t>
This statement is used to define the Start field of <xref target="sec-yang-ext-tbr">TBR</xref> objects.
The argument to this statement is the text form of a <tt>TIME</tt> value (see <xref target="sec-yang-ietf-amm"/>).
If not present, the default value of zero (meaning start immediately) is used.
          </t>
        </section>
      </section>
      <section anchor="sec-yang-ext-var">
        <name>The <tt>amm:var</tt> Statement</name>
        <t>
This statement is used to define a Variable (VAR) object (see <xref section="3.4.10" target="I-D.ietf-dtn-amm"/>).
The argument to this statement is the name of the object instance.
        </t>
        <t>
The substatements under this are the common object metadata, optional formal parameters, one of the <xref target="sec-yang-ext-semtype">semantic type statements</xref> that represents the stored-and-produced value of the VAR, and an optional initializer expression.
        </t>
        <table>
          <name><tt>amm:var</tt> Substatements</name>
          <thead>
            <tr>
              <th>Substatement</th>
              <th>Cardinality</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>if-feature</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:enum</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:parameter</td>
              <td>0..n</td>
            </tr>
            <tr>
              <td>status</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>description</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>reference</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:init-value</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>uses (for parameters and semantic type)</td>
              <td>0..1</td>
            </tr>
            <tr>
              <th colspan="2">One of the semantic type:</th>
            </tr>
            <tr>
              <td>amm:type</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:ulist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:dlist</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:tblt</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:umap</td>
              <td>0..1</td>
            </tr>
            <tr>
              <td>amm:union</td>
              <td>0..1</td>
            </tr>
          </tbody>
        </table>
        <t>
An example of a simple-typed VAR with an initializer value is below.
        </t>
        <sourcecode type="yang">
  amm:var min_threshold {
    description
      "The lower threshold to enable safe mode.";
    amm:type "/aritype/real32" {
      units "meter";
    }
    amm:init-value "1e4";
  }
</sourcecode>
        <section>
          <name>The <tt>amm:init-value</tt> Statement</name>
          <t>
This statement is used to define CONST values and VAR initial state as an AMM value.
The argument to this statement is the text form of the ARI for the initial value.
          </t>
          <t>
The initializer is used as part of the Agent Initialization procedure, (see <xref section="6.1" target="I-D.ietf-dtn-amm"/>) and when new VAR objects are defined in an ODM.
          </t>
        </section>
      </section>
    </section>
    <section anchor="sec-auth-consid" title="ADM Author Considerations">
      <t>
All of the logical design considerations from <xref section="7" target="I-D.ietf-dtn-amm"/> apply to authors of ADM modules when considering the naming and behaviors of AMM object instances.
      </t>
      <t>
All of the lifecycle considerations for YANG modules from <xref target="RFC8407"/> apply to those statements reused for ADM modules as defined in <xref target="sec-yang-proc-reuse"/>.
Specifically the guidance from <xref section="4.17" target="RFC8407"/> regarding feature use and scoping.
      </t>
      <t>
Although this specification allows semantic type statements to be included in a <tt>grouping</tt> statement, it is <bcp14>RECOMMENDED</bcp14> that ADM authors make use of named <xref target="sec-yang-ext-typedef">TYPEDEF</xref> object where possible.
      </t>
    </section>
    <section anchor="sec-iana">
      <name>IANA Considerations</name>
      <t>
        This section provides guidance to the Internet Assigned Numbers Authority (IANA) regarding registration of schema and namespaces related to core ADMs, in accordance with BCP 26 <xref target="RFC8126"/>.
      </t>
      <section>
        <name>DTN Management Architecture</name>
        <t>
This document relies on existing ARI-defined registries defined in <xref target="IANA-DTNMA"/> by <xref section="9.3" target="I-D.ietf-dtn-ari"/>.
        </t>
        <t>
This document defines the following entries within the "DTNMA IETF Data Models" registry of the "DTN Management Architecture" registry group <xref target="IANA-DTNMA"/>.
All of the ADMs in this registry are under the "ietf" organization (enumeration 1).
        </t>
        <table anchor="tab-iana-dtnma-ietf-adms">
          <name>DTNMA IETF Data Models</name>
          <thead>
            <tr>
              <th>Enumeration</th>
              <th>Name</th>
              <th>Reference</th>
              <th>Notes</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>0</td>
              <td>amm</td>
              <td>[This document]</td>
              <td>Definition of YANG extensions for the AMM itself.</td>
            </tr>
            <tr>
              <td>1</td>
              <td>dtnma-agent</td>
              <td>[This document]</td>
              <td>DTNMA Agent introspection objects.</td>
            </tr>
            <tr>
              <td>2</td>
              <td>dtnma-agent-acl</td>
              <td>[This document]</td>
              <td>DTNMA Agent access control.</td>
            </tr>
            <!--
            <tr>
              <td>4</td>
              <td>inet-base</td>
              <td>[This document]</td>
              <td>Internet Protocol-related display-hints, data types, and endpoints.</td>
            </tr>
            <tr>
              <td>5</td>
              <td>bp-base</td>
              <td>[This document]</td>
              <td>Bundle Protocol-related display-hints, data types, and endpoints.</td>
            </tr>
             -->
            <tr>
              <td>24</td>
              <td>amm-semtype</td>
              <td>[This document]</td>
              <td>AMM-defined semantic type representation.</td>
            </tr>
            <tr>
              <td>25</td>
              <td>amm-base</td>
              <td>[This document]</td>
              <td>AMM-defined type unions and other definitions.</td>
            </tr>
            <tr>
              <td>26</td>
              <td>network-base</td>
              <td>[This document]</td>
              <td>General purpose and abstract network-related objects.</td>
            </tr>
          </tbody>
        </table>
        <t>
This document defines the following entries within the "DTNMA IANA Data Models" registry of the "DTN Management Architecture" registry group <xref target="IANA-DTNMA"/>.
All of the ADMs in this registry are under the "iana" organization (enumeration 2).
        </t>
        <table anchor="tab-iana-dtnma-iana-adms">
          <name>DTNMA IANA Data Models</name>
          <thead>
            <tr>
              <th>Enumeration</th>
              <th>Name</th>
              <th>Reference</th>
              <th>Notes</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>0</td>
              <td>display-hints</td>
              <td>[This document]</td>
              <td>Registry of well-known display hints.</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
    <section anchor="Security" title="Security Considerations">
      <t>
This document defines a syntax for encoding DTNMA ADMs within a text file, and for interpreting extensions to the YANG language to support modeling of AMM objects and ARI values.
It does not address what the contents of those ADMs are or any security considerations associated with the data models themselves.
      </t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="IANA-DTNMA" target="https://www.iana.org/assignments/TBA/">
          <front>
            <title>Delay-Tolerant Networking Management Architecture (DTNMA) Parameters</title>
            <author>
              <organization>IANA</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml">
          <front>
            <title>The YANG 1.1 Data Modeling Language</title>
            <author fullname="M. Bjorklund" initials="M." role="editor" surname="Bjorklund"/>
            <date month="August" year="2016"/>
            <abstract>
              <t>YANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols. This document describes the syntax and semantics of version 1.1 of the YANG language. YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification. There are a small number of backward incompatibilities from YANG version 1. This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7950"/>
          <seriesInfo name="DOI" value="10.17487/RFC7950"/>
        </reference>
        <reference anchor="RFC9485" target="https://www.rfc-editor.org/info/rfc9485" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9485.xml">
          <front>
            <title>I-Regexp: An Interoperable Regular Expression Format</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <author fullname="T. Bray" initials="T." surname="Bray"/>
            <date month="October" year="2023"/>
            <abstract>
              <t>This document specifies I-Regexp, a flavor of regular expression that is limited in scope with the goal of interoperation across many different regular expression libraries.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9485"/>
          <seriesInfo name="DOI" value="10.17487/RFC9485"/>
        </reference>
        <reference anchor="I-D.ietf-dtn-amm" target="https://datatracker.ietf.org/doc/html/draft-ietf-dtn-amm-06" xml:base="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-dtn-amm.xml">
          <front>
            <title>DTNMA Application Management Model (AMM) and Data Models</title>
            <author fullname="Edward J. Birrane" initials="E. J." surname="Birrane">
              <organization>The Johns Hopkins University Applied Physics Laboratory</organization>
            </author>
            <author fullname="Brian Sipos" initials="B." surname="Sipos">
              <organization>The Johns Hopkins University Applied Physics Laboratory</organization>
            </author>
            <author fullname="Justin Ethier" initials="J." surname="Ethier">
              <organization>The Johns Hopkins University Applied Physics Laboratory</organization>
            </author>
            <date day="16" month="January" year="2026"/>
            <abstract>
              <t>This document defines a model that captures the information necessary to asynchronously manage applications within the Delay-Tolerant Networking Management Architecture (DTNMA). This model provides a set of common managed object types, data types and structures, and a template for information needed within each application data model. The built-in definitions are made to be extensible by applications without needing to modify core Agent or Manager behavior.</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-dtn-amm-06"/>
        </reference>
        <reference anchor="I-D.ietf-dtn-ari" target="https://datatracker.ietf.org/doc/html/draft-ietf-dtn-ari-08" xml:base="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-dtn-ari.xml">
          <front>
            <title>DTNMA Application Resource Identifier (ARI)</title>
            <author fullname="Edward J. Birrane" initials="E. J." surname="Birrane">
              <organization>The Johns Hopkins University Applied Physics Laboratory</organization>
            </author>
            <author fullname="Emery Annis" initials="E." surname="Annis">
              <organization>The Johns Hopkins University Applied Physics Laboratory</organization>
            </author>
            <author fullname="Brian Sipos" initials="B." surname="Sipos">
              <organization>The Johns Hopkins University Applied Physics Laboratory</organization>
            </author>
            <date day="16" month="January" year="2026"/>
            <abstract>
              <t>This document defines the structure, format, and features of the naming scheme for the objects defined in the Delay-Tolerant Networking Management Architecture (DTNMA) Application Management Model (AMM), in support of challenged network management solutions described in the DTNMA document. This document defines the DTNMA Application Resource Identifier (ARI), using a text-form based on the common Uniform Resource Identifier (URI) and a binary-form based on Concise Binary Object Representation (CBOR). These meet the needs for a concise, typed, parameterized, and hierarchically organized set of managed data elements.</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-dtn-ari-08"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="IANA-YANG" target="https://www.iana.org/assignments/yang-parameters/">
          <front>
            <title>YANG Parameters</title>
            <author>
              <organization>IANA</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="X.680" target="https://www.itu.int/rec/T-REC-X.680-201508-I/en">
          <front>
            <title>Information technology -- Abstract Syntax Notation One (ASN.1): Specification of basic notation</title>
            <author>
              <organization>ITU-T</organization>
            </author>
            <date month="August" year="2015"/>
          </front>
          <refcontent>ITU-T Recommendation X.680, ISO/IEC 8824-1:2015</refcontent>
        </reference>
        <reference anchor="RFC2578" target="https://www.rfc-editor.org/info/rfc2578" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2578.xml">
          <front>
            <title>Structure of Management Information Version 2 (SMIv2)</title>
            <author fullname="K. McCloghrie" initials="K." role="editor" surname="McCloghrie"/>
            <author fullname="D. Perkins" initials="D." role="editor" surname="Perkins"/>
            <author fullname="J. Schoenwaelder" initials="J." role="editor" surname="Schoenwaelder"/>
            <date month="April" year="1999"/>
            <abstract>
              <t>It is the purpose of this document, the Structure of Management Information Version 2 (SMIv2), to define that adapted subset, and to assign a set of associated administrative values. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="58"/>
          <seriesInfo name="RFC" value="2578"/>
          <seriesInfo name="DOI" value="10.17487/RFC2578"/>
        </reference>
        <reference anchor="RFC5280" target="https://www.rfc-editor.org/info/rfc5280" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml">
          <front>
            <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
            <author fullname="D. Cooper" initials="D." surname="Cooper"/>
            <author fullname="S. Santesson" initials="S." surname="Santesson"/>
            <author fullname="S. Farrell" initials="S." surname="Farrell"/>
            <author fullname="S. Boeyen" initials="S." surname="Boeyen"/>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <author fullname="W. Polk" initials="W." surname="Polk"/>
            <date month="May" year="2008"/>
            <abstract>
              <t>This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet. An overview of this approach and model is provided as an introduction. The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms. Standard certificate extensions are described and two Internet-specific extensions are defined. A set of required certificate extensions is specified. The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions. An algorithm for X.509 certification path validation is described. An ASN.1 module and examples are provided in the appendices. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5280"/>
          <seriesInfo name="DOI" value="10.17487/RFC5280"/>
        </reference>
        <reference anchor="RFC7942" target="https://www.rfc-editor.org/info/rfc7942" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7942.xml">
          <front>
            <title>Improving Awareness of Running Code: The Implementation Status Section</title>
            <author fullname="Y. Sheffer" initials="Y." surname="Sheffer"/>
            <author fullname="A. Farrel" initials="A." surname="Farrel"/>
            <date month="July" year="2016"/>
            <abstract>
              <t>This document describes a simple process that allows authors of Internet-Drafts to record the status of known implementations by including an Implementation Status section. This will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature.</t>
              <t>This process is not mandatory. Authors of Internet-Drafts are encouraged to consider using the process for their documents, and working groups are invited to think about applying the process to all of their protocol specifications. This document obsoletes RFC 6982, advancing it to a Best Current Practice.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="205"/>
          <seriesInfo name="RFC" value="7942"/>
          <seriesInfo name="DOI" value="10.17487/RFC7942"/>
        </reference>
        <reference anchor="RFC8126" target="https://www.rfc-editor.org/info/rfc8126" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml">
          <front>
            <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
            <author fullname="M. Cotton" initials="M." surname="Cotton"/>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <author fullname="T. Narten" initials="T." surname="Narten"/>
            <date month="June" year="2017"/>
            <abstract>
              <t>Many protocols make use of points of extensibility that use constants to identify various protocol parameters. To ensure that the values in these fields do not have conflicting uses and to promote interoperability, their allocations are often coordinated by a central record keeper. For IETF protocols, that role is filled by the Internet Assigned Numbers Authority (IANA).</t>
              <t>To make assignments in a given registry prudently, guidance describing the conditions under which new values should be assigned, as well as when and how modifications to existing values can be made, is needed. This document defines a framework for the documentation of these guidelines by specification authors, in order to assure that the provided guidance for the IANA Considerations is clear and addresses the various issues that are likely in the operation of a registry.</t>
              <t>This is the third edition of this document; it obsoletes RFC 5226.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="26"/>
          <seriesInfo name="RFC" value="8126"/>
          <seriesInfo name="DOI" value="10.17487/RFC8126"/>
        </reference>
        <reference anchor="RFC8407" target="https://www.rfc-editor.org/info/rfc8407" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8407.xml">
          <front>
            <title>Guidelines for Authors and Reviewers of Documents Containing YANG Data Models</title>
            <author fullname="A. Bierman" initials="A." surname="Bierman"/>
            <date month="October" year="2018"/>
            <abstract>
              <t>This memo provides guidelines for authors and reviewers of specifications containing YANG modules. Recommendations and procedures are defined, which are intended to increase interoperability and usability of Network Configuration Protocol (NETCONF) and RESTCONF protocol implementations that utilize YANG modules. This document obsoletes RFC 6087.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8407"/>
          <seriesInfo name="DOI" value="10.17487/RFC8407"/>
        </reference>
        <reference anchor="RFC8610" target="https://www.rfc-editor.org/info/rfc8610" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8610.xml">
          <front>
            <title>Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures</title>
            <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="C. Vigano" initials="C." surname="Vigano"/>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="June" year="2019"/>
            <abstract>
              <t>This document proposes a notational convention to express Concise Binary Object Representation (CBOR) data structures (RFC 7049). Its main goal is to provide an easy and unambiguous way to express structures for protocol messages and data formats that use CBOR or JSON.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8610"/>
          <seriesInfo name="DOI" value="10.17487/RFC8610"/>
        </reference>
        <reference anchor="RFC9675" target="https://www.rfc-editor.org/info/rfc9675" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9675.xml">
          <front>
            <title>Delay-Tolerant Networking Management Architecture (DTNMA)</title>
            <author fullname="E. Birrane, III" initials="E." surname="Birrane, III"/>
            <author fullname="S. Heiner" initials="S." surname="Heiner"/>
            <author fullname="E. Annis" initials="E." surname="Annis"/>
            <date month="November" year="2024"/>
            <abstract>
              <t>The Delay-Tolerant Networking (DTN) architecture describes a type of challenged network in which communications may be significantly affected by long signal propagation delays, frequent link disruptions, or both. The unique characteristics of this environment require a unique approach to network management that supports asynchronous transport, autonomous local control, and a small footprint (in both resources and dependencies) so as to deploy on constrained devices.</t>
              <t>This document describes a DTN Management Architecture (DTNMA) suitable for managing devices in any challenged environment but, in particular, those communicating using the DTN Bundle Protocol (BP). Operating over BP requires an architecture that neither presumes synchronized transport behavior nor relies on query-response mechanisms. Implementations compliant with this DTNMA should expect to successfully operate in extremely challenging conditions, such as over unidirectional links and other places where BP is the preferred transport.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9675"/>
          <seriesInfo name="DOI" value="10.17487/RFC9675"/>
        </reference>
        <reference anchor="github-dtnma-ace" target="https://github.com/JHUAPL-DTNMA/dtnma-ace">
          <front>
            <title>The DTNMA AMM CODEC Engine (ACE)</title>
            <author>
              <organization abbrev="JHU/APL">The Johns Hopkins University Applied Physics Laboratory</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="github-dtnma-adms" target="https://github.com/JHUAPL-DTNMA/dtnma-adms">
          <front>
            <title>Application Data Models (ADMs)</title>
            <author>
              <organization abbrev="JHU/APL">The Johns Hopkins University Applied Physics Laboratory</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="github-dtnma-tools" target="https://github.com/JHUAPL-DTNMA/dtnma-tools">
          <front>
            <title>A reference implementation of the DTN Management Architecture (DTNMA) Agent and related Tools</title>
            <author>
              <organization abbrev="JHU/APL">The Johns Hopkins University Applied Physics Laboratory</organization>
            </author>
            <date/>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="sec-yang-ietf-amm">
      <name>ADM Module for AMM Extensions</name>
      <t>
The ADM module in this section implements base extensions to YANG in support of the AMM.
This includes the following:
      </t>
      <ul>
        <li>Extensions to support ADM Metadata (see <xref section="4.1.1" target="I-D.ietf-dtn-amm"/>) within a YANG module.</li>
        <li>Extensions to support AMM Object Types (see <xref section="3.4" target="I-D.ietf-dtn-amm"/>) within a YANG module.</li>
        <li>Extensions to support Semantic Value Types (see <xref section="3.3" target="I-D.ietf-dtn-amm"/>) within a YANG module.</li>
      </ul>
      <sourcecode markers="true" name="ietf-amm.yang" type="yang" originalSrc="modules/ietf-amm.yang">module ietf-amm {
  yang-version 1.1;
  namespace "ari://ietf/amm/";
  prefix amm;

  organization
    "Internet Engineering Task Force (IETF)" {
    amm:enum 1;
  }
  contact
    "WG Web: &lt;http://tools.ietf.org/wg/dtn/&gt;
     WG List: &lt;mailto:dtn@ietf.org&gt;

     Editor: Brian Sipos
             &lt;mailto:brian.sipos+ietf@gmail.com&gt;";
  description
    "This module defines the DTN Management Architecture (DTNMA)
     Application Management Model (AMM) extensions within YANG.
     It also defines the base IDENT and TYPEDEF objects for the AMM.

     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.

     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
     (https://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.";
  reference
    "draft-ietf-dtn-adm-yang";

  revision 2025-07-03 {
    description
      "Updated for latest ADM document.";
    reference
      "draft-ietf-dtn-adm-yang";
  }

  /*
   * This section contains extensions for common behavior of AMM
   * objects.
   */

  extension enum {
    argument value;
    description
      "An enumeration identifies an object within a namespace.
       The argument to this statement is the integer value.";
  }

  extension parameter {
    argument name;
    description
      "The schema for a formal parameter of an object.
       Order of parameters is significant within this statement.";
  }

  extension default {
    argument value;
    description
      "The literal value default for a parameter or result.
       The argument is the text form of the ARI";
  }

  extension init-value {
    argument value;
    description
      "The literal value of a CONST object,
       initial state for a VAR object.
       The argument is the text form of the ARI";
  }

  extension init-expr {
    argument expr;
    description
      "An expression evaluated to initialize a VAR object.
       The argument is the text form of the EXPR AC";
  }

  /*
   * This section contains extensions for AMM object definitions.
   */

  extension typedef {
    argument name;
    description
      "Definition of a TYPEDEF within an ADM.
       The argument to this statement is the object name.
       One of the type use substatements must be present.";
  }

  extension ident {
    argument name;
    description
      "Definition of an IDENT within an ADM.
       The argument to this statement is the object name.
       An 'base' substatement must be present.";
  }

  extension abstract {
    argument is-abstract;
    description
      "The boolean abstract marking of an IDENT object.";
  }

  extension base {
    argument name;
    description
      "The argument is the base of an IDENT object.";
  }

  extension const {
    argument name;
    description
      "Definition of a CONST within an ADM.
       The argument to this statement is the object name.
       An 'init-value' substatement must be present.";
  }

  extension ctrl {
    argument name;
    description
      "Definition of a CTRL within an ADM.
       The argument to this statement is the object name.";
  }

  extension result {
    argument name;
    description
      "A result value reported as a response to a control.
       The substatement is the result type.
       Each CTRL can have a single optional result.";
  }

  extension edd {
    argument name;
    description
      "Definition of an EDD within an ADM.
       The argument to this statement is the object name.";
  }

  extension oper {
    argument name;
    description
      "Definition of an OPER within an ADM.
       The argument to this statement is the object name.";
  }

  extension operand {
    argument name;
    description
      "An individual operand taken from the expression stack
       during evaluation of the OPER.
       Each substatement is an operand as a leaf (ARI).
       The order of operands is significant within an object
       definition.";
  }

  extension var {
    argument name;
    description
      "Definition of a VAR within an ADM.
       The argument to this statement is the object name.";
  }

  extension sbr {
    argument name;
    description
      "Definition of a SBR within an ADM.
       The argument to this statement is the object name.";
  }

  extension action {
    argument exec-tgt;
    description
      "Definition of the action executed by a rule object.
       The argument to this statement is the exec-tgt to execute.";
  }

  extension condition {
    argument expr;
    description
      "Condition evaluated by an SBR object to determine whether to
       execute its action.
       The argument to this statement is the expr to evaluate.";
  }

  extension min-interval {
    argument relative-time;
    description
      "The argument to this statement is a time-based ARI specifying
       the minimum amount of time between condition evaluations
       for an SBR object.";
  }

  extension max-count {
    argument count;
    description
      "The argument to this statement is the integer maximum
       execution count for a rule object.";
  }

  extension init-enabled {
    argument state;
    description
      "The argument to this statement is the boolean initial enabled
       state for a rule object.";
  }

  extension tbr {
    argument name;
    description
      "Definition of a TBR within an ADM.
       The argument to this statement is the object name.";
  }

  extension start {
    argument time;
    description
      "The argument to this statement is the start time ARI for a
       TBR object.";
  }

  extension period {
    argument relative-time;
    description
      "The argument to this statement is an ARI defining the period
       for a TBR object.";
  }

  /*
   * This section contains extensions for defining semantic type
   * instances.
   */

  extension type {
    argument name;
    description
      "A reference to a built-in type or prefix-qualified typedef.";
  }

  extension display-hint {
    argument ident;
    description
      "Reference an IDENT object which indicates how a value should
       be displayed for human consumption.
       The base of the IDENT SHALL be the
       &lt;ari://ietf/amm-base/ident/display-hint&gt; object.";
  }

  extension int-labels {
    description
      "Type narrowing for an integer to label enum values or bit
       positions.";
  }

  extension cddl {
    argument text;
    description
      "Type narrowing for a CBOR item in the form of CDDL syntax.
       The argument to this statement is the actual CDDL text.";
  }

  extension ulist {
    description
      "Type for an AC containing a list of uniform-typed values.";
  }

  extension dlist {
    description
      "Type for an AC containing a list of diverse-typed sequences.";
  }

  extension seq {
    description
      "A sequence of uniform-typed values within a 'dlist'.";
  }

  extension umap {
    description
      "Type for an AM containing a set of uniform-typed key-value
       pairs.";
  }

  extension keys {
    description
      "The type restriction for 'umap' keys.";
  }

  extension values {
    description
      "The type restriction for 'umap' values.";
  }

  extension tblt {
    description
      "Type for a table of values with a column schema.";
  }

  extension column {
    argument name;
    description
      "An individual column within a 'tblt' definition.";
  }

  extension key {
    argument columns;
    description
      "Names of columns composing the row key, separated by spaces,
       within a 'tblt' definition.";
  }

  extension unique {
    argument columns;
    description
      "Names of columns composing a uniqueness constraint, separated
       by spaces, within a 'tblt' definition.";
  }

  extension union {
    description
      "Semantic type for a union of other types in substatements.";
  }

  amm:enum 0;
}
</sourcecode>
    </section>
    <section anchor="sec-yang-ietf-amm-semtype">
      <name>ADM Module for Semantic Type Introspection</name>
      <t>
The ADM module in this section implements the entities described in <xref section="4.2.2" target="I-D.ietf-dtn-amm"/>.
This includes an IDENT object hierarchy which allows introspection of semantic types in ARI syntax.
      </t>
      <sourcecode markers="true" name="ietf-amm-semtype.yang" type="yang" originalSrc="modules/ietf-amm-semtype.yang">module ietf-amm-semtype {
  yang-version 1.1;
  namespace "ari://ietf/amm-semtype/";
  prefix amm-semtype;

  import ietf-amm {
    prefix amm;
  }

  organization
    "Internet Engineering Task Force (IETF)" {
    amm:enum 1;
  }
  contact
    "WG Web: &lt;http://tools.ietf.org/wg/dtn/&gt;
     WG List: &lt;mailto:dtn@ietf.org&gt;

     Editor: Brian Sipos
             &lt;mailto:brian.sipos+ietf@gmail.com&gt;";
  description
    "This module defines base and derived IDENT objects which
     allow introspection of AMM semantic types.

     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.

     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
     (https://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.";
  reference
    "draft-ietf-dtn-adm-yang";

  revision 2026-05-01 {
    description
      "Updated for latest ADM document.";
    reference
      "draft-ietf-dtn-adm-yang";
  }
  amm:enum 24;

  // Base IDENT objects
  amm:ident semtype {
    amm:enum 1;
    description
      "The base IDENT for semantic type introspection.
       This object itself provides no type information.";
    amm:abstract true;
  }

  // Semantic-type leaf IDENT objects
  amm:ident type-use {
    amm:enum 2;
    description
      "A named type use with possible annotations and/or
       constraints.";
    amm:base "./IDENT/semtype";
    amm:parameter name {
      description
        "A built-in ARITYPE or reference to TYPEDEF object being
         used.";
      amm:type "//ietf/amm-base/TYPEDEF/type-ref";
    }
    // FIXME include constraints and annotations also?
  }
  amm:ident ulist {
    amm:enum 3;
    description
      "A uniformly-typed list within an AC.";
    amm:base "./IDENT/semtype";
    amm:parameter item-type {
      description
        "The semantic type for all items.";
      amm:type "./TYPEDEF/semtype";
    }
    amm:parameter min-elements {
      description
        "The smallest valid item count for the AC.";
      amm:default "null";
      amm:union {
        amm:type "/ARITYPE/uvast";
        amm:type "/ARITYPE/null";
      }
    }
    amm:parameter max-elements {
      description
        "The largest valid item count for the AC.";
      amm:default "null";
      amm:union {
        amm:type "/ARITYPE/uvast";
        amm:type "/ARITYPE/null";
      }
    }
  }
  amm:ident dlist {
    amm:enum 4;
    description
      "A diverse-typed list within an AC.";
    amm:base "./IDENT/semtype";
    amm:parameter item-types {
      description
        "The list of semantic type for each item in sequence within
         the list.
         The list itself is encoded as an AC in this parameter.";
      amm:ulist {
        amm:type "./TYPEDEF/semtype";
      }
    }
  }
  amm:ident umap {
    amm:enum 5;
    description
      "A uniformly-typed map within an AM.";
    amm:base "./IDENT/semtype";
    amm:parameter key-type {
      description
        "The semantic type for each key.";
      amm:type "./TYPEDEF/semtype";
    }
    amm:parameter value-type {
      description
        "The semantic type for each value.";
      amm:type "./TYPEDEF/semtype";
    }
  }
  amm:ident tblt {
    amm:enum 6;
    description
      "A parameterized table template for data within a TBL.";
    amm:base "./IDENT/semtype";
    amm:parameter columns {
      description
        "The list of column definitions as rows in a table.
         The order of these definitions is significant and correspond
         exactly with the order of columns in the TBL values.";
      amm:tblt {
        amm:key "name";
        amm:column name {
          description
            "The name of this column.
             Each name SHALL be unique within a table template.
             Each name SHALL be restricted to valid label text.";
          amm:type "//ietf/amm-base/typedef/id-text";
        }
        amm:column datatype {
          description
            "The semantic type for values in this column.";
          amm:type "./TYPEDEF/semtype";
        }
      }
    }
    amm:parameter min-elements {
      description
        "The smallest valid row count for the TBL.";
      amm:default "null";
      amm:union {
        amm:type "/ARITYPE/uvast";
        amm:type "/ARITYPE/null";
      }
    }
    amm:parameter max-elements {
      description
        "The largest valid row count for the TBL.";
      amm:default "null";
      amm:union {
        amm:type "/ARITYPE/uvast";
        amm:type "/ARITYPE/null";
      }
    }
    amm:parameter key {
      description
        "The primary key column names tuples in this table,
         space-separated labels.";
      amm:default "null";
      amm:union {
        amm:type "/ARITYPE/textstr";
        amm:type "/ARITYPE/null";
      }
    }
    amm:parameter unique {
      description
        "The set of unique column name tuples in this table, as
         space-separated labels.
         The set itself is encoded as an AC in this parameter.";
      amm:default "/AC/()";
      amm:ulist {
        amm:type "/ARITYPE/textstr";
      }
    }
  }
  amm:ident union {
    amm:enum 8;
    description
      "A list of alternative type choices.";
    amm:base "./IDENT/semtype";
    amm:parameter choices {
      description
        "The semantic type for each choice.
         The list itself is encoded as an AC in this parameter.";
      amm:ulist {
        amm:type "./TYPEDEF/semtype";
      }
    }
  }
  amm:ident seq {
    amm:enum 9;
    description
      "A sequence of similarly-typed items as a sub-sequence of an
       AC value.
       This is only usable in specific contexts, such as within a
       ./IDENT/dlist parameter.";
    amm:base "./IDENT/semtype";
    amm:parameter item-type {
      description
        "The semantic type for all items in the sequence.";
      amm:type "./TYPEDEF/semtype";
    }
    amm:parameter min-elements {
      description
        "The smallest valid item count for the sequence.";
      amm:default "null";
      amm:union {
        amm:type "/ARITYPE/uvast";
        amm:type "/ARITYPE/null";
      }
    }
    amm:parameter max-elements {
      description
        "The largest valid item count for the sequence.";
      amm:default "null";
      amm:union {
        amm:type "/ARITYPE/uvast";
        amm:type "/ARITYPE/null";
      }
    }
  }

  // Named types
  amm:typedef semtype {
    amm:enum 25;
    description
      "A parameterized reference to a semantic type object.
       This is used for introspection of AMM objects.";
    amm:type "/ARITYPE/ident" {
      amm:base "./IDENT/semtype";
    }
  }
}
</sourcecode>
    </section>
    <section anchor="sec-yang-ietf-amm-base">
      <name>ADM Module for AMM Semantic Types and Unions</name>
      <t>
The ADM module in this section implements base semantic types defined by the AMM.
This includes the following:
      </t>
      <ul>
        <li>Simple types described in <xref section="4.2.3" target="I-D.ietf-dtn-amm"/>.</li>
        <li>Container types described in <xref section="4.2.4" target="I-D.ietf-dtn-amm"/>.</li>
        <li>Union types described in <xref section="4.2.5" target="I-D.ietf-dtn-amm"/>.</li>
      </ul>
      <sourcecode markers="true" name="ietf-amm-base.yang" type="yang" originalSrc="modules/ietf-amm-base.yang">module ietf-amm-base {
  yang-version 1.1;
  namespace "ari://ietf/amm-base/";
  prefix amm-type;

  import ietf-amm {
    prefix amm;
  }

  organization
    "Internet Engineering Task Force (IETF)" {
    amm:enum 1;
  }
  contact
    "WG Web: &lt;http://tools.ietf.org/wg/dtn/&gt;
     WG List: &lt;mailto:dtn@ietf.org&gt;

     Editor: Brian Sipos
             &lt;mailto:brian.sipos+ietf@gmail.com&gt;";
  description
    "This module defines base IDENT objects and base TYPEDEF
     objects for the AMM.

     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.

     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
     (https://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.";
  reference
    "draft-ietf-dtn-adm-yang";

  revision 2026-05-01 {
    description
      "Updated for latest ADM document.";
    reference
      "draft-ietf-dtn-adm-yang";
  }
  amm:enum 25;

  // abstract display hint hierarchy
  amm:ident display-hint {
    amm:enum 0;
    description
      "The base IDENT for objects usable as arguments for the
       'amm:display-hint' extension.
       This object itself provides no display hint purpose.";
    amm:abstract true;
  }
  amm:ident display-hint-integer {
    amm:enum 1;
    description
      "Intermediate base IDENT of display hints for integer values.
       Hints derived from this object SHALL only apply to built-in
       types BYTE, INT, UINT, VAST, and UVAST.";
    amm:abstract true;
    amm:base "./IDENT/display-hint";
  }
  amm:ident display-hint-float {
    amm:enum 2;
    description
      "Intermediate base IDENT of display hints for floating point
       values.
       Hints derived from this object SHALL only apply to built-in
       types REAL32 and REAL64.";
    amm:abstract true;
    amm:base "./IDENT/display-hint";
  }
  amm:ident display-hint-bstr {
    amm:enum 3;
    description
      "Intermediate base IDENT of display hints for byte string
       values.
       Hints derived from this object SHALL only apply to built-in
       type BYTESTR.";
    amm:abstract true;
    amm:base "./IDENT/display-hint";
  }
  amm:ident display-hint-time {
    amm:enum 4;
    description
      "Intermediate base IDENT of display hints for time values.
       Hints derived from this object SHALL only apply to built-in
       types TP and TD.";
    amm:abstract true;
    amm:base "./IDENT/display-hint";
  }

  // Named type unions
  amm:typedef type-ref {
    amm:enum 0;
    description
      "Reference to either a built-in type or a TYPEDEF object.";
    amm:union {
      amm:type "/ARITYPE/aritype";
      amm:type "/ARITYPE/typedef";
    }
  }
  amm:typedef integer {
    amm:enum 1;
    description
      "Any type which represents a discrete integer.
       This union order prefers smaller range and signed types.";
    amm:union {
      amm:type "/ARITYPE/byte";
      amm:type "/ARITYPE/int";
      amm:type "/ARITYPE/uint";
      amm:type "/ARITYPE/vast";
      amm:type "/ARITYPE/uvast";
    }
  }
  amm:typedef float {
    amm:enum 2;
    description
      "Any type which represents a floating point number.
       This union order prefers smaller range.";
    amm:union {
      amm:type "/ARITYPE/real32";
      amm:type "/ARITYPE/real64";
    }
  }
  amm:typedef numeric {
    amm:enum 3;
    description
      "Any type which can be used with numeric expressions.";
    amm:union {
      amm:type "./TYPEDEF/integer";
      amm:type "./TYPEDEF/float";
    }
  }
  amm:typedef numeric-or-time {
    amm:enum 27;
    description
      "Any type which can be used with numeric or time-as-numeric
       expressions.";
    amm:union {
      amm:type "./TYPEDEF/numeric";
      amm:type "./TYPEDEF/time";
    }
  }
  amm:typedef primitive {
    amm:enum 4;
    description
      "Any primitive type.
       This union order prefers conversion to wide types.";
    amm:union {
      amm:type "./TYPEDEF/numeric";
      amm:type "/ARITYPE/textstr";
      amm:type "/ARITYPE/bytestr";
      amm:type "/ARITYPE/bool";
      // null is last option for conversion
      amm:type "/ARITYPE/null";
    }
  }
  amm:typedef time {
    amm:enum 5;
    description
      "Any type which can be used with time expressions.";
    amm:union {
      amm:type "/ARITYPE/TP";
      amm:type "/ARITYPE/TD";
    }
  }
  amm:typedef simple {
    amm:enum 6;
    description
      "Any type which contains a single literal value (not nested).";
    amm:union {
      amm:type "./TYPEDEF/TIME";
      amm:type "./TYPEDEF/PRIMITIVE";
    }
  }
  amm:typedef nested {
    amm:enum 7;
    description
      "A literal type which contains other ARI values.";
    amm:union {
      amm:type "/ARITYPE/AC";
      amm:type "/ARITYPE/AM";
      amm:type "/ARITYPE/TBL";
    }
  }
  amm:typedef any {
    amm:enum 8;
    description
      "Any value representable by an ARI.";
    // These type names are built-in
    amm:union {
      amm:type "/ARITYPE/literal";
      amm:type "/ARITYPE/object";
      amm:type "/ARITYPE/namespace";
    }
  }
  amm:typedef value-obj {
    amm:enum 9;
    description
      "A reference to an object which can produce a value.";
    amm:union {
      amm:type "/ARITYPE/const";
      amm:type "/ARITYPE/edd";
      amm:type "/ARITYPE/var";
    }
  }
  amm:typedef nonce {
    amm:enum 10;
    description
      "This type union is used to correlate Agent-Manager messages.
       The union is defined in Section 4.2.5 of draft-ietf-dtn-amm.";
    reference
      "draft-ietf-dtn-amm";
    amm:union {
      amm:type "/ARITYPE/bytestr";
      amm:type "/ARITYPE/uvast";
      amm:type "/ARITYPE/null";
    }
  }
  amm:typedef id-text {
    amm:enum 25;
    description
      "This type is used to define and match object text names.
       The type is defined in Section 4.2.5 of draft-ietf-dtn-amm.";
    reference
      "draft-ietf-dtn-amm";
    amm:type "/ARITYPE/textstr" {
      pattern '!?[A-Za-z_][0-9A-Za-z_\-\.]*';
    }
  }
  amm:typedef id-int {
    amm:enum 26;
    description
      "This type is used to define and match object integer
       enumerations.
       The type is defined in Section 4.2.5 of draft-ietf-dtn-amm.";
    reference
      "draft-ietf-dtn-amm";
    amm:type "/ARITYPE/int";
  }

  // operational semantic types
  amm:typedef counter32 {
    amm:enum 11;
    description
      "A 32-bit counter with an arbitrary initial value which can
       only increment and never decrement.
       When the value reaches the upper limit of the type it wraps
       around to zero.
       At least two samples of this value need to be compared over
       time to be meaningful.
       This type is consistent with the SMIv2 and YANG data types
       of the same name.";
    reference
      "RFC 2578: Structure of Management Information Version 2
       RFC 6021: Common YANG Data Types";
    amm:type "/ARITYPE/uint";
  }
  amm:typedef counter64 {
    amm:enum 12;
    description
      "A 64-bit counter with an arbitrary initial value which can
       only increment and never decrement.
       When the value reaches the upper limit of the type it wraps
       around to zero.
       At least two samples of this value need to be compared over
       time to be meaningful.
       This type is consistent with the SMIv2 and YANG data types
       of the same name.";
    reference
      "RFC 2578: Structure of Management Information Version 2
       RFC 6021: Common YANG Data Types";
    amm:type "/ARITYPE/uvast";
  }
  amm:typedef gauge32 {
    amm:enum 13;
    description
      "A 32-bit value sampling some quantized measurement.
       The value can increase or decrease arbitrarily over time.
       This type is consistent with the SMIv2 and YANG data types
       of the same name.";
    reference
      "RFC 2578: Structure of Management Information Version 2
       RFC 6021: Common YANG Data Types";
    amm:type "/ARITYPE/int";
  }
  amm:typedef gauge64 {
    amm:enum 14;
    description
      "A 64-bit value sampling some quantized measurement.
       The value can increase or decrease arbitrarily over time.
       This type is consistent with the SMIv2 and YANG data types
       of the same name.";
    reference
      "RFC 2578: Structure of Management Information Version 2
       RFC 6021: Common YANG Data Types";
    amm:type "/ARITYPE/vast";
  }
  amm:typedef timestamp {
    amm:enum 15;
    description
      "A time point representing the system clock at which a specific
       occurrence happened.
       The specific occurrence must be defined in the description
       of any node defined using this type.
       This type is consistent with the SMIv2 and YANG data types
       of the same name.";
    reference
      "RFC 2579: Textual Conventions for SMIv2
       RFC 6021: Common YANG Data Types";
    amm:type "/ARITYPE/tp";
  }

  // Restrictions on AC item types for Evaluation and EXPR
  amm:typedef eval-tgt {
    amm:enum 16;
    description
      "A value which can be the target of an evaluation.
       An inline &lt;./typedef/expr&gt; value is evaluated directly.
       A reference to a value-producing object is dereferenced and
       SHALL produce a value that matches &lt;./typedef/expr&gt;, which
       is then evaluated.";
    amm:union {
      // object which produces an expression
      amm:type "./TYPEDEF/value-obj";
      // inline expression
      amm:type "./TYPEDEF/expr";
    }
  }
  amm:typedef expr-item {
    amm:enum 17;
    description
      "Each item of an EXPR list.";
    amm:union {
      // plain value for the stack
      amm:type "/ARITYPE/literal";
      // object which produces a value for the stack
      amm:type "./TYPEDEF/value-obj";
      // operator to evaluate
      amm:type "/ARITYPE/oper";
    }
  }
  amm:typedef expr {
    amm:enum 18;
    description
      "The contents of an EXPR container.";
    amm:ulist {
      amm:type "./TYPEDEF/expr-item";
    }
  }

  // Restrictions on AC item types for Execution and MAC
  amm:typedef exec-tgt {
    amm:enum 19;
    description
      "A value which can be the target of an execution.
       An inline &lt;./typedef/mac&gt; value is expanded and executed.
       A reference to a value-producing object is dereferenced and
       SHALL produce a value that matches &lt;./typedef/exec-tgt&gt;,
       which is then executed.
       A reference to a CTRL is executed directly.";
    amm:union {
      amm:type "./TYPEDEF/exec-item";
      // inline MAC
      amm:type "./TYPEDEF/mac";
    }
  }
  amm:typedef exec-item {
    amm:enum 20;
    description
      "A reference to an object which can be executed.
       The value-object must be typed to contain a
       &lt;./typedef/exec-tgt&gt;.";
    amm:union {
      amm:type "/ARITYPE/ctrl";
      // object which produces an exec-tgt
      amm:type "./TYPEDEF/value-obj";
    }
  }
  amm:typedef mac {
    amm:enum 21;
    description
      "The contents of a MAC container are an ordered list of
       executable values.";
    amm:ulist {
      amm:type "./TYPEDEF/exec-item";
    }
  }

  // Restrictions on AC item types for Reporting and RPTT
  amm:typedef rpt-tgt {
    amm:enum 22;
    description
      "A value which can be the target of reporting.";
    amm:union {
      // object which produces an RPTT
      amm:type "./TYPEDEF/value-obj";
      // inline RPTT
      amm:type "./TYPEDEF/rptt";
    }
  }
  amm:typedef rptt-item {
    amm:enum 23;
    description
      "Each item of a RPTT.
       Each item references a value-producing object or contains an
       expression to be evaluated.";
    amm:union {
      // produces the report item
      amm:type "./TYPEDEF/value-obj";
      // evaluates to the report item
      amm:type "./TYPEDEF/expr";
    }
  }
  amm:typedef rptt {
    amm:enum 24;
    description
      "The contents of a report template, encoded as the sequence
       of template items.";
    amm:ulist {
      amm:type "./TYPEDEF/rptt-item";
    }
  }
}
</sourcecode>
    </section>
    <section anchor="sec-yang-ietf-network-base">
      <name>ADM Module for Base Networking Objects</name>
      <t>
The ADM module in this section implements IDENT objects and semantic types associated with abstract networking identifiers and endpoints.
Specific networking technologies and protocols can derive from the abstract bases to implement concrete protocol-specific logic.
      </t>
      <sourcecode markers="true" name="ietf-network-base.yang" type="yang" originalSrc="modules/ietf-network-base.yang">module ietf-network-base {
  yang-version 1.1;
  namespace "ari://ietf/network-base/";
  prefix network-base;

  import ietf-amm {
    prefix amm;
  }
  import ietf-amm-base {
    prefix amm-base;
  }

  organization
    "Internet Engineering Task Force (IETF)" {
    amm:enum 1;
  }
  contact
    "WG Web: &lt;http://tools.ietf.org/wg/dtn/&gt;
     WG List: &lt;mailto:dtn@ietf.org&gt;

     Editor: Brian Sipos
             &lt;mailto:brian.sipos+ietf@gmail.com&gt;";
  description
    "This module defines base IDENT objects for network-related
     entities such as protocol endpoints. The base objects are
     general purpose, and all derived objects are layer- and/or
     protocol-specific with appropriate parameters.

     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.

     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
     (https://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.";
  reference
    "draft-ietf-dtn-adm-yang";

  revision 2026-04-02 {
    description
      "Updated for latest ADM document.";
    reference
      "draft-ietf-dtn-adm-yang";
  }
  amm:enum 26;

  // General purpose network data types and forms
  amm:typedef uri {
    amm:enum 0;
    description
      "A specialization of the textstr type to only contain a single
       Uniform Resource Identifier (URI) as defined by STD 66.

       Objects using the uri type MUST be in US-ASCII encoding,
       and MUST be normalized as described by RFC 3986 Sections
       6.2.1, 6.2.2.1, and 6.2.2.2.  All unnecessary
       percent-encoding is removed, and all case-insensitive
       characters are set to lowercase except for hexadecimal
       digits, which are normalized to uppercase as described in
       Section 6.2.2.1.

       The purpose of this normalization is to help provide
       unique URIs.  Note that this normalization is not
       sufficient to provide uniqueness.  Two URIs that are
       textually distinct after this normalization may still be
       equivalent.

       Objects using the uri type may restrict the schemes that
       they permit.  For example, 'data:' and 'urn:' schemes
       might not be appropriate.

       A zero-length URI is not a valid URI.  This can be used to
       express 'URI absent' where required.

       In the value set and its semantics, this type is equivalent
       to the Uri SMIv2 textual convention defined in RFC 5017.";
    reference
      "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
       RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
                 Group: Uniform Resource Identifiers (URIs), URLs,
                 and Uniform Resource Names (URNs): Clarifications
                 and Recommendations
       RFC 5017: MIB Textual Conventions for Uniform Resource
                 Identifiers (URIs)";
    amm:type "/aritype/textstr" {
      // This pattern is on the normalized scheme
      pattern '[a-z][a-z0-9+-.]*:.*';
    }
  }
  amm:ident display-bstr-uuid {
    amm:enum 17;
    description
      "Interpret byte string values as UUID and display as
       human-friendly text according to RFC 9562 conventions.";
    reference
      "RFC 9562: Universally Unique IDentifiers (UUIDs)";
    amm:base "//ietf/amm-base/IDENT/display-hint-bstr";
  }
  amm:typedef uuid {
    amm:enum 5;
    description
      "A specialization of the bytestr type to contain a binary
       encoded UUID value.
       Values of this type SHALL contain a valid UUID value
       as defined in Section 4 of RFC 9562.";
    reference
      "RFC 9562: Universally Unique IDentifiers (UUIDs)";
    amm:type "/aritype/bytestr" {
      length "16";
    }
  }
  amm:ident display-bstr-oid {
    amm:enum 18;
    description
      "Interpret byte string values as ASN.1 BER-encoded OIDs
       and display as human-friendly dotted-decimal form of
       ITU-T X.660.";
    reference
      "ITU-T X.660-2011: General procedures and top arcs of the
         international object identifier tree";
    amm:base "//ietf/amm-base/IDENT/display-hint-bstr";
  }
  amm:typedef oid {
    amm:enum 4;
    description
      "A specialization of the bytestr type to contain an ASN.1
       BER-encoded object identifier (OID) value.
       This typedef gives no more specific AMM constraints on
       the byte string value but does constrain it by these
       requirements.
       Values of this type SHALL contain valid BER-encoded OID
       contents consistent with the definition of CBOR tag 111
       but without the actual tag, as defined in Section 2.1 of
       RFC 9090.
       Values of this type always contain an absolute OID.";
    reference
      "RFC 9090: Concise Binary Object Representation (CBOR) Tags
         for Object Identifiers
       ITU-T X.660-2011: General procedures and top arcs of the
         international object identifier tree
       ITU-T X.690-2021: ASN.1 encoding rules: Specification of
         Basic Encoding Rules (BER), Canonical Encoding
         Rules (CER) and Distinguished Encoding Rules (DER)";
    amm:type "/aritype/bytestr" {
      length "2..max";
    }
  }

  // Abstract base IDENTs and types
  amm:ident abstract-endpoint {
    amm:enum 0;
    description
      "This object defines an abstract base for all general purpose
       network/transport endpoint identifiers as seen from outside
       the endpoint node.
       Uses where the endpoint is being bound to from inside the
       node might require additional parameters outside of what is
       present in this object hierarchy.";
    amm:abstract true;
  }
  amm:typedef endpoint {
    amm:enum 1;
    description
      "A value which references a non-abstract derived object
       for specific types of network or transport endpoints.";
    amm:type "/aritype/ident" {
      amm:base "./IDENT/abstract-endpoint";
    }
  }
  amm:typedef endpoint-or-uri {
    amm:enum 3;
    description
      "A value which is either a specific parameterized endpoint
       IDENT reference or a text URI value identifying an endpoint.";
    amm:union {
      amm:type "./typedef/endpoint";
      amm:type "./typedef/uri";
    }
  }
}
</sourcecode>
    </section>
    <section anchor="sec-yang-displayhints">
      <name>IANA Assignments for display-hint</name>
      <t>
The ADM module in this section defines display-hint-derived IDENT objects described in <xref section="3.3.1" target="I-D.ietf-dtn-amm"/> for specific representations.
      </t>
      <sourcecode markers="true" name="iana-display-hints.yang" type="yang" originalSrc="modules/iana-display-hints.yang">module iana-display-hints {
  yang-version 1.1;
  namespace "ari://iana/display-hints/";
  prefix ianadh;

  import ietf-amm {
    prefix amm;
  }
  import ietf-amm-base {
    prefix amm-base;
  }

  organization
    "Internet Assigned Numbers Authority (IANA)" {
    amm:enum 2;
  }
  contact
    "Internet Assigned Numbers Authority

     Postal: ICANN
             12025 Waterfront Drive, Suite 300
             Los Angeles, CA 90094-2536
             United States of America
     Tel:    +1 310 301 5800
     &lt;mailto:iana@iana.org&gt;";
  description
    "This module defines leaf IDENT objects usable as 'display-hint'
     semantic type annotations derived from the base
     &lt;ari://ietf/amm-base/ident/display-hint&gt; object.

     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.

     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
     (https://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.";
  reference
    "https://www.iana.org/assignments/DTNMA-TBA";

  revision 2025-07-03 {
    description
      "Updated for latest ADM document.";
    reference
      "draft-ietf-dtn-adm-yang";
  }
  amm:enum 0;

  // Integer number hints
  amm:ident display-int-dec {
    amm:enum 2;
    description
      "Display integers as decimal (base 10).";
    amm:base "//ietf/amm-base/ident/display-hint-integer";
  }
  amm:ident display-int-bin {
    amm:enum 3;
    description
      "Display integers as binary (base 2).";
    amm:base "//ietf/amm-base/ident/display-hint-integer";
  }
  amm:ident display-int-hex {
    amm:enum 4;
    description
      "Display integers as hexadecimal (base 16).";
    amm:base "//ietf/amm-base/ident/display-hint-integer";
  }

  // Floating-point number hints
  amm:ident display-float-dec {
    amm:enum 6;
    description
      "Display floating point values as decimal fraction.";
    amm:base "//ietf/amm-base/ident/display-hint-float";
  }
  amm:ident display-float-exp {
    amm:enum 7;
    description
      "Display floating point values as decimal exponential form.";
    amm:base "//ietf/amm-base/ident/display-hint-float";
  }
  amm:ident display-float-hex {
    amm:enum 8;
    description
      "Display floating point values as hexadecimal exponential
       form.";
    amm:base "//ietf/amm-base/ident/display-hint-float";
  }

  // Byte-string hints
  amm:ident display-bstr-text {
    amm:enum 10;
    description
      "Display byte string values as UTF-8 text where possible.
       The base16 encoding is used otherwise.";
    reference
      "draft-ietf-dtn-ari";
    amm:base "//ietf/amm-base/ident/display-hint-bstr";
  }
  amm:ident display-bstr-base16 {
    amm:enum 11;
    description
      "Display byte string values as base16-encoded.";
    reference
      "draft-ietf-dtn-ari";
    amm:base "//ietf/amm-base/ident/display-hint-bstr";
  }
  amm:ident display-bstr-base64 {
    amm:enum 12;
    description
      "Display byte string values as base64url-encoded.";
    reference
      "draft-ietf-dtn-ari";
    amm:base "//ietf/amm-base/ident/display-hint-bstr";
  }

  // TIME type (TP or TD built-ins) hints
  amm:ident display-time-text {
    amm:enum 14;
    description
      "Display TP and TD values as text in accordance with
       RFC 3339 not using separator characters.";
    reference
      "draft-ietf-dtn-ari";
    amm:base "//ietf/amm-base/ident/display-hint-time";
  }
  amm:ident display-time-dec {
    amm:enum 15;
    description
      "Display TP and TD values as decimal fraction with units of
       seconds, which may or may not include a fractional part.";
    reference
      "draft-ietf-dtn-ari";
    amm:base "//ietf/amm-base/ident/display-hint-time";
  }
}
</sourcecode>
    </section>
    <section anchor="sec-yang-agentadm">
      <name>ADM Module for DTNMA Agents</name>
      <t>
The ADM module in this section implements the entities described in <xref section="4.3" target="I-D.ietf-dtn-amm"/>.
This includes the following:
      </t>
      <ul>
        <li>Introspective access to the ADMs supported by the Agent.</li>
        <li>Introspective access to the VARs in ODMs.</li>
        <li>A feature and introspective access to rules in ODMs.</li>
        <li>A report template used to announce presence of an Agent.</li>
        <li>Base helper controls and arithmetic operators</li>
      </ul>
      <sourcecode markers="true" name="ietf-dtnma-agent.yang" type="yang" originalSrc="modules/ietf-dtnma-agent.yang">module ietf-dtnma-agent {
  yang-version 1.1;
  namespace "ari://ietf/dtnma-agent/";
  prefix da;

  import ietf-amm {
    prefix amm;
  }
  import ietf-amm-semtype {
    prefix amm-semtype;
  }
  import ietf-amm-base {
    prefix amm-base;
  }
  import ietf-network-base {
    prefix network-base;
  }

  organization
    "Internet Engineering Task Force (IETF)" {
    amm:enum 1;
  }
  contact
    "WG Web: &lt;http://tools.ietf.org/wg/dtn/&gt;
     WG List: &lt;mailto:dtn@ietf.org&gt;

     Editor: Brian Sipos
             &lt;mailto:brian.sipos+ietf@gmail.com&gt;";
  description
    "This module implements the DTN Management Architecture (DTNMA)
     Agent core functionality.

     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.

     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
     (https://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.";
  reference
    "draft-ietf-dtn-adm-yang";

  revision 2026-05-01 {
    description
      "Updated for latest ADM document.";
    reference
      "draft-ietf-dtn-adm-yang";
  }

  feature rules {
    description
      "Conforming to this feature enables time-based and
       state-based autonomy rules.
       A basic implementation can omit these and only allow
       direct manager execution without rules.
       Even without rules, an application can choose to
       generate and send reports at-will using internal
       Agent--application API.";
  }

  feature exec-control {
    description
      "Conforming to this feature enables controls which
       allow advanced sequencing of execution flows
       in an Agent.
       A basic implementation can omit these controls and
       allow only straightforward linear execution sequences
       with no waiting and no conditional branching.";
  }

  grouping obj-list-params {
    description
      "Common parameters for object listing";
    amm:parameter include-adm {
      description
        "If true, listings will include objects from ADMs";
      amm:default "false";
      amm:type "/aritype/BOOL";
    }
  }

  grouping ensure-object-id {
    description
      "Common parameters for providing object reference to
       ensure an object exists in an ODM.

       When this grouping is used, the logic operates according
       to the following in order to succeed.
       The parent 'namespace' SHALL refer to an existing ODM.
       Both the text 'obj-name' and integer 'obj-enum' SHALL
       either both not exist, in which case the object will be
       created, or both are allocated to the same object, in
       which case the object will be modified as needed.";
    amm:parameter namespace {
      description
        "The parent ODM namespace.";
      amm:type "/aritype/namespace";
    }
    amm:parameter obj-name {
      description
        "Text name for the desired object.";
      amm:type "//ietf/amm-base/typedef/id-text";
    }
    amm:parameter obj-enum {
      description
        "Integer enumeration for the desired object.";
      amm:type "//ietf/amm-base/typedef/id-int";
    }
  }

  grouping ensure-object-params {
    description
      "Common parameter for providing formal parameter
       definitions to ensure an object exists in an ODM.

       When this grouping is used it should be after all of
       the mandatory parameters (those with no default value)
       to allow the default no-formal-parameters to be used.";
    amm:parameter formal-params {
      description
        "An optional list of formal parameters for the object.";
      amm:default "/tbl/c=3;";
      amm:type "./typedef/formal-params-tbl";
    }
  }

  grouping any-binary-operands {
    description
      "Any-value binary operands";
    amm:operand left {
      description
        "The left-side operand.";
      amm:type "//ietf/amm-base/typedef/any";
    }
    amm:operand right {
      description
        "The left-side operand.";
      amm:type "//ietf/amm-base/typedef/any";
    }
  }

  grouping any-unary-result {
    description
      "Any-value result";
    amm:result result {
      description
        "The single value.";
      amm:type "//ietf/amm-base/typedef/any";
    }
  }

  grouping numeric-time-binary-operands {
    description
      "Numeric or time binary operands";
    amm:operand left {
      description
        "The left-side operand.";
      amm:type "//ietf/amm-base/typedef/numeric-or-time";
    }
    amm:operand right {
      description
        "The left-side operand.";
      amm:type "//ietf/amm-base/typedef/numeric-or-time";
    }
  }

  grouping numeric-binary-operands {
    description
      "Numeric binary operands";
    amm:operand left {
      description
        "The left-side operand.";
      amm:type "//ietf/amm-base/typedef/NUMERIC";
    }
    amm:operand right {
      description
        "The left-side operand.";
      amm:type "//ietf/amm-base/typedef/NUMERIC";
    }
  }

  grouping numeric-unary-result {
    description
      "Numeric result";
    amm:result result {
      description
        "The single value.";
      amm:type "//ietf/amm-base/typedef/NUMERIC";
    }
  }

  grouping integer-unary-operands {
    description
      "Integer unary operand";
    amm:operand val {
      description
        "The single value.";
      amm:type "//ietf/amm-base/typedef/INTEGER";
    }
  }

  grouping integer-binary-operands {
    description
      "Integer binary operands";
    amm:operand left {
      description
        "The left-side operand.";
      amm:type "//ietf/amm-base/typedef/INTEGER";
    }
    amm:operand right {
      description
        "The left-side operand.";
      amm:type "//ietf/amm-base/typedef/INTEGER";
    }
  }

  grouping integer-unary-result {
    description
      "Integer result";
    amm:result result {
      description
        "The single value.";
      amm:type "//ietf/amm-base/typedef/INTEGER";
    }
  }

  grouping bool-unary-operands {
    description
      "Boolean unary operand";
    amm:operand val {
      description
        "The single value.";
      amm:type "/aritype/BOOL";
    }
  }

  grouping bool-binary-operands {
    description
      "Boolean binary operands";
    amm:operand left {
      description
        "The left-side operand.";
      amm:type "/aritype/BOOL";
    }
    amm:operand right {
      description
        "The left-side operand.";
      amm:type "/aritype/BOOL";
    }
  }

  grouping bool-unary-result {
    description
      "Boolean result";
    amm:result result {
      description
        "The single value.";
      amm:type "/aritype/BOOL";
    }
  }

  grouping predicate-compose-interface {
    description
      "A common interface for all predicate composition
       operators below.";
    amm:parameter operators {
      description
        "The list of other predicate operators to evaluate and
         combine their results.";
      amm:ulist {
        amm:type "/aritype/oper";
      }
    }
    amm:operand value {
      description
        "The value to pass-through and evaluate with each of the
         subordinate operators.";
      amm:type "//ietf/amm-base/typedef/any";
    }
    amm:result combined {
      description
        "The combined boolean result.";
      amm:type "/aritype/bool";
    }
  }

  amm:enum 1;
  amm:edd sw-vendor {
    amm:enum 0;
    description
      "The vendor for this Agent implementation.";
    amm:type "/aritype/TEXTSTR";
  }
  amm:edd sw-version {
    amm:enum 1;
    description
      "The version for this Agent implementation.";
    amm:type "/aritype/TEXTSTR";
  }
  amm:edd capability {
    amm:enum 2;
    description
      "A table to indicate the ADM capability of the sending agent.";
    amm:tblt {
      amm:key "org-name adm-name";
      amm:column org-name {
        description
          "The organization name containing the ADM";
        amm:type "/aritype/TEXTSTR";
      }
      amm:column org-enum {
        description
          "The organization enumeration containing the ADM";
        amm:type "/aritype/VAST";
      }
      amm:column model-name {
        description
          "The model name of the ADM";
        amm:type "/aritype/TEXTSTR";
      }
      amm:column model-enum {
        description
          "The model enumeration of the ADM";
        amm:type "/aritype/VAST";
      }
      amm:column revision {
        description
          "The specific revision the agent supports.";
        amm:type "/aritype/TEXTSTR";
      }
      amm:column features {
        description
          "The features of the ADM which the agent supports.";
        amm:ulist {
          amm:type "/aritype/TEXTSTR";
        }
      }
    }
  }
  amm:const hello {
    amm:enum 0;
    description
      "A report template to indicate the presence of an agent
       on a network.";
    amm:init-value "/AC/(./EDD/sw-vendor,./EDD/sw-version,"
                 + "./EDD/capability)";
    amm:type "//ietf/amm-base/typedef/RPTT";
  }

  // Messaging counters
  amm:edd num-msg-rx {
    amm:enum 3;
    description
      "Counter of the number of AMP messages of any type received
       from any manager.";
    amm:type "//ietf/amm-base/typedef/counter64";
  }
  amm:edd num-msg-rx-failed {
    amm:enum 4;
    description
      "Counter of received EXECSET values that failed to be decoded
       and processed.";
    amm:type "//ietf/amm-base/typedef/counter64";
  }
  amm:edd num-msg-tx {
    amm:enum 5;
    description
      "Counter of the number of AMP messages of any type transmitted
       to any manager.";
    amm:type "//ietf/amm-base/typedef/counter64";
  }
  amm:edd num-msg-tx-failed {
    amm:enum 15;
    description
      "Counter of RPTSET values that encoded but failed to be sent.";
    amm:type "//ietf/amm-base/typedef/counter64";
  }
  amm:edd last-msg-rx-time {
    amm:enum 17;
    description
      "A timestamp on the Agent when the latest AMP message was
       received from any manager.";
    amm:type "/aritype/TP";
  }

  // Execution counters and states
  amm:edd num-exec-started {
    amm:enum 6;
    description
      "Number of CTRL executions started.
       This does not include EXECSETs which have been received and
       are still queued for execution.
       See &lt;./edd/exec-running&gt; table for those details.";
    amm:type "//ietf/amm-base/typedef/counter64";
  }
  amm:edd num-exec-succeeded {
    amm:enum 7;
    description
      "Number of successful CTRL executions.
       This means the CTRL result was not undefined.";
    amm:type "//ietf/amm-base/typedef/counter64";
  }
  amm:edd num-exec-failed {
    amm:enum 8;
    description
      "Number of failed CTRL executions.
       This means the CTRL result was undefined.";
    amm:type "//ietf/amm-base/typedef/counter64";
  }
  amm:edd exec-running {
    amm:enum 9;
    description
      "Information on controls currently being executed.
       This represents tracking of execution requests from
       received EXECSET values until the entire execution is
       finished (successfully or not).
       Once finished, the Agent SHALL remove the associated row
       from this table and never re-use its 'pid' value.";
    amm:tblt {
      amm:key "pid";
      amm:column pid {
        description
          "An identifier internal to an Agent used to correlate
           table rows over time.
           An implementation MAY assign values from a smaller
           domain than this column can represent.";
        amm:type "/aritype/UVAST";
      }
      amm:column target {
        description
          "The original, full target of the execution.
           This can be an inline MAC or a CTRL reference.";
        amm:type "//ietf/amm-base/typedef/exec-tgt";
      }
      amm:column state {
        description
          "The state of executing the target within the Agent.";
        amm:type "/aritype/BYTE" {
          amm:int-labels {
            enum waiting {
              value 0;
              description
                "The execution is waiting on a condition or timer
                 to continue.
                 This includes waiting on Agent resources for the
                 execution itself.";
            }
            enum running {
              value 1;
              description
                "The execution is currently running.";
            }
          }
        }
      }
    }
  }

  // MAC helper controls
  amm:ctrl if-then-else {
    if-feature "exec-control";
    amm:enum 0;
    description
      "Evaluate an expression and follow one of two branches of
       further evaluation.";
    amm:parameter condition {
      description
        "The condition (inline or reference) to evaluate and
         convert to BOOL type.";
      amm:type "//ietf/amm-base/typedef/eval-tgt";
    }
    amm:parameter on-truthy {
      description
        "The target to execute when the condition is truthy.";
      amm:default "null";
      amm:union {
        amm:type "//ietf/amm-base/typedef/exec-tgt";
        amm:type "/aritype/NULL";
      }
    }
    amm:parameter on-falsy {
      description
        "An optional target to execute when the condition is
         not truthy (including if evaluates to undefined).";
      amm:default "null";
      amm:union {
        amm:type "//ietf/amm-base/typedef/exec-tgt";
        amm:type "/aritype/NULL";
      }
    }
    amm:result branch {
      description
        "Indication of which branch was executed.";
      amm:type "/aritype/BOOL";
    }
  }
  amm:ctrl catch {
    if-feature "exec-control";
    amm:enum 1;
    description
      "Attempt to execute a target, and if there is some failure
       catch it and execute an alternative target.";
    amm:parameter try {
      description
        "The target to execute.";
      amm:type "//ietf/amm-base/typedef/exec-tgt";
    }
    amm:parameter on-failure {
      description
        "An optional target to execute after failure.";
      amm:default "null";
      amm:union {
        amm:type "//ietf/amm-base/typedef/exec-tgt";
        amm:type "/aritype/NULL";
      }
    }
    amm:result try-success {
      description
        "True if the try target succeeded without exception.";
      amm:type "/aritype/BOOL";
    }
  }
  amm:ctrl exec-deadline {
    amm:enum 22;
    description
      "Execute a desired target and wait for it to finish before
       a relative time deadline.
       If it does not finish, it is terminated and an alternative
       timeout target is executed.
       If the target experiences a failure executing before the
       deadline, then this control will also fail.";
    amm:parameter target {
      description
        "The target to execute.";
      amm:type "//ietf/amm-base/typedef/exec-tgt";
    }
    amm:parameter deadline {
      description
        "The relative of time on the Agent to wait for
         the target to finish executing.";
      amm:type "/aritype/TD";
    }
    amm:parameter on-timeout {
      description
        "An optional target to execute after a timeout.";
      amm:default "null";
      amm:union {
        amm:type "//ietf/amm-base/typedef/exec-tgt";
        amm:type "/aritype/NULL";
      }
    }
    amm:result success {
      description
        "True if the target sub-execution succeeded before the
         deadline, false if the execution did not finish before,
         and undefined if the execution failed before the
         deadline.";
      amm:type "/aritype/BOOL";
    }
  }
  amm:ctrl wait-for {
    if-feature "exec-control";
    amm:enum 2;
    description
      "This control causes the execution to pause for a given
       amount of time.
       This is intended to be used within a macro to separate
       controls in time.";
    amm:parameter duration {
      description
        "The relative of time on the Agent to wait for.";
      amm:type "/aritype/TD";
    }
  }
  amm:ctrl wait-until {
    if-feature "exec-control";
    amm:enum 3;
    description
      "This control causes the execution to pause until a specific
       absolute time point.
       This is intended to be used within a macro to separate
       controls in time or as a first macro item to delay execution
       after the time of reception.";
    amm:parameter time {
      description
        "The absolute Agent time at which to stop waiting.";
      amm:type "/aritype/TP";
    }
  }
  amm:ctrl wait-cond {
    if-feature "exec-control";
    amm:enum 4;
    description
      "This control causes the execution to pause until a condition
       expression evaluates to truthy.
       This is intended to be used within a macro to separate
       controls in time or as a first macro item to delay execution
       until the condition is met.";
    amm:parameter condition {
      description
        "The condition (inline or reference) to evaluate and
         convert to BOOL type.";
      amm:type "//ietf/amm-base/typedef/eval-tgt";
    }
    amm:parameter min-interval {
      description
        "An optional hint used by an Agent to limit how frequently
         the condition is evaluated.
         If this is null, an implementation-defined default will
         be used.";
      amm:default "null";
      amm:union {
        amm:type "/aritype/TD";
        amm:type "/aritype/NULL";
      }
    }
  }

  // Value production and reporting
  amm:ctrl inspect {
    amm:enum 5;
    description
      "Produce a result value to inspect the agent state.
       This does not perform any EXPR evaluation or RPTT handling.";
    amm:parameter ref {
      description
        "An object to produce a value from.";
      amm:type "//ietf/amm-base/typedef/VALUE-OBJ";
    }
    amm:result val {
      description
        "The produced value.";
      amm:type "//ietf/amm-base/typedef/any";
    }
  }
  amm:ctrl report-on {
    amm:enum 6;
    description
      "Agent-wide control to generate a report from a report
       template (RPTT) value.
       The parameter is a single RPTT list that would be produced
       by an object.
       If used for more than one-shot diagnostics, defining a RPTT
       (e.g. in a CONST within an ODM) is more efficient because
       the RPTT value would not need be present in the EXECSET or
       corresponding RPTSET.";
    amm:parameter template {
      description
        "The reporting template, either as a RPTT value directly or
         as a reference to a value-producing object (possibly
         parameterized) which itself produces an RPTT value.";
      amm:type "//ietf/amm-base/typedef/rpt-tgt";
    }
    amm:parameter destinations {
      description
        "Destinations for the resulting report.
         If given an empty list (the default) reports will be sent
         to the manager executing this CTRL.
         When executed as a rule action, the destinations list is
         mandatory.

         It is possible that each destination has different access
         limitations so each destination might see different report
         contents.";
      amm:default "/ac/()";
      amm:ulist {
        amm:type "//ietf/network-base/typedef/endpoint-or-uri";
      }
    }
  }

  // Objects related to ODM handling
  amm:edd odm-list {
    amm:enum 16;
    description
      "A table of ODM within the agent.";
    amm:tblt {
      amm:key "org-name odm-name";
      amm:column org-name {
        description
          "The organization name containing the ODM";
        amm:type "//ietf/amm-base/typedef/id-text";
      }
      amm:column org-enum {
        description
          "The organization enumeration containing the ODM";
        amm:type "//ietf/amm-base/typedef/id-int";
      }
      amm:column model-name {
        description
          "The model name of the ODM";
        amm:type "//ietf/amm-base/typedef/id-text";
      }
      amm:column model-enum {
        description
          "The model enumeration of the ODM";
        amm:type "//ietf/amm-base/typedef/id-int";
      }
      amm:column revision {
        description
          "The specific revision the agent supports.";
        amm:type "/aritype/TEXTSTR";
      }
    }
  }
  amm:ctrl ensure-odm {
    amm:enum 18;
    description
      "Ensure a specific ODM is present.
       The referenced organization and model identifiers SHALL either
       not already exist or exist with the exact combination given by
       these parameters";
    amm:parameter org-name {
      description
        "The organization name containing the ODM";
      amm:type "//ietf/amm-base/typedef/id-text";
    }
    amm:parameter org-id {
      description
        "The organization enumeration ID containing the ODM";
      amm:type "//ietf/amm-base/typedef/id-int";
    }
    amm:parameter model-name {
      description
        "The model name containing the ODM.
         This value SHALL have a leading bang to indicate that it
         is an ODM.";
      amm:type "//ietf/amm-base/typedef/id-text" {
        pattern '!.+';
      }
    }
    amm:parameter model-id {
      description
        "The model enumeration ID containing the ODM.
         This value SHALL be negative to indicate that it is
         an ODM.";
      amm:type "//ietf/amm-base/typedef/id-int" {
        range "min..-1";
      }
    }
  }
  amm:ctrl obsolete-odm {
    amm:enum 19;
    description
      "Mark a specific ODM as obsolete if it is present.";
    amm:parameter odm-ns {
      description
        "Namespace of the ODM";
      amm:type "/aritype/namespace";
    }
  }

  // Helpers for VAR
  amm:ctrl var-reset {
    amm:enum 7;
    description
      "Modify a VAR state to its default value.";
    amm:parameter target {
      description
        "The VAR object to affect.";
      amm:type "/aritype/VAR";
    }
  }
  amm:ctrl var-store {
    amm:enum 8;
    description
      "Modify a VAR state to a specific value.";
    amm:parameter target {
      description
        "The VAR object to affect.";
      amm:type "/aritype/VAR";
    }
    amm:parameter value {
      description
        "The exact value to store in the VAR.";
      amm:type "//ietf/amm-base/typedef/any";
    }
  }

  // Objects related to IDENT handling
  amm:edd ident-list {
    amm:enum 18;
    description
      "Inspect the set of (possibly filtered) IDENT objects known
       to the Agent.
       One possible filter is provided by the 'base' parameter to
       limit to a specific subtree of objects. Another is whether
       or not to include abstract objects in the list.";
    uses obj-list-params;
    amm:parameter include-abstract {
      description
        "Determine whether abstract objects are included in the
         list (when true), or only non-abstract objects (when
         false).";
      amm:default "false";
      amm:type "/aritype/bool";
    }
    amm:parameter base {
      description
        "The optional base object from which to traverse derived
         objects. If this does not reference a known object the
         produced list SHALL be empty.
         The base object is not considered to be derived from
         itself, so it SHALL NOT be present in the produced list.";
      amm:default "null";
      amm:union {
        amm:type "/aritype/ident";
        amm:type "/aritype/null";
      }
    }
    amm:tblt {
      amm:key "obj";
      amm:column obj {
        amm:type "/aritype/ident";
      }
      amm:column is-abstract {
        amm:type "/aritype/bool";
      }
    }
  }
  amm:ctrl ensure-ident {
    amm:enum 20;
    description
      "Ensure a specific IDENT is present in an ODM.
       If an object already exists with the same identifiers,
       parameters, and bases this control will do nothing
       and succeed.
       If an object already exists in the same namespace with either
       of the object identifiers this control will fail.";
    uses ensure-object-id;
    amm:parameter abstract {
      description
        "If true the object is abstract and SHALL NOT contain any
         formal parameters.";
      amm:type "/aritype/bool";
    }
    amm:parameter bases {
      description
        "The set of base objects for this object.";
      amm:ulist {
        amm:type "/aritype/ident";
      }
    }
    uses ensure-object-params;
  }
  amm:ctrl obsolete-ident {
    amm:enum 21;
    description
      "Mark a specific IDENT as obsolete if it is present in an
       ODM.";
    amm:parameter obj {
      description
        "A reference to a IDENT within an ODM only.";
      amm:type "/aritype/IDENT";
    }
  }

  // Objects related to TYPEDEF handling
  amm:edd typedef-list {
    amm:enum 10;
    description
      "A table of TYPEDEF within the agent.";
    uses obj-list-params;
    amm:tblt {
      amm:key "obj";
      amm:column obj {
        amm:type "/aritype/typedef";
      }
    }
  }

  // Objects related to CONST handling
  amm:edd const-list {
    amm:enum 14;
    description
      "A table of CONST within the agent.";
    uses obj-list-params;
    amm:tblt {
      amm:key "obj";
      amm:column obj {
        amm:type "/aritype/CONST";
      }
      amm:column type {
        amm:type "//ietf/amm-semtype/typedef/semtype";
      }
    }
  }
  amm:ctrl ensure-const {
    amm:enum 11;
    description
      "Ensure a specific CONST is present in an ODM.
       If an object already exists with the same identifiers,
       parameters, type, and value this control will do nothing
       and succeed.
       If an object already exists in the same namespace with either
       of the object identifiers this control will fail.";
    uses ensure-object-id;
    amm:parameter type {
      description
        "The type for the CONST object.";
      amm:type "//ietf/amm-semtype/typedef/semtype";
    }
    amm:parameter value {
      description
        "A required constant value.
         This value SHALL match the type given for this object.";
      amm:type "//ietf/amm-base/typedef/any";
    }
    uses ensure-object-params;
  }
  amm:typedef formal-params-tbl {
    amm:enum 1;
    description
      "Introspection on formal parameters of an object which
       can be parameterized.
       The order of rows of the table is significant and
       corresponds with the index of each parameter.";
    amm:tblt {
      amm:key "name";
      amm:column name {
        description
          "The name of the parameter.
           This is unique among all rows.";
        amm:type "//ietf/amm-base/typedef/id-text";
      }
      amm:column type {
        description
          "The type for values of the parameter.";
        amm:type "//ietf/amm-semtype/typedef/semtype";
      }
      amm:column default {
        description
          "An optional default value.
           When there is no default, the undefined value is
           used here.";
        amm:type "//ietf/amm-base/typedef/any";
      }
    }
  }
  amm:ctrl obsolete-const {
    amm:enum 12;
    description
      "Mark a specific CONST as obsolete if it is present in an
       ODM.";
    amm:parameter obj {
      description
        "A reference to a CONST within an ODM only.";
      amm:type "/aritype/CONST";
    }
  }

  // Objects related to VAR handling
  amm:edd var-list {
    amm:enum 11;
    description
      "A table of VAR within the agent.";
    uses obj-list-params;
    amm:tblt {
      amm:key "obj";
      amm:column obj {
        amm:type "/aritype/VAR";
      }
      amm:column type {
        amm:type "//ietf/amm-semtype/typedef/semtype";
      }
    }
  }
  amm:ctrl ensure-var {
    amm:enum 9;
    description
      "Ensure a specific VAR is present in an ODM.
       If an object already exists with the same identifiers,
       parameters, type, and init-value this control will do
       nothing and succeed.
       If an object already exists in the same namespace with either
       of the object identifiers (but not both), or the type or
       is different, this control will fail.
       That means that this control can change only the initial value
       of a pre-existing VAR object.";
    uses ensure-object-id;
    amm:parameter type {
      description
        "The type for the VAR object.";
      amm:type "//ietf/amm-semtype/typedef/semtype";
    }
    amm:parameter init-value {
      description
        "The exact value to use as the initial value of
         the new object and to store as the initial state
         of the object if created.
         This value SHALL match the type given for this object.";
      amm:type "//ietf/amm-base/typedef/any";
    }
    uses ensure-object-params;
  }
  amm:ctrl obsolete-var {
    amm:enum 10;
    description
      "Mark a specific VAR as obsolete if it is present in an ODM.";
    amm:parameter obj {
      description
        "A reference to a VAR within an ODM only.";
      amm:type "/aritype/VAR";
    }
  }

  // Objects related to SBR handling
  amm:edd sbr-list {
    if-feature "rules";
    amm:enum 12;
    description
      "A table of SBR within the agent.";
    uses obj-list-params;
    amm:tblt {
      amm:key "obj";
      amm:column obj {
        amm:type "/aritype/SBR";
      }
      amm:column action {
        description
          "The action (inline MAC or CTRL reference) to execute when
           this rule triggers.";
        amm:type "//ietf/amm-base/typedef/exec-tgt";
      }
      amm:column condition {
        description
          "The condition (inline or reference) to periodically
           evaluate and convert to BOOL type.";
        amm:type "//ietf/amm-base/typedef/eval-tgt";
      }
      amm:column min-interval {
        description
          "The minimum interval of Agent time between executions of
           the action.
           This can also be used by an Agent to limit how frequently
           the condition is evaluated.";
        amm:type "/aritype/TD";
      }
      amm:column max-count {
        description
          "Number of executions of the action, after being enabled,
           when the rule is disabled.";
        amm:type "/aritype/UVAST";
      }
      amm:column init-enabled {
        description
          "Whether the rule is enabled at Agent initialization.";
        amm:type "/ARITYPE/BOOL";
      }
      amm:column enabled {
        description
          "The current enabled state of the rule.";
        amm:type "/ARITYPE/BOOL";
      }
    }
  }
  amm:edd tbr-list {
    if-feature "rules";
    amm:enum 13;
    description
      "A table of TBR within the agent.";
    uses obj-list-params;
    amm:tblt {
      amm:key "obj";
      amm:column obj {
        amm:type "/aritype/TBR";
      }
      amm:column action {
        description
          "The action (inline MAC or CTRL reference) to execute when
           this rule triggers.";
        amm:type "//ietf/amm-base/typedef/exec-tgt";
      }
      amm:column start-time {
        description
          "The earliest time (absolute or init-relative) at which
           the action is executed.";
        amm:type "//ietf/amm-base/typedef/TIME";
      }
      amm:column period {
        description
          "How often the action is executed.";
        amm:type "/aritype/TD";
      }
      amm:column max-count {
        description
          "Number of executions of the action, after being enabled,
           when the rule is disabled.";
        amm:type "/aritype/UVAST";
      }
      amm:column init-enabled {
        description
          "Whether the rule is enabled at Agent initialization.";
        amm:type "/ARITYPE/BOOL";
      }
      amm:column enabled {
        description
          "The current enabled state of the rule.";
        amm:type "/ARITYPE/BOOL";
      }
    }
  }

  // CTRLs related to rules
  amm:ctrl ensure-sbr {
    if-feature "rules";
    amm:enum 13;
    description
      "Ensure that a state-based rule with the given identifiers
       exists within an ODM.";
    uses ensure-object-id;
    amm:parameter action {
      description
        "The action (inline MAC or CTRL reference) to execute when
         this rule triggers.";
      amm:type "//ietf/amm-base/typedef/exec-tgt";
    }
    amm:parameter condition {
      description
        "The condition (inline or reference) to periodically
         evaluate and convert to BOOL type.";
      amm:type "//ietf/amm-base/typedef/eval-tgt";
    }
    amm:parameter min-interval {
      description
        "The minimum interval of Agent time between executions of
         the action.
         This can also be used by an Agent to limit how frequently
         the condition is evaluated.";
      amm:type "/ARITYPE/TD";
    }
    amm:parameter max-count {
      description
        "Number of executions of the action, after being enabled,
         when the rule is disabled.";
      amm:type "/ARITYPE/UVAST";
    }
    amm:parameter init-enabled {
      description
        "Whether the rule is enabled at Agent initialization.";
      amm:type "/ARITYPE/BOOL";
    }
  }
  amm:ctrl ensure-tbr {
    if-feature "rules";
    amm:enum 14;
    description
      "Ensure that a time-based rule with the given identifiers
       exists within an ODM.";
    uses ensure-object-id;
    amm:parameter action {
      description
        "The action (inline MAC or CTRL reference) to execute when
         this rule triggers.";
      amm:type "//ietf/amm-base/typedef/exec-tgt";
    }
    amm:parameter start-time {
      description
        "The earliest time (absolute or init-relative) at which
         the action is executed.";
      amm:type "//ietf/amm-base/typedef/TIME";
    }
    amm:parameter period {
      description
        "How often the action is executed.";
      amm:type "/ARITYPE/TD";
    }
    amm:parameter max-count {
      description
        "Number of executions of the action, after being enabled,
         when the rule is disabled.";
      amm:type "/ARITYPE/UVAST";
    }
    amm:parameter init-enabled {
      description
        "Whether the rule is enabled at Agent initialization.";
      amm:type "/ARITYPE/BOOL";
    }
  }
  amm:ctrl ensure-rule-enabled {
    if-feature "rules";
    amm:enum 15;
    description
      "Ensure a specific rule is enabled or disabled.";
    amm:parameter obj-id {
      description
        "The rule of which to ensure the enabled state.";
      amm:union {
        amm:type "/ARITYPE/SBR";
        amm:type "/ARITYPE/TBR";
      }
    }
    amm:parameter enabled {
      description
        "The desired enabled state of the rule.";
      amm:type "/ARITYPE/BOOL";
    }
  }
  amm:ctrl reset-rule-enabled {
    if-feature "rules";
    amm:enum 16;
    description
      "Reset rule enabled to initial setting.";
    amm:parameter obj-id {
      description
        "The rule of which to reset the enabled state.";
      amm:union {
        amm:type "/ARITYPE/SBR";
        amm:type "/ARITYPE/TBR";
      }
    }
  }
  amm:ctrl obsolete-rule {
    if-feature "rules";
    amm:enum 17;
    description
      "Mark a specific SBR or TBR as obsolete if it is present in
       an ODM.";
    amm:parameter obj-id {
      description
        "A reference to a rule within an ODM only.";
      amm:union {
        amm:type "/ARITYPE/SBR";
        amm:type "/ARITYPE/TBR";
      }
    }
    amm:result success {
      description
        "Boolean indicating whether the rule was marked obsolete";
      amm:type "/ARITYPE/BOOL";
    }
  }

  // Numeric operators
  amm:oper negate {
    amm:enum 0;
    description
      "Negate a value, numeric or TD.
       This is equivalent to multiplying by -1 but a shorter
       expression.";
    amm:operand val {
      description
        "The single value.";
      amm:type "//ietf/amm-base/typedef/numeric-or-time";
    }
    uses numeric-unary-result;
  }
  amm:oper add {
    amm:enum 1;
    description
      "Add two numeric values or a TP and TD value (in either order).
       The operands are cast to the least compatible numeric type
       before the arithmetic.";
    uses numeric-time-binary-operands;
    uses any-unary-result;
  }
  amm:oper sub {
    amm:enum 2;
    description
      "Subtract two numeric values or a TP less a TD value.
       The left (second) operand is the minuend and the right (first)
       operand is the subtrahend; this means that the EXPR
       &lt;/AC/(10, 2, ./OPER/sub)&gt; behaves as the infix '10 - 2'.
       The operands are cast to the least compatible numeric type
       before the arithmetic.";
    uses numeric-time-binary-operands;
    uses any-unary-result;
  }
  amm:oper multiply {
    amm:enum 3;
    description
      "Multiply two numeric values or a TD value (in either order).
       The operands are cast to the least compatible numeric type
       before the arithmetic.";
    uses numeric-time-binary-operands;
    uses any-unary-result;
  }
  amm:oper divide {
    amm:enum 4;
    description
      "Divide two numeric values or a TD value (as numerator).
       The left (second) operand is the numerator and the right
       (first) operand is the divisor; this means that the EXPR
       &lt;/AC/(10, 2, ./OPER/divide)&gt; behaves as the infix '10 / 2'.
       The operands are cast to the least compatible numeric type
       before the arithmetic.";
    uses numeric-time-binary-operands;
    uses any-unary-result;
  }
  amm:oper remainder {
    amm:enum 5;
    description
      "Find the remainder of a numeric operation.
       The left (second) operand is the numerator and the right
       (first) operand is the divisor; this means that the EXPR
       &lt;/AC/(10, 2, ./OPER/divide)&gt; behaves as the infix '10 % 2'.
       The operands are cast to the least compatible numeric type
       before the arithmetic.";
    uses numeric-binary-operands;
    uses numeric-unary-result;
  }

  // Bitwise operators
  amm:oper bit-not {
    amm:enum 6;
    description
      "Perform a bitwise NOT on an integer value.";
    uses integer-unary-operands;
    uses integer-unary-result;
  }
  amm:oper bit-and {
    amm:enum 7;
    description
      "Perform a bitwise AND between two integer values.";
    uses integer-binary-operands;
    uses integer-unary-result;
  }
  amm:oper bit-or {
    amm:enum 8;
    description
      "Perform a bitwise OR between two integer values.";
    uses integer-binary-operands;
    uses integer-unary-result;
  }
  amm:oper bit-xor {
    amm:enum 9;
    description
      "Perform a bitwise exclusive or (XOR) between two integer
       values.";
    uses integer-binary-operands;
    uses integer-unary-result;
  }

  // Boolean operators
  amm:oper bool-not {
    amm:enum 10;
    description
      "Perform a boolean NOT on a boolean value.";
    uses bool-unary-operands;
    uses bool-unary-result;
  }
  amm:oper bool-and {
    amm:enum 11;
    description
      "Perform a boolean AND between two boolean values.";
    uses bool-binary-operands;
    uses bool-unary-result;
  }
  amm:oper bool-or {
    amm:enum 12;
    description
      "Perform a boolean OR between two boolean values.";
    uses bool-binary-operands;
    uses bool-unary-result;
  }
  amm:oper bool-xor {
    amm:enum 13;
    description
      "Perform a boolean XOR between two boolean values.";
    uses bool-binary-operands;
    uses bool-unary-result;
  }

  // Strict value comparison
  amm:oper strict-eq {
    amm:enum 33;
    description
      "Compare two values for strict equality as defined by
       Section 6.12.1 of the AMM.";
    uses any-binary-operands;
    uses bool-unary-result;
  }
  amm:oper strict-ne {
    amm:enum 34;
    description
      "Compare two values for strict inequality as defined by
       Section 6.12.1 of the AMM.";
    uses any-binary-operands;
    uses bool-unary-result;
  }

  // Loose value comparison
  amm:oper compare-eq {
    amm:enum 14;
    description
      "Compare two values for loose equality as defined by
       Section 6.12.1 of the AMM.
       Numeric operands MAY be converted to a least compatible
       numeric type for the comparison.";
    uses any-binary-operands;
    uses bool-unary-result;
  }
  amm:oper compare-ne {
    amm:enum 15;
    description
      "Compare two values for loose equality as defined by
       Section 6.12.1 of the AMM.
       Numeric operands MAY be converted to a least compatible
       numeric type for the comparison.";
    uses any-binary-operands;
    uses bool-unary-result;
  }

  // Numeric (or time-as-numeric) comparison
  amm:oper compare-gt {
    amm:enum 16;
    description
      "Compare two numbers by value.
       The result is true if the left value is greater than the
       right value.
       The operands are cast to the least compatible numeric type
       before the comparison.";
    uses any-binary-operands;
    uses bool-unary-result;
  }
  amm:oper compare-ge {
    amm:enum 17;
    description
      "Compare two numbers by value.
       The result is true if the left value is greater than or equal
       to the right.
       The operands are cast to the least compatible numeric type
       before the comparison.";
    uses any-binary-operands;
    uses bool-unary-result;
  }
  amm:oper compare-lt {
    amm:enum 18;
    description
      "Compare two operands by value.
       The result is true if the left value is less than the right.
       The operands are cast to the least compatible numeric type
       before the comparison.";
    uses any-binary-operands;
    uses bool-unary-result;
  }
  amm:oper compare-le {
    amm:enum 19;
    description
      "Compare two operands by value.
       The result is true if the left value is less than or
       equal to the right.
       The operands are cast to the least compatible numeric type
       before the comparison.";
    uses any-binary-operands;
    uses bool-unary-result;
  }

  // Unary predicate (match) operators
  amm:oper is-undefined {
    amm:enum 29;
    description
      "Predicate to check for the undefined value.";
    amm:operand value {
      description
        "The value to check.";
      amm:type "//ietf/amm-base/typedef/any";
    }
    amm:result match {
      description
        "True if and only if the value is the undefined value.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper is-not-undefined {
    amm:enum 30;
    description
      "Predicate to check for the undefined value.";
    amm:operand value {
      description
        "The value to check.";
      amm:type "//ietf/amm-base/typedef/any";
    }
    amm:result match {
      description
        "False if and only if the value is the undefined value.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper is-truthy {
    amm:enum 35;
    description
      "Predicate to convert to bool type.
       This operator will specifically consider the undefined value
       as not-truthy with a match result of false.
       This logic is the same as what is used internal to the Agent
       for conditional expressions and filters.";
    amm:operand value {
      description
        "The value to check.";
      amm:type "//ietf/amm-base/typedef/any";
    }
    amm:result match {
      description
        "True if and only if the value is truthy.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper match-type {
    amm:enum 45;
    description
      "Predicate to match against any built-in type or named typedef
       based on the procedures of Section 6.10 of the AMM.
       If the desired type is not known to the agent the result SHALL
       be undefined.";
    reference
      "draft-ietf-dtn-amm";
    amm:parameter desired {
      description
        "The desired type to match against.";
      amm:union {
        amm:type "/aritype/aritype";
        amm:type "/aritype/typedef";
      }
    }
    amm:operand value {
      description
        "The value to check.";
      amm:type "//ietf/amm-base/typedef/any";
    }
    amm:result match {
      description
        "True if and only if the value matches the desired type.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper convert-type {
    amm:enum 46;
    description
      "Type conversion operator to any built-in type or named typedef
       based on the procedures of Section 6.11 of the AMM.
       If the desired type is not known to the agent the result SHALL
       be undefined.
       If the conversion fails the result SHALL be undefined.";
    reference
      "draft-ietf-dtn-amm";
    amm:parameter desired {
      description
        "The desired type to convert to.";
      amm:union {
        amm:type "/aritype/aritype";
        amm:type "/aritype/typedef";
      }
    }
    amm:operand value {
      description
        "The value to convert.";
      amm:type "//ietf/amm-base/typedef/any";
    }
    amm:result converted {
      description
        "The result of conversion, which can be undefined.";
      amm:type "//ietf/amm-base/typedef/any";
    }
  }
  amm:oper match-regexp {
    amm:enum 23;
    description
      "This is a unary predicate operator which will compare
       a text value to a regular expression pattern.
       The regular expression is limited to I-Regexp compatibility.";
    reference
      "RFC 9485: I-Regexp: An Interoperable Regular Expression
       Format";
    amm:parameter regexp {
      description
        "The I-Regexp text pattern to match.
         In accordance with that definition, this pattern is
         implicitly anchored to the start and end of the text being
         matched (i.e. it is always a full match).";
      amm:type "/aritype/textstr";
    }
    amm:operand value {
      description
        "The value to check for a match.";
      amm:type "/aritype/textstr";
    }
    amm:result is-match {
      description
        "The result is true if the value matches the given pattern.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper is-org-private {
    amm:enum 36;
    description
      "Predicate to determine if an object or
       namespace reference value has a namespace which
       is private (i.e. has an org-id which is a negative
       integer or text with a leading bang).";
    amm:operand value {
      description
        "The reference value to check.
         This value SHOULD NOT be de-referenced.";
      amm:union {
        amm:type "/aritype/object";
        amm:type "/aritype/namespace";
      }
    }
    amm:result match {
      description
        "True if and only if the org-id is private.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper match-org-int-range {
    amm:enum 37;
    description
      "Predicate to determine if a de-referenced object or
       namespace reference value has a namespace which
       has an org-id which is within a specific integer range.";
    amm:parameter min-value {
      description
        "The minimum org-id value to match.";
      amm:type "//ietf/amm-base/typedef/id-int";
    }
    amm:parameter max-value {
      description
        "The maximum org-id value to match.";
      amm:type "//ietf/amm-base/typedef/id-int";
    }
    amm:operand value {
      description
        "The reference value to check.
         If the reference does not use integer form of org-id,
         it SHALL be dereferenced and translated to integer form.";
      amm:union {
        amm:type "/aritype/object";
        amm:type "/aritype/namespace";
      }
    }
    amm:result match {
      description
        "True if and only if the org-id is within the
         desired inclusive range.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper is-model-odm {
    amm:enum 38;
    description
      "Predicate to determine if an object or
       namespace reference value has a namespace which
       is is an ODM (i.e. has an model-id which is a negative
       integer or text with a leading bang).";
    amm:operand value {
      description
        "The reference value to check.
         This value SHOULD NOT be de-referenced.";
      amm:union {
        amm:type "/aritype/object";
        amm:type "/aritype/namespace";
      }
    }
    amm:result match {
      description
        "True if and only if the model is an ODM.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper match-model-int-range {
    amm:enum 39;
    description
      "Predicate to determine if a de-referenced object or
       namespace reference value has a namespace which
       has a model-id which is within a specific integer range.";
    amm:parameter min-value {
      description
        "The minimum model-id value to match.";
      amm:type "//ietf/amm-base/typedef/id-int";
    }
    amm:parameter max-value {
      description
        "The maximum model-id value to match.";
      amm:type "//ietf/amm-base/typedef/id-int";
    }
    amm:operand value {
      description
        "The reference value to check.
         If the reference does not use integer form of model-id,
         it SHALL be dereferenced and translated to integer form.";
      amm:union {
        amm:type "/aritype/object";
        amm:type "/aritype/namespace";
      }
    }
    amm:result match {
      description
        "True if and only if the model-id is within the
         desired inclusive range.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper is-same-ns {
    amm:enum 40;
    description
      "Predicate to determine if a de-referenced object or
       namespace reference value matches a desired namespace
       from a parameter.
       The comparison is on the actual namespace, regardless
       of whether integer or text IDs are used in either.";
    amm:parameter desired {
      description
        "A reference to the desired namespace to compare with.
         If this de-reference fails the result SHALL be undefined.";
      amm:type "/aritype/namespace";
    }
    amm:operand value {
      description
        "The reference value to compare with the desired
         namespace.
         If the value is an object reference, it SHOULD only have
         its namespace portion (org-id and model-id) dereferenced
         and compared with the desired namespace.";
      amm:union {
        amm:type "/aritype/object";
        amm:type "/aritype/namespace";
      }
    }
    amm:result match {
      description
        "True if and only if the value references the same
         namespace as the desired.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper match-object-type {
    amm:enum 42;
    description
      "Predicate to determine if a de-referenced object reference
       value has a specific object type.";
    amm:parameter desired {
      description
        "The desired object type, either by built-in type reference,
         primitive integer enumeration, or text name.
         If the desired type is unknown to the Agent the result
         SHALL be undefined.";
      amm:type "/aritype/aritype";
    }
    amm:operand value {
      description
        "The object reference value to check.
         If the de-reference itself fails the result SHALL be
         false.";
      amm:type "/aritype/object";
    }
    amm:result match {
      description
        "True if and only if the type-id matches the desired
         object type.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper match-object-int-range {
    amm:enum 44;
    description
      "Predicate to determine if a de-referenced object reference
       value has an obj-id which is within a specific integer
       range.";
    amm:parameter min-value {
      description
        "The minimum obj-id value to match.";
      amm:type "//ietf/amm-base/typedef/id-int";
    }
    amm:parameter max-value {
      description
        "The maximum obj-id value to match.";
      amm:type "//ietf/amm-base/typedef/id-int";
    }
    amm:operand value {
      description
        "The reference value to check.
         If the reference does not use integer form of obj-id,
         it SHALL be dereferenced and translated to integer form.";
      amm:type "/aritype/object";
    }
    amm:result match {
      description
        "True if and only if the obj-id is within the
         desired inclusive range.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper is-same-object {
    amm:enum 41;
    description
      "Predicate to determine if a de-referenced object
       reference value matches a desired object
       from a parameter.
       The comparison is on the actual object instance, regardless
       of whether integer or text IDs are used in either.";
    amm:parameter desired {
      description
        "A reference to the desired object to compare with.
         If this de-reference fails the result SHALL be undefined.";
      amm:type "/aritype/object";
    }
    amm:operand value {
      description
        "The reference value to compare with the desired object.
         If this de-reference fails the result SHALL be false.";
      amm:type "/aritype/object";
    }
    amm:result match {
      description
        "True if and only if the value references the same object
         as the desired.";
      amm:type "/aritype/bool";
    }
  }
  amm:oper ref {
    amm:enum 43;
    description
      "A zero-ary operator to copy a reference value parameter
       into its result.
       This is a work-around for &lt;//ietf/amm-base/typedef/expr-item&gt;
       permitting only literal or OPER references.";
    amm:parameter ref {
      description
        "The input reference value.";
      amm:union {
        amm:type "/aritype/object";
        amm:type "/aritype/namespace";
      }
    }
    amm:result ref {
      description
        "The output reference value.";
      amm:union {
        amm:type "/aritype/object";
        amm:type "/aritype/namespace";
      }
    }
  }

  // Unary predicate function composition
  amm:oper predicate-all {
    amm:enum 24;
    description
      "Compose unary predicate operators with a result that is true
       only when all of the subordinate operators evaluate to a
       truthy result.
       If any operator evaluates to the undefined value it is
       considered not truthy and this result will be false.";
    uses predicate-compose-interface;
  }
  amm:oper predicate-any {
    amm:enum 25;
    description
      "Compose unary predicate operators with a result that is true
       when any of the subordinate operators evaluate to a
       truthy result.
       If any operator evaluates to the undefined value it is
       considered not truthy, so other operators are still
       part of the result which may be true.";
    uses predicate-compose-interface;
  }
  amm:oper predicate-none {
    amm:enum 26;
    description
      "Compose unary predicate operators with a result that is true
       when all of the subordinate operators do not evaluate to a
       truthy result.
       If any operator evaluates to the undefined value it is
       considered not truthy, so other operators are still
       part of the result which may be true.";
    uses predicate-compose-interface;
  }

  // sub-expression evaluation operators
  amm:oper eval {
    amm:enum 28;
    description
      "A zero-ary operator which functions by evaluating a target
       sub-expression using the following phases:
         1. If the target is a reference, it is used to produce
            a value which SHALL be an expression.
            Otherwise, the target SHALL itself be an expression.
         2. Evaluate the expression and consider the evaluation
            result as this operator result.";
    amm:parameter target {
      description
        "Either an inline sub-expression or a reference to an
         object which produces an expression.";
      amm:type "//ietf/amm-base/typedef/eval-tgt";
    }
    amm:result sub-result {
      description
        "The result of the sub-expression evaluation.";
      amm:type "//ietf/amm-base/typedef/any";
    }
  }
  amm:oper unary-eval {
    amm:enum 27;
    description
      "A unary operator which functions by evaluating a target
       sub-expression using the following phases:
         1. Substitute the bind-value actual parameter for
            &lt;/label/0&gt; items within the target value
            (literal expression or object reference).
         2. If the target is a reference, it is used to produce
            a value which SHALL be an expression.
            Otherwise, the target SHALL itself be an expression.
         3. Evaluate the expression and consider the evaluation
            result as this operator result.
       This is similar to the &lt;./oper/eval&gt; object with the
       addition of the unary operand binding.";
    amm:parameter target {
      description
        "Either an inline sub-expression or a reference to an
         object which produces an expression.";
      amm:type "//ietf/amm-base/typedef/eval-tgt";
    }
    amm:operand bind-value {
      description
        "The value to pass-through as &lt;/label/0&gt; during
         the substitution phase of evaluation with each of the
         subordinate operators.
         The label does not need to be present in this
         target, the operand can simply be ignored.
         Any label values of 1 or larger present
         will cause the evaluation to fail and result in
         the undefined value.";
      amm:type "//ietf/amm-base/typedef/any";
    }
    amm:result sub-result {
      description
        "The result of the sub-expression evaluation.";
      amm:type "//ietf/amm-base/typedef/any";
    }
  }
  amm:oper nary-eval {
    amm:enum 31;
    description
      "An N-ary operator which functions by evaluating a target
       sub-expression using the following phases:
         1. Substitute the bind-values actual parameter for
            LABEL items with integer primitive (e.g. &lt;/label/0&gt;)
            within the target value
            (literal expression or object reference).
            The number of bind-able operands is given by the
            _operand-count_ parameter.
         2. If the target is a reference, it is used to produce
            a value which SHALL be an expression.
            Otherwise, the target SHALL itself be an expression.
         3. Evaluate the expression and consider the evaluation
            result as this operator result.
       This is similar to the &lt;./oper/eval&gt; object with the
       addition of the unary operand binding.";
    amm:parameter operand-count {
      description
        "The number of operands to pop from the evaluation stack
         and use as bind-values for the target parameter.
         This is limited to signed int length because LABEL
         values are also limited to signed int.";
      amm:type "/aritype/int" {
        range "0..max";
      }
    }
    amm:parameter target {
      description
        "Either an inline sub-expression or a reference to an
         object which produces an expression.
         Not all valid labels, 0 through (_operand-count_ - 1),
         need to be present in this target, some operands can
         simply be popped and ignored.
         Any label values of _operand-count_ or larger present
         will cause the evaluation to fail and result in
         the undefined value.";
      amm:type "//ietf/amm-base/typedef/eval-tgt";
    }
    amm:operand bind-values {
      description
        "The evaluation stack values to substitute for LABEL values
         during the substitution phase of evaluation.
         A total of _operand-count_ values will be popped for this
         sequence.
         Label 0 refers to the bottom-most popped value from
         the stack and label (_operand-count_ - 1) refers to the
         top of the stack.";
      amm:seq {
        amm:type "//ietf/amm-base/typedef/any";
      }
    }
    amm:result sub-result {
      description
        "The result of the sub-expression evaluation.";
      amm:type "//ietf/amm-base/typedef/any";
    }
  }

  // Table (TBL) filtering
  amm:typedef tbl-row-filter {
    amm:enum 0;
    description
      "A table filter applied using two phases for each row:
         1. Substitute row values for LABEL items within EXPR.
            This does not apply recursively to VALUE-OBJ within
            the expression.
         2. Evaluate the expression and consider the row matched
            if the result is a truthy value.
       Each LABEL item refers to the value at a column index
       within the context of the input row. Label substitution
       is performed as described in the value production section
       of the DTNMA AMM document.";
    reference
      "draft-ietf-dtn-amm";
    amm:type "//ietf/amm-base/typedef/EXPR";
  }
  amm:oper tbl-filter {
    amm:enum 20;
    description
      "Filter a table first by rows (using an expression) and then
       by columns (using identifiers).";
    amm:parameter rows {
      description
        "A filter for each row.";
      amm:type "./typedef/tbl-row-filter";
    }
    amm:parameter columns {
      description
        "A filter to restrict output to only the listed columns.
         The order of columns in the filtered result table SHALL
         correspond with the order of columns in this list.";
      amm:ulist {
        amm:type "/aritype/UVAST";
      }
    }
    amm:operand in {
      description
        "Table to filter.";
      amm:type "/aritype/TBL";
    }
    amm:result out {
      description
        "The filtered table.";
      amm:type "/aritype/TBL";
    }
  }
  amm:oper tbl-get {
    amm:enum 32;
    description
      "Retrieve an item from the given table.";
    amm:parameter row {
      description
        "Index of the row (major axis) of the item.";
      amm:type "/aritype/uint";
    }
    amm:parameter column {
      description
        "Index of the column (minor axis) of the item.";
      amm:type "/aritype/uint";
    }
    amm:operand in {
      description
        "List to retrieve a value from.";
      amm:type "/aritype/TBL";
    }
    amm:result out {
      description
        "The retrieved value or undefined if the index is not
         valid.";
      amm:type "//ietf/amm-base/typedef/any";
    }
  }

  // List (AC) filtering
  amm:oper list-get {
    amm:enum 21;
    description
      "Retrieve an item from the given list.";
    amm:parameter index {
      description
        "Index of the value to retrieve from the list.";
      amm:type "/aritype/uint";
    }
    amm:operand in {
      description
        "List to retrieve a value from.";
      amm:type "/aritype/AC";
    }
    amm:result out {
      description
        "The retrieved value or undefined if the index is not
         valid.";
      amm:type "//ietf/amm-base/typedef/any";
    }
  }

  // Map (AM) filtering
  amm:oper map-get {
    amm:enum 22;
    description
      "Retrieve an item from the given map.";
    amm:parameter key {
      description
        "Key of the value to retrieve from the map.";
      amm:type "//ietf/amm-base/typedef/primitive";
    }
    amm:operand in {
      description
        "Map to retrieve a value from.";
      amm:type "/aritype/AM";
    }
    amm:result out {
      description
        "The retrieved value or undefined if the key is not valid.";
      amm:type "//ietf/amm-base/typedef/any";
    }
  }
}
</sourcecode>
    </section>
    <section anchor="sec-yang-acladm">
      <name>ADM Module for DTNMA Agent Access Control Lists</name>
      <t>
The ADM module in this section implements the entities described in <xref section="A" target="I-D.ietf-dtn-amm"/>.
      </t>
      <sourcecode markers="true" name="ietf-dtnma-agent-acl.yang" type="yang" originalSrc="modules/ietf-dtnma-agent-acl.yang">module ietf-dtnma-agent-acl {
  yang-version 1.1;
  namespace "ari://ietf/dtnma-agent-acl/";
  prefix acl;

  import ietf-amm {
    prefix amm;
  }
  import ietf-dtnma-agent {
    prefix da;
  }
  import ietf-network-base {
    prefix network-base;
  }

  organization
    "Internet Engineering Task Force (IETF)" {
    amm:enum 1;
  }
  contact
    "WG Web: &lt;http://tools.ietf.org/wg/dtn/&gt;
     WG List: &lt;mailto:dtn@ietf.org&gt;

     Editor: Brian Sipos
             &lt;mailto:brian.sipos+ietf@gmail.com&gt;";
  description
    "This module implements the DTN Management Architecture (DTNMA)
     Agent Access Control List (ACL) functionality.

     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.

     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
     (https://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.";
  reference
    "draft-ietf-dtn-adm-yang";

  revision 2026-05-01 {
    description
      "Updated for latest ADM document.";
    reference
      "draft-ietf-dtn-adm-yang";
  }
  amm:enum 2;

  // Common types in this model
  amm:typedef entry-id {
    amm:enum 2;
    description
      "The identifier for an entry in any access control table.";
    amm:type "/ARITYPE/UINT";
  }
  amm:typedef optional-entry-id {
    amm:enum 3;
    description
      "An optional entry identifier (or a null value).";
    amm:union {
      amm:type "./TYPEDEF/entry-id";
      amm:type "/ARITYPE/null";
    }
  }

  // Atomic permission objects
  amm:ident permission {
    amm:enum 0;
    description
      "The base IDENT for objects usable as permissions in the
       access control table.
       Derived objects MUST define the specific conditions in which
       the permission is exercised.
       Derived objects MAY be parameterized as needed to control
       specific access granted by each permission.
       This object itself is abstract and provides not specific
       permission.";
    amm:abstract true;
  }
  amm:typedef permission-list {
    amm:enum 0;
    description
      "A list of permission object (IDENT) references.";
    amm:ulist {
      amm:type "/aritype/ident" {
        amm:base "./ident/permission";
      }
    }
  }

  // built-in permissions
  amm:ident execute {
    amm:enum 10;
    description
      "Permission to allow executing specific CTRL objects.
       This includes objects used directly as EXECSET targets,
       indirectly within macros, or as actions of TBR or SBR
       objects.";
    amm:base "./ident/permission";
  }
  amm:ident produce {
    amm:enum 11;
    description
      "Permission to allow producing values from CONST, VAR, or
       EDD objects.
       This includes production for use by reporting or evaluating
       procedures of the Agent.";
    amm:base "./ident/permission";
  }
  amm:ident modify-var {
    amm:enum 12;
    description
      "Permission to allow modifying the value of VAR objects.
       This includes any control which would alter the value,
       but does not affect applications on the Agent directly
       altering the state of an object.";
    amm:base "./ident/permission";
  }
  amm:ident modify-rule-enabled {
    amm:enum 17;
    description
      "Permission to allow modifying the enabled state of
       SBR and TBR objects.
       This includes any control which would alter the state,
       but does not affect Agent-internal logic related to
       init-enabled and max-count fields of a rule.";
    amm:base "./ident/permission";
  }
  amm:ident ensure-odm {
    amm:enum 13;
    description
      "Permission to allow ensuring an ODM exists within an Agent.
       Granting this permission will allow creating a new ODM or
       modifying an existing ODM depending on its starting state.";
    amm:base "./ident/permission";
  }
  amm:ident obsolete-odm {
    amm:enum 14;
    description
      "Permission to allow obsoleting an ODM within an Agent.
       Once an ODM is obsoleted it can no longer be used but
       its identifiers are reserved to prevent inconsistent reuse.";
    amm:base "./ident/permission";
  }
  amm:ident ensure-object {
    amm:enum 15;
    description
      "Permission to allow ensuring an object exists within an ODM.
       Granting this permission will allow creating a new object or
       modifying an existing object depending on its starting state.
       The permission itself does not restrict the type of object,
       but the access list can limit the item to specific object
       types and names.";
    amm:base "./ident/permission";
  }
  amm:ident obsolete-object {
    amm:enum 16;
    description
      "Permission to allow obsoleting an object within an ODM.
       Once an object is obsoleted it can no longer be used but
       its identifiers are reserved to prevent inconsistent reuse.
       The permission itself does not restrict the type of object,
       but the access list can limit the item to specific object
       types and names.";
    amm:base "./ident/permission";
  }

  // Default access permission
  amm:var default-access {
    amm:enum 1;
    description
      "The default permission for any object if no specific access
       are present in the &lt;./EDD/access-list&gt; table.";
    amm:type "./TYPEDEF/permission-list";
  }

  // Access control table and modifier controls
  amm:typedef access-target-filter {
    amm:enum 5;
    description
      "A target object/namespace filter applied using two phases for
       each row:
         1. Substitute the target object or namespace reference for
            &lt;/label/0&gt; items within the value.
            This does not apply recursively to VALUE-OBJ within
            the expression.
         2. Evaluate the expression and consider the target matched
            if the result is a truthy value.
       Only LABEL value 0 is valid.
       Label substitution is performed as described in the value
       production section of the DTNMA AMM document.";
    reference
      "draft-ietf-dtn-amm";
    amm:type "//ietf/amm-base/typedef/EXPR";
  }
  amm:edd access-list {
    amm:enum 2;
    description
      "List the current group--object access.";
    amm:tblt {
      amm:key "access-id";
      amm:column access-id {
        description
          "A unique identifier for this access list item.";
        amm:type "./TYPEDEF/entry-id";
      }
      amm:column group-ids {
        description
          "A cross-reference to the groups getting access, or the
           empty list to match all groups.";
        amm:ulist {
          amm:type "./TYPEDEF/entry-id";
        }
      }
      amm:column objects {
        description
          "A set of filters for target objects or namespaces being
           granted access.
           The filter &lt;/ac/(true)&gt; can be used to match-all target
           objects.";
        amm:type "./typedef/access-target-filter";
      }
      amm:column permissions {
        description
          "References to specific permissions being granted.
           Individual permission references MAY be parameterized
           as necessary.
           The absence of permissions does not grant any access.";
        amm:type "./TYPEDEF/permission-list";
      }
      amm:column added-at {
        description
          "Agent timestamp when this group was added.";
        amm:type "//ietf/amm-base/typedef/timestamp";
      }
      amm:column updated-at {
        description
          "Agent timestamp when this group was added or updated.";
        amm:type "//ietf/amm-base/typedef/timestamp";
      }
    }
  }
  amm:ctrl ensure-access {
    amm:enum 3;
    description
      "Ensures that an access control permission is set for the
       given group and ARI pattern.";
    amm:parameter access-id {
      description
        "A unique identifier for this access list item.";
      amm:type "./TYPEDEF/entry-id";
    }
    amm:parameter group-ids {
      description
        "Identify the groups being assigned the permission,
         or the empty list for all-groups.";
      amm:ulist {
        amm:type "./TYPEDEF/entry-id";
      }
    }
    amm:parameter objects {
      description
        "A set of filters for target objects or namespaces being
         granted access.
         The filter &lt;/ac/(true)&gt; can be used to match-all targets.";
      amm:type "./typedef/access-target-filter";
    }
    amm:parameter permissions {
      description
        "Permissions to grant to the associated group and objects";
      amm:type "./TYPEDEF/permission-list";
    }
  }
  amm:ctrl discard-access {
    amm:enum 4;
    description
      "Discard any access item with the given ID.";
    amm:parameter access-id {
      description
        "Uniquely identify the access";
      amm:type "./TYPEDEF/entry-id";
    }
  }

  //
  // Group management
  //
  amm:typedef group-member-filter {
    amm:enum 4;
    description
      "A member filter applied using two phases for each row:
         1. Substitute a manager identity for &lt;/label/0&gt; items
            within the value.
            This does not apply recursively to VALUE-OBJ within
            the expression.
         2. Evaluate the expression and consider the identity matched
            if the result is a truthy value.
       Only LABEL value 0 is valid.
       Label substitution is performed as described in the value
       production section of the DTNMA AMM document.";
    reference
      "draft-ietf-dtn-amm";
    amm:type "//ietf/amm-base/typedef/EXPR";
  }
  amm:edd current-groups {
    amm:enum 3;
    description
      "Get the group IDs for the current execution context, which may
       include the implicit Agent group ID zero.";
    amm:ulist {
      amm:type "./TYPEDEF/entry-id";
    }
  }
  amm:edd group-list {
    amm:enum 4;
    description
      "Get the defined access control groups.";
    amm:tblt {
      amm:key "group-id";
      amm:column group-id {
        description
          "The unique identifier for a group.
           The agent itself has implicit group ID zero which cannot
           be modified.";
        amm:type "./TYPEDEF/entry-id";
      }
      amm:column name {
        description
          "The human-friendly name of the group.";
        amm:type "//ietf/amm-base/typedef/id-text";
      }
      amm:column members {
        description
          "The list of members of the group, identified by matching
           transport endpoint.";
        amm:type "./typedef/group-member-filter";
      }
      amm:column added-at {
        description
          "Agent timestamp when this group was added.";
        amm:type "//ietf/amm-base/typedef/timestamp";
      }
      amm:column updated-at {
        description
          "Agent timestamp when this group was added or updated.";
        amm:type "//ietf/amm-base/typedef/timestamp";
      }
    }
  }
  amm:ctrl ensure-group {
    amm:enum 5;
    description
      "Ensure that after the control completes a group exists with
       the given information";
    amm:parameter group-id {
      description
        "Uniquely identify the group";
      amm:type "./TYPEDEF/entry-id";
    }
    amm:parameter name {
      description
        "Name of the group";
      amm:type "//ietf/amm-base/typedef/id-text";
    }
  }
  amm:ctrl ensure-group-members {
    amm:enum 7;
    description
      "Ensure that the membership of a group has a specific set of
       endpoint patterns.";
    amm:parameter group-id {
      description
        "Uniquely identify the group";
      amm:type "./TYPEDEF/entry-id";
    }
    amm:parameter members {
      description
        "The list of endpoint patterns denoting group membership";
      amm:type "./typedef/group-member-filter";
    }
  }
  amm:ctrl discard-group {
    amm:enum 6;
    description
      "Discard any group with the given ID.";
    amm:parameter group-id {
      description
        "Uniquely identify the group";
      amm:type "./TYPEDEF/entry-id";
    }
  }
}
</sourcecode>
    </section>
    <section numbered="false" removeInRFC="true">
      <name>Implementation Status</name>
      <t>
[NOTE to the RFC Editor: please remove this section before publication, as well as the reference to <xref target="RFC7942"/>, <xref target="github-dtnma-ace"/>, and <xref target="github-dtnma-adms"/>.]
      </t>
      <t>
This section records the status of known implementations of the
protocol defined by this specification at the time of posting of
this Internet-Draft, and is based on a proposal described in
<xref target="RFC7942"/>.
The description of implementations in this section is
intended to assist the IETF in its decision processes in progressing
drafts to RFCs. Please note that the listing of any individual
implementation here does not imply endorsement by the IETF.
Furthermore, no effort has been spent to verify the information
presented here that was supplied by IETF contributors. This is not
intended as, and must not be construed to be, a catalog of available
implementations or their features. Readers are advised to note that
other implementations can exist.
      </t>
      <t>
A full implementation in Python language of the ADM module encoding and decoding, and for translating between ARI text name and integer enumeration (based on ADM contents) is present in the source repository <xref target="github-dtnma-ace"/>.
This repository includes unit test vectors for verifying ADM module encoding and decoding and is used as the basis of ADM syntax checking and formatting tools in the ADM modules in this document.
      </t>
      <t>
The ADM modules present in Appendix A through D are version controlled in their original form in the repository <xref target="github-dtnma-adms"/>.
      </t>
      <t>
An implementation of the models themselves is part of the C11 language REFDA library managed under the source repository <xref target="github-dtnma-tools"/>.
This project has built-item (executable) testing which exercises the AMM-level interface of the REFDA through sending specific EXECSET values and observing subsequent RPTSET values as well as daemon log events.
      </t>
    </section>
    <section numbered="false" toc="include">
      <name>Acknowledgments</name>
      <t>
The following participants contributed technical material, use cases, and useful thoughts on
the overall approach captured in this document: David Linko, Sarah Heiner, and Jenny Cao of the Johns
Hopkins University Applied Physics Laboratory.
      </t>
    </section>
  </back>
</rfc>
