Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/base-adms-yang' into sipos-adm-v…
Browse files Browse the repository at this point in the history
…alidate
  • Loading branch information
BrianSipos committed Aug 6, 2024
2 parents 68cc274 + 705fc32 commit b82b259
Show file tree
Hide file tree
Showing 4 changed files with 681 additions and 459 deletions.
178 changes: 178 additions & 0 deletions iana-display-hints.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
module iana-display-hints {
yang-version 1.1;
namespace "ari://iana-display-hints";
prefix ianadh;

import ietf-amm {
prefix amm;
}

organization
"IANA";
contact
"WG Web: <http://tools.ietf.org/wg/dtn/>
WG List: <mailto:dtn@ietf.org>
Editor: Brian Sipos
<mailto:brian.sipos+ietf@gmail.com>";
description
"This module defines intermediate and leaf IDENT objects usable as
display-hint annotations derived from the base
<ari://ietf-amm/IDENT/display-hint> 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) 2024 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
The initial 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 2024-07-20 {
description
"Updated for latest ADM document.";
reference
"draft-ietf-dtn-adm-yang";
}
amm:enum 0;

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

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

// Byte-string hints
amm:ident base-bstr {
amm:enum 9;
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:base "//ietf-amm/IDENT/display-hint";
}
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/IDENT/base-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/IDENT/base-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/IDENT/base-bstr";
}
amm:ident display-bstr-ipaddress {
amm:enum 16;
description
"Display byte string values as either IPv4 address (4-octet length)
or IPv6 address (16-octet length).";
reference
"RFC 4001: Textual Conventions for Internet Network Addresses";
amm:base "//ietf-amm/IDENT/base-bstr";
}

// TIME type (TP or TD built-ins) hints
amm:ident base-time {
amm:enum 13;
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:base "//ietf-amm/IDENT/display-hint";
}
amm:ident display-time-text {
amm:enum 14;
description
"Display TP and TD values as text in accordance with RFC 3339.";
reference
"draft-ietf-dtn-ari";
amm:base "//ietf-amm/IDENT/base-time";
}
amm:ident display-time-dec {
amm:enum 15;
description
"Display TP and TD values as decimal fraction.";
reference
"draft-ietf-dtn-ari";
amm:base "//ietf-amm/IDENT/base-time";
}
}
Loading

0 comments on commit b82b259

Please sign in to comment.