module ietf-yang-semver {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-semver";
prefix ysver;
rev:revision-label-scheme "yang-semver";
import ietf-yang-revisions {
prefix rev;
}
organization
"IETF NETMOD (Network Modeling) Working Group";
contact
"WG Web:
WG List:
Author: Joe Clarke
Author: Robert Wilton
Author: Reshad Rahman
Author: Balazs Lengyel
Author: Jason Sterne
Author: Benoit Claise
";
description
"This module provides type and grouping definitions for YANG
packages.
Copyright (c) 2021 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 Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.";
// RFC Ed.: update the date below with the date of RFC publication
// and remove this note.
// RFC Ed.: replace XXXX with actual RFC number and remove this
// note.
// RFC Ed. update the rev:revision-label to "1.0.0".
revision 2021-11-04 {
rev:revision-label "1.0.0-draft-ietf-netmod-yang-semver-05";
description
"Initial revision";
reference
"RFC XXXX: YANG Semantic Versioning.";
}
/*
* Identities
*/
identity yang-semver {
base rev:revision-label-scheme-base;
description
"The revision-label scheme corresponds to the YANG Semver scheme
which is defined by the pattern in the 'version' typedef below.
The rules governing this revision-label scheme are defined in the
reference for this identity.";
reference
"RFC XXXX: YANG Semantic Versioning.";
}
/*
* Typedefs
*/
typedef version {
type rev:revision-label {
pattern '[0-9]+[.][0-9]+[.][0-9]+(_(non_)?compatible)?'
+ '(-[A-Za-z0-9.-]+[.-][0-9]+)?([+][A-Za-z0-9.-]+)?';
}
description
"Represents a YANG semantic version. The rules governing the
use of this revision label scheme are defined in the reference for
this typedef.";
reference
"RFC XXXX: YANG Semantic Versioning.";
}
}