diff --git a/experimental/ietf-extracted-YANG-modules/ietf-amm@2023-06-08.yang b/experimental/ietf-extracted-YANG-modules/ietf-amm@2023-06-08.yang
index 57dfc3491..8906ba6b9 100644
--- a/experimental/ietf-extracted-YANG-modules/ietf-amm@2023-06-08.yang
+++ b/experimental/ietf-extracted-YANG-modules/ietf-amm@2023-06-08.yang
@@ -1,543 +1,441 @@
module ietf-amm {
namespace "ari:/ietf-amm";
- prefix "amm";
+ prefix amm;
amm:enum "0";
organization
- "IETF Delay Tolerant Networking Working Group";
+ "IETF Delay Tolerant Networking (DTN) Working Group";
contact
"WG Web:
- WG List:
-
- WG Chairs: Brian Haberman
-
- Marc Blanchet
-
-
- Editor: Brian Sipos
- ";
+ WG List:
+ Author: Brian Sipos
+ ";
description
"This module implements the DTN Management Architecture (DTNMA)
- Application Data Model (ADM) base module within YANG";
+ Application Management Model (AMM) extensions within YANG";
reference
"draft-birrane-dtn-adm";
- revision "2023-06-08" {
- description "Updated for latest AMM contents.";
- reference "draft-birrane-dtn-adm";
+ revision 2023-06-08 {
+ description
+ "Updated for latest AMM contents.";
+ reference
+ "draft-birrane-dtn-adm";
}
- revision "2016-04-01" {
- description "Updated to fix typos.";
- reference "draft-bsipos-dtn-amp-yang";
+ revision 2016-04-01 {
+ description
+ "Updated to fix typos.";
+ reference
+ "draft-bsipos-dtn-amp-yang";
}
- revision "2016-03-14" {
- description "Initial draft release.";
- reference "draft-bsipos-dtn-amp-yang";
+ revision 2016-03-14 {
+ description
+ "Initial draft release.";
+ reference
+ "draft-bsipos-dtn-amp-yang";
}
/****
* This section contains extension for AMM object definitions
****/
-
// This group of extensions are for common behavior for AMM objects
+
extension enum {
- argument "value";
+ argument value;
description
"An enumeration identifies an object within a namespace.
- The argument to this statement is the integer value.";
+ 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 parameters {
+
+ extension init-expr {
+ argument expr;
description
- "A container for the formal parameters for an object.
- Each substatement is a parameter as either a leaf (ARI)
- or container (AC).
- Order of parameters is signifigant within this statement.";
+ "An expression evaluated to initialize a VAR object.
+ The argument is the text form of the EXPR AC";
}
// This group are AMM object keywords and their parameters
- extension const {
- argument "name";
+
+ extension typedef {
+ argument name;
description
- "Definition of a CONST within an ADM.
- The argument to this statement is the object name.
- A 'value' substatement must be present.";
+ "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 base {
+ argument name;
+ description
+ "The argument is the base of an IDENT object.";
}
- extension value {
- argument "ari";
+
+ extension const {
+ argument name;
description
- "The literal value of a CONST object.
- The argument is the text form of the ARI";
+ "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";
+ argument name;
description
"Definition of a CTRL within an ADM.
- The argument to this statement is the object name.";
+ The argument to this statement is the object name.";
}
+
extension result {
+ argument name;
description
- "An result value reported as a response to a control.
- The substatement is the result value as either a leaf (ARI)
- or container (AC).
- Each CTRL can have a single optional result.";
+ "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";
+ argument name;
description
"Definition of an EDD within an ADM.
- The argument to this statement is the object name.";
+ The argument to this statement is the object name.";
}
extension oper {
- argument "name";
+ argument name;
description
"Definition of an OPER within an ADM.
- The argument to this statement is the object name.";
+ The argument to this statement is the object name.";
}
- extension operands {
+
+ 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).
- Order of operands is signifigant within an object definition.";
+ during evaluation of the OPER.
+ Each substatement is an operand as a leaf (ARI).
+ Order of operands is significant within an object definition.";
}
extension var {
- argument "name";
+ argument name;
description
"Definition of a VAR within an ADM.
- The argument to this statement is the object name.";
- }
- extension init {
- argument "expr";
- description "An EXPR value used to initialize a VAR.";
+ The argument to this statement is the object name.";
}
/****
* This section contains ARI (literal and object-reference) value types.
****/
+ extension type {
+ argument name;
+ description
+ "A reference to a built-in type or prefix-qualified typedef.";
+ }
+
extension int-labels {
description
"Type narrowing for an INTEGER to label enum values or bit positions.";
}
+
extension cddl {
- argument "text";
+ 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.";
+ The argument to this statement is the actual CDDL text.";
}
- // Simple literal types as YANG typedefs
- typedef NULL {
- type enumeration {
- enum null {
- description "The only allowed value.";
- }
- }
- description
- "A single-valued type to represent a null value.";
- }
- typedef BOOL {
- type boolean;
- description
- "The same semantics as the YANG 'boolean' type.";
- }
- typedef BYTE {
- type uint8;
- description
- "The same semantics as the YANG 8-bit unsigned type.";
- }
- typedef UINT {
- type uint32;
- description
- "The same semantics as the YANG 32-bit unsigned type.
- Can contain an 'int-labels' substatement for documentation.";
- }
- typedef INT {
- type int32;
- description
- "The same semantics as the YANG 32-bit signed type.
- Can contain an 'int-labels' substatement for documentation.";
- }
- typedef UVAST {
- type uint64;
+ extension ulist {
description
- "The same semantics as the YANG 64-bit unsigned type.
- Can contain an 'int-labels' substatement for documentation.";
+ "Type for an AC containing a list of uniform-typed values.";
}
- typedef VAST {
- type int64;
- description
- "The same semantics as the YANG 64-bit signed type.
- Can contain an 'int-labels' substatement for documentation.";
- }
- typedef REAL32 {
- type decimal64 {
- fraction-digits 10;
- }
- description
- "An IEEE-754 float32 value with a text representation in YANG.
- The ARI representation is different than the YANG type used here.
- Allows range restriction.";
- }
- typedef REAL64 {
- type decimal64 {
- fraction-digits 10;
- }
- description
- "An IEEE-754 float64 value with a text representation in YANG.
- The ARI representation is different than the YANG type used here.
- Allows range restriction.";
- }
- typedef TEXTSTR {
- type string;
- description
- "The same semantics as the YANG 'string' type.
- Allows length and pattern restriction.";
- }
- typedef BYTESTR {
- type binary;
- description
- "The same semantics as the YANG 'binary' type.
- Allows length restriction.";
- }
- typedef TP {
- type string;
- description
- "An absolute instant in time.
- The ARI representation is different than the YANG type used here.
- This is represented as either (narrowed RFC 3339) text or
- (fractional) seconds from the DTN epoch.";
- }
- typedef TD {
- type string;
+
+ extension dlist {
description
- "A relative time as a difference between two time instants.
- The ARI representation is different than the YANG type used here.
- This is represented as either (narrowed RFC 3339) text or
- (fractional) seconds.";
+ "Type for an AC containing a list of diverse-typed sequences.";
}
- typedef LITTYPE {
- type string;
+
+ extension seq {
description
- "An enumeration from IANA table of literal types.";
+ "A sequence of uniform-typed values within a 'dlist'.";
}
- typedef LABEL {
- type string {
- pattern "[a-zA-Z_][a-zA-Z0-9_\\-\\.]*";
- }
+
+ extension tblt {
description
- "An identifier label which fits the YANG 'identifier' pattern.";
+ "Type for a table of values with a column schema.";
}
- typedef CBOR {
- type BYTESTR;
+
+ extension column {
+ argument name;
description
- "A bytestr which contains a single well-formed CBOR item.
- Can contain a 'cddl' substatement for documentation.";
+ "Type for a table of values with a column schema.";
}
- // Complex literals
- typedef AC {
- type string;
+ extension key {
+ argument columns;
description
- "When present within an ADM this uses the text encoding of an ARI Collection (AC).";
+ "Names of columns composing the row key.";
}
- typedef AM {
- type string;
+
+ extension unique {
+ argument columns;
description
- "When present within an ADM this uses the text encoding of an ARI Map (AM).";
+ "Names of columns composing a uniqueness constraint.";
}
- // Object references
- typedef OBJ-REF {
- type string;
+ extension union {
description
- "A text representation of an ARI containing an object reference.";
- }
- typedef TYPEDEF-REF {
- type OBJ-REF;
- description "A reference to a TYPEDEF object.";
- }
- typedef CONST-REF {
- type OBJ-REF;
- description "A reference to a CONST object.";
- }
- typedef CTRL-REF {
- type OBJ-REF;
- description "A reference to a CTRL object.";
- }
- typedef EDD-REF {
- type OBJ-REF;
- description "A reference to an EDD object.";
- }
- typedef OPER-REF {
- type OBJ-REF;
- description "A reference to a OPER object.";
- }
- typedef SBR-REF {
- type OBJ-REF;
- description "A reference to an SBR object.";
- }
- typedef TBR-REF {
- type OBJ-REF;
- description "A reference to a TBR object.";
- }
- typedef VAR-REF {
- type OBJ-REF;
- description "A reference to a VAR object.";
+ "Type for a union of other types.";
}
// Named type unions for literals
- typedef TYPE-REF {
- type union {
- type LITTYPE;
- type TYPEDEF-REF;
+ amm:typedef TYPE-REF {
+ amm:union {
+ amm:type LITTYPE;
+ amm:type TYPEDEF-REF;
}
description
"Reference to either a literal type or a typedef.";
}
- typedef INTEGER {
- type union {
- type BYTE;
- type UINT;
- type INT;
- type UVAST;
- type VAST;
+ amm:typedef INTEGER {
+ amm:union {
+ amm:type BYTE;
+ amm:type UINT;
+ amm:type INT;
+ amm:type UVAST;
+ amm:type VAST;
}
description
"Any type which represents a discrete integer.";
}
- typedef FLOAT {
- type union {
- type REAL32;
- type REAL64;
+ amm:typedef FLOAT {
+ amm:union {
+ amm:type REAL32;
+ amm:type REAL64;
}
description
"Any type which represents a floating point number.";
}
- typedef NUMERIC {
- type union {
- type INTEGER;
- type FLOAT;
+ amm:typedef NUMERIC {
+ amm:union {
+ amm:type INTEGER;
+ amm:type FLOAT;
}
description
"Any type which can be used with numeric expressions.";
}
- typedef TIME {
- type union {
- type TP;
- type TD;
+ amm:typedef TIME {
+ amm:union {
+ amm:type TP;
+ amm:type TD;
}
description
"Any type which can be used with time expressions.";
}
- typedef SIMPLE {
- type union {
- type NULL;
- type BOOL;
- type NUMERIC;
- type TEXTSTR;
- type BYTESTR;
- type TIME;
- type LABEL;
- type CBOR;
+ amm:typedef SIMPLE {
+ amm:union {
+ amm:type NULL;
+ amm:type BOOL;
+ amm:type NUMERIC;
+ amm:type TEXTSTR;
+ amm:type BYTESTR;
+ amm:type TIME;
+ amm:type LABEL;
+ amm:type CBOR;
}
description
- "Any type which contains a single value usable within an expression.";
+ "Any type which contains a single literal value (not complex).";
}
- typedef COMPLEX {
- type union {
- type AC;
- type AM;
+ amm:typedef COMPLEX {
+ amm:union {
+ amm:type AC;
+ amm:type AM;
}
description
"A literal type which is not SIMPLE.";
}
- typedef LITERAL {
- type union {
- type TYPE-REF; //FIXME: is typeref a literal or something else?
- type SIMPLE;
- type COMPLEX;
+ amm:typedef LITERAL {
+ amm:union {
+ amm:type TYPE-REF; //FIXME: is typeref a literal or something else?
+ amm:type SIMPLE;
+ amm:type COMPLEX;
}
description
"Any type which is represented as a literal ARI.";
}
-
- typedef ANY {
- type union {
- type LITERAL;
- type OBJ-REF;
+ amm:typedef ANY {
+ amm:union {
+ amm:type LITERAL;
+ amm:type OBJECT;
}
description
"Any type representable by an ARI.";
}
- typedef VALUE-REF {
- type union {
- type CONST-REF;
- type EDD-REF;
- type VAR-REF;
+ amm:typedef VALUE-OBJ {
+ amm:union {
+ amm:type CONST;
+ amm:type EDD;
+ amm:type VAR;
}
description
"A reference to an object which can produce a value.";
}
// operational semantic types
- typedef counter32 {
- type UINT;
+ amm:typedef counter32 {
+ amm:type UINT;
description
"A 32-bit counter with an arbitrary initial value that only increments.
- When the value reaches the upper range it wraps around to zero.
- At least two samples of this value need to be compared over time.";
+ When the value reaches the upper range it wraps around to zero.
+ At least two samples of this value need to be compared over time.";
}
- typedef counter64 {
- type UVAST;
+ amm:typedef counter64 {
+ amm:type UVAST;
description
"A 64-bit counter with an arbitrary initial value that only increments.
- When the value reaches the upper range it wraps around to zero.
- At least two samples of this value need to be compared over time.";
+ When the value reaches the upper range it wraps around to zero.
+ At least two samples of this value need to be compared over time.";
}
- typedef gauge32 {
- type INT;
+ amm:typedef gauge32 {
+ amm:type INT;
description
"A 32-bit value sampling some quantized measurement.
- The value can increase or decrease arbitrarily over time.";
+ The value can increase or decrease arbitrarily over time.";
}
- typedef gauge64 {
- type VAST;
+ amm:typedef gauge64 {
+ amm:type VAST;
description
"A 64-bit value sampling some quantized measurement.
- The value can increase or decrease arbitrarily over time.";
+ The value can increase or decrease arbitrarily over time.";
}
- typedef timestamp {
- type TP;
+ amm:typedef timestamp {
+ amm:type TP;
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.";
+ occurrence happened.
+ The specific occurrence must be defined in the description
+ of any node defined using this type.";
}
// Restrictions on AC item types for specific purposes
- typedef EXPR-item {
- type union {
- type SIMPLE;
- type VALUE-REF;
- type TYPEDEF-REF;
- type OPER-REF;
+ amm:typedef EXPR-item {
+ amm:union {
+ amm:type SIMPLE;
+ amm:type VALUE-OBJ;
+ amm:type TYPEDEF;
+ amm:type OPER;
}
description
"Each item of an EXPR list.
- The value-object must be typed to contain a SIMPLE.";
+ The value-object must be typed to contain a SIMPLE.";
}
- grouping EXPR {
- leaf-list _ {
- type EXPR-item;
- description "All items are the same type.";
+ amm:typedef EXPR {
+ amm:ulist {
+ amm:type EXPR-item;
}
- description "The contents of an EXPR container.";
+ description
+ "The contents of an EXPR container.";
}
- typedef EXEC-REF {
- type union {
- type VALUE-REF;
- type CTRL-REF;
+ amm:typedef EXEC-item {
+ amm:union {
+ amm:type VALUE-OBJ;
+ amm:type CTRL;
}
description
"A reference to an object which can be executed.
- The value-object must be typed to contain a MAC.";
+ The value-object must be typed to contain a MAC.";
}
- grouping MAC {
- leaf-list _ {
- type EXEC-REF;
- description "All items are the same type.";
- }
- description "The contents of a MAC container.";
- }
-
- grouping RPTT-item {
- choice item {
- case value-ref {
- leaf ref {
- type VALUE-REF;
- description "An object to produce a report value.";
- }
- }
- case expr {
- container expr {
- uses EXPR;
- description "An expression to evaluate into a report value.";
- }
- }
- description
- "Each item references a value-producing object or contains an
- expression to be evaluated.";
+ amm:typedef MAC {
+ amm:ulist {
+ amm:type EXEC-item;
}
description
- "Each item of a RPTT.";
+ "The contents of a MAC container.";
}
- grouping RPTT {
- container _ {
- uses RPTT-item;
- description "The sequence of items in the template.";
+ amm:typedef RPTT-item {
+ amm:union {
+ amm:type VALUE-OBJ;
+ amm:type EXPR;
}
description
- "The contents of a report template, encoded as the sequence of items.";
+ "Each item of a RPTT.
+ Each item references a value-producing object or contains an
+ expression to be evaluated.";
}
- grouping RPT-items {
- leaf-list item {
- type ANY;
- description "The sequence of items in the report.";
+ amm:typedef RPTT {
+ amm:ulist {
+ amm:type RPTT-item;
}
description
- "The contents of a report, encoded as the sequence of values reported.
- The semantics of each item are contained in the associated RPTT.";
+ "The contents of a report template, encoded as the sequence of items.";
}
- grouping TBL {
- leaf col-count {
- type UVAST;
- description "The number of columns in the table.";
- }
- leaf-list tbl-item {
- type ANY;
- description
- "All table values listed in row-major order.";
+ amm:typedef RPT {
+ amm:dlist {
+ amm:type VALUE-OBJ {
+ description
+ "Reference to the reported object.";
+ }
+ amm:type timestamp {
+ description
+ "The generation timestamp.";
+ }
+ amm:seq {
+ amm:type ANY;
+ description
+ "The sequence of items in the report.";
+ }
}
description
- "The flattened contents of a table.
- The semantics of each column are contained in the associated TBLT.";
+ "The source and contents of a report, encoded as the sequence
+ of values reported.
+ The semantics of each item are contained in the associated
+ source object (RPTT or CTRL).";
}
- grouping RPT {
- leaf source {
- type OBJ-REF;
- description "Reference to the reported object.";
- }
- leaf generated-at {
- type timestamp;
- description "The generation timestamp.";
- }
- choice entries {
- case value-ref {
- leaf value {
- type ANY;
- }
- }
- case rptt {
- uses RPT-items;
+ amm:typedef TBL {
+ amm:dlist {
+ amm:type UVAST {
+ description
+ "The number of columns in the table.";
}
- case tblt {
- uses TBL;
+ amm:seq {
+ amm:type ANY;
+ description
+ "All table values listed in row-major order.";
}
- case ctrl-ref {
- leaf result {
- type ANY;
- }
- }
- description
- "Each report content depends on the reported object.";
}
- description "The contents of an RPT container.";
+ description
+ "The flattened contents of a table.
+ The semantics of each column are contained in the associated TBLT.";
}
}
diff --git a/experimental/ietf-extracted-YANG-modules/ietf-dtnma-agent@2023-06-08.yang b/experimental/ietf-extracted-YANG-modules/ietf-dtnma-agent@2023-06-08.yang
index 83c979d89..67e1b7605 100644
--- a/experimental/ietf-extracted-YANG-modules/ietf-dtnma-agent@2023-06-08.yang
+++ b/experimental/ietf-extracted-YANG-modules/ietf-dtnma-agent@2023-06-08.yang
@@ -1,63 +1,60 @@
module ietf-dtnma-agent {
namespace "ari:/ietf-dtnma-agent";
- prefix "da";
+ prefix da;
+ amm:enum "0";
- import "ietf-amm" {
+ import ietf-amm {
prefix amm;
}
organization
- "IETF Delay Tolerant Networking Working Group";
+ "IETF Delay Tolerant Networking (DTN) Working Group";
contact
"WG Web:
- WG List:
- WG Chairs: Brian Haberman
-
- Marc Blanchet
-
-
- Editor: Brian Sipos
- ";
+ WG List:
+ Editor: Brian Sipos
+ ";
description
"This module implements the DTN Management Architecture (DTNMA)
- Agent core functionality.";
+ Agent core functionality.";
reference
"draft-birrane-dtn-adm";
- revision "2023-06-08" {
- description "Updated for latest AMM contents.";
- reference "draft-birrane-dtn-adm";
+ revision 2023-06-08 {
+ description
+ "Updated for latest AMM contents.";
+ reference
+ "draft-birrane-dtn-adm";
}
- amm:enum "0";
feature rules {
description
"Conforming to this feature enables time-based and
- state-based autonomy rules.";
+ state-based autonomy rules.";
}
amm:edd amp_version {
- leaf _ {
- type amm:TEXTSTR;
- }
- description "The version of AMP which this agent supports.";
+ amm:type TEXTSTR;
+ description
+ "The version of AMP which this agent supports.";
}
amm:edd capability {
- list columns {
- key adm_name;
-
- leaf adm_name {
- type amm:LABEL;
- description "The module name of the ADM";
+ amm:tblt {
+ amm:key "adm_name";
+ amm:column adm_name {
+ amm:type amm:LABEL;
+ description
+ "The module name of the ADM";
}
- leaf revision {
- type amm:TEXTSTR;
- description "The specific revision the agent supports.";
+ amm:column revision {
+ amm:type amm:TEXTSTR;
+ description
+ "The specific revision the agent supports.";
}
- container features {
- leaf-list _ {
- type amm:LABEL;
+ amm:column features {
+ amm:ulist {
+ amm:type amm:LABEL;
}
description
"The features of the ADM which the agent supports.";
@@ -67,104 +64,101 @@ module ietf-dtnma-agent {
"A table to indicate the ADM capability of the sending agent.";
}
amm:const hello {
- uses amm:RPTT;
- amm:value "(../EDD/amp_version,../EDD/capability)";
+ amm:type amm:RPTT;
+ amm:init-value "(../EDD/amp_version,../EDD/capability)";
description
"A report template to indicate the presence of an agent
- on a network.";
+ on a network.";
}
// MAC helper controls
amm:ctrl if_then_else {
- amm:parameters {
- container condition {
- uses amm:EXPR;
- description "The condition to evaluate.";
- }
- leaf on_truthy {
- type amm:EXEC-REF;
- description "The object to execute when the condition is truthy.";
- }
- leaf on_falsy {
- type union {
- type amm:NULL;
- type amm:EXEC-REF;
- }
- default "null";
- description "An optional execution when the condition is falsey.";
+ amm:parameter condition {
+ amm:type amm:EXPR;
+ description
+ "The condition to evaluate.";
+ }
+ amm:parameter on_truthy {
+ amm:type amm:EXEC-REF;
+ description
+ "The object to execute when the condition is truthy.";
+ }
+ amm:parameter on_falsy {
+ amm:union {
+ amm:type amm:NULL;
+ amm:type amm:EXEC-REF;
}
+ amm:default "null";
+ description
+ "An optional execution when the condition is falsey.";
}
description
"Evaluate an expression and follow one of two branches of
- further evaluation.";
+ further evaluation.";
}
amm:ctrl catch {
- amm:parameters {
- leaf try {
- type amm:EXEC-REF;
- description "The object to execute.";
- }
- leaf on_failure {
- type union {
- type amm:NULL;
- type amm:EXEC-REF;
- }
- default "null";
- description "An optional execution after failure.";
+ amm:parameter try {
+ amm:type amm:EXEC-REF;
+ description
+ "The object to execute.";
+ }
+ amm:parameter on_failure {
+ amm:union {
+ amm:type amm:NULL;
+ amm:type amm:EXEC-REF;
}
+ amm:default "null";
+ description
+ "An optional execution after failure.";
}
description
"Attempt to execute an object, and if there is some failure catch it
- and execute an alternative object.";
+ and execute an alternative object.";
}
-
amm:ctrl inspect {
- amm:parameters {
- leaf ref {
- type amm:VALUE-REF;
- description "An object to produce a value from.";
- }
+ amm:parameter ref {
+ amm:type amm:VALUE-REF;
+ description
+ "An object to produce a value from.";
}
- amm:result {
- leaf val {
- type amm:ANY;
- description "The produced value.";
- }
+ amm:result val {
+ amm:type amm:ANY;
+ description
+ "The produced value.";
}
description
"Produce a result value to inspect the agent state.
- This does not perform any EXPR evaluation or RPTT handling.";
+ This does not perform any EXPR evaluation or RPTT handling.";
}
-
amm:ctrl report_on {
- amm:parameters {
- uses amm:RPTT-item;
+ amm:parameter rptt {
+ amm:type amm:RPTT;
}
description
- "Generate a report on an object without needing to define a RPTT.
- The parameter is a single item that would be in a RPTT.
- If used for more than one-shot diagnostics, defining a RPTT
- (e.g. in a VAR) is more efficient because the RPTT item would not
- be present in the report.";
+ "Generate a report on an object without needing to define an object.
+ 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 VAR) is more efficient because the RPTT item would not
+ be present in the report.";
}
grouping obj-list-params {
- leaf include_adm {
- type amm:BOOL;
- default "false";
- description "If true, listings will include objects from ADMs";
+ amm:parameter include_adm {
+ amm:type amm:BOOL;
+ amm:default "false";
+ description
+ "If true, listings will include objects from ADMs";
}
- description "Common parameters for object listing";
+ description
+ "Common parameters for object listing";
}
amm:edd typedef_list {
- amm:parameters {
- uses obj-list-params;
- }
- list _ {
- key obj;
- leaf obj {
- type amm:TYPEDEF-REF;
+ uses obj-list-params;
+ amm:tblt {
+ amm:key "obj";
+ amm:column obj {
+ amm:type amm:TYPEDEF-REF;
}
}
description
@@ -173,204 +167,182 @@ module ietf-dtnma-agent {
// Objects related to VAR handling
amm:edd var_list {
- amm:parameters {
- uses obj-list-params;
- }
- list _ {
- key obj;
- leaf obj {
- type amm:VAR-REF;
+ uses obj-list-params;
+ amm:tblt {
+ amm:key "obj";
+ amm:column obj {
+ amm:type amm:VAR-REF;
}
- leaf type {
- type amm:TYPE-REF;
+ amm:column type {
+ amm:type amm:TYPE-REF;
}
}
description
"A table of VAR within the agent.";
}
amm:ctrl var_present {
- amm:parameters {
- leaf obj {
- type amm:VAR-REF;
- description
- "A reference to a VAR within an ODM only.";
- }
- leaf type {
- type amm:TYPE-REF;
- description
- "The type for the VAR object.";
- }
- choice init {
- case without {
- leaf _ {
- type amm:NULL;
- }
- }
- case with {
- container expr {
- uses amm:EXPR;
- }
- }
- default "null";
- description "An optional initializer expression.";
+ amm:parameter obj {
+ amm:type amm:VAR-REF;
+ description
+ "A reference to a VAR within an ODM only.";
+ }
+ amm:parameter type {
+ amm:type amm:TYPE-REF;
+ description
+ "The type for the VAR object.";
+ }
+ amm:parameter init {
+ amm:union {
+ amm:type amm:NULL;
+ amm:type amm:EXPR;
}
+ amm:default "null";
+ description
+ "An optional initializer expression.";
}
description
"Ensure a specific VAR is present.";
}
amm:ctrl var_absent {
- amm:parameters {
- leaf obj {
- type amm:VAR-REF;
- description
- "A reference to a VAR within an ODM only.";
- }
+ amm:parameter obj {
+ amm:type amm:VAR-REF;
+ description
+ "A reference to a VAR within an ODM only.";
}
description
"Ensure a specific VAR is not present.";
}
// Objects related to SBR handling
- grouping sbr-fields {
- container action {
- uses amm:MAC;
- description
- "The execution when this rule triggers.";
- }
- leaf start_time {
- type amm:TIME;
- }
- container condition {
- uses amm:EXPR;
- }
- leaf min_interval {
- type amm:TD;
- }
- leaf max_count {
- type amm:UVAST;
- }
- }
amm:edd sbr_list {
- if-feature rules;
- list _ {
- key obj;
-
- leaf obj {
- type amm:SBR-REF;
+ if-feature "rules";
+ amm:tblt {
+ amm:key "obj";
+ amm:column obj {
+ amm:type amm:SBR-REF;
+ }
+ amm:column action {
+ amm:type amm:MAC;
+ description
+ "The execution when this rule triggers.";
+ }
+ amm:column start_time {
+ amm:type amm:TIME;
+ }
+ amm:column condition {
+ amm:type amm:EXPR;
+ }
+ amm:column min_interval {
+ amm:type TD;
+ }
+ amm:column max_count {
+ amm:type UVAST;
}
- uses sbr-fields;
}
}
-
amm:edd tbr_list {
- if-feature rules;
- list _ {
- key obj;
-
- leaf obj {
- type amm:OBJ-REF;
+ if-feature "rules";
+ amm:tblt {
+ amm:key "obj";
+ amm:column obj {
+ amm:type amm:OBJ-REF;
}
- container action {
- uses amm:MAC;
+ amm:column action {
+ amm:type amm:MAC;
description
"The execution when this rule triggers.";
}
- leaf start_time {
- type amm:TIME;
+ amm:column start_time {
+ amm:type amm:TIME;
}
- leaf period {
- type amm:TD;
+ amm:column period {
+ amm:type TD;
}
- leaf max_count {
- type amm:UVAST;
+ amm:column max_count {
+ amm:type UVAST;
}
}
}
- grouping numeric-unary {
- leaf val {
- type amm:NUMERIC;
- description "The single value.";
+ grouping numeric-unary-operands {
+ amm:operand val {
+ amm:type amm:NUMERIC;
+ description
+ "The single value.";
}
}
- grouping numeric-binary {
- leaf left {
- type amm:NUMERIC;
- description "The left-side operand.";
+
+ grouping numeric-binary-operands {
+ amm:operand left {
+ amm:type amm:NUMERIC;
+ description
+ "The left-side operand.";
}
- leaf right {
- type amm:NUMERIC;
- description "The left-side operand.";
+ amm:operand right {
+ amm:type amm:NUMERIC;
+ description
+ "The left-side operand.";
}
}
- amm:oper negate {
- amm:operands {
- uses numeric-unary;
- }
- amm:result {
- uses numeric-unary;
+
+ grouping numeric-unary-result {
+ amm:result val {
+ amm:type amm:NUMERIC;
+ description
+ "The single value.";
}
+ }
+
+ amm:oper negate {
+ uses numeric-unary-operands;
+ uses numeric-unary-result;
description
"Negate a value.
- This is equivalent to multiplying by -1 but a shorter
- expression.";
+ This is equivalent to multiplying by -1 but a shorter
+ expression.";
}
amm:oper add {
- amm:operands {
- uses numeric-binary;
- }
- amm:result {
- uses numeric-unary;
- }
+ uses numeric-binary-operands;
+ uses numeric-unary-result;
description
"Add two numeric values.
- The operands are cast to the least compatible numeric type
- before the arithmetic.";
+ The operands are cast to the least compatible numeric type
+ before the arithmetic.";
}
+
// amm:oper sub
// amm:oper multiply
// amm:oper divide
// amm:oper add
-
// amm:oper bit_not
// amm:oper bit_and
// amm:oper bit_or
// amm:oper bit_xor
-
// amm:oper bool_not
// amm:oper bool_and
// amm:oper bool_or
// amm:oper bool_xor
-
// amm:oper compare_eq
// amm:oper compare_ne
// amm:oper compare_gt
// amm:oper compare_ge
amm:oper compare_lt {
- amm:operands {
- uses numeric-binary;
- }
- amm:result {
- uses numeric-unary;
- }
+ uses numeric-binary-operands;
+ uses numeric-unary-result;
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.";
+ 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.";
}
amm:oper compare_le {
- amm:operands {
- uses numeric-binary;
- }
- amm:result {
- uses numeric-unary;
- }
+ uses numeric-binary-operands;
+ uses numeric-unary-result;
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.";
+ 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.";
}
}