module ietf-lmo-feature {
namespace "urn:ietf:params:xml:ns:yang:ietf-lmo-feature";
prefix ietf-lmo-feature;
import ietf-lmo-common {
prefix ietf-lmo-common;
}
import ietf-lmo {
prefix ietf-lmo;
}
organization
"IETF OPSA (Operations and Management Area) Working Group";
contact
"WG Web:
WG List:
Editor: Marisol Palmero
Editor: Josh Suhr
Editor: Sudhendu Kumar
";
description
"This YANG module includes the different attributes that define
description, usage and resource consumption for specific
features or capabilities of assets.
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
(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.";
revision 2022-09-20 {
description
"fixed YANG statements";
reference
"RFC XXXX: LMO YANG Model";
}
revision 2022-07-07 {
description
"fixed YANG statements";
reference
"RFC XXXX: LMO YANG Model";
}
revision 2022-02-28 {
description
"Introduced flexible root structure";
reference
"RFC XXXX: LMO YANG Model";
}
revision 2021-10-25 {
description
"Initial revision for Product Usage Module as part of the
LMO YANG Model";
reference
"RFC XXXX: LMO YANG Model";
}
identity feature {
base ietf-lmo-common:lmo-class;
description
"A feature is a class of lmo that represents
options or functional capabilities available in an asset";
}
augment /ietf-lmo:lmos/ietf-lmo:lmo/ietf-lmo:inst {
when "derived-from-or-self(../ietf-lmo:lmo-class, 'ietf-lmo-asset:asset')";
description
"feature attributes related to assets";
container features {
description
"Features to be part of an asset";
list feature {
key "lmo-class id";
description
"Subfeature ID";
leaf lmo-class {
type leafref {
path "/ietf-lmo:lmos/ietf-lmo:lmo/ietf-lmo:lmo-class";
}
must "derived-from-or-self(current(), 'ietf-lmo-feature:feature')";
description
"Reference to lmo-class";
}
leaf id {
type leafref {
path "/ietf-lmo:lmos/ietf-lmo:lmo[ietf-lmo:lmo-class = current()/../lmo-class]/ietf-lmo:inst/ietf-lmo:id";
}
description
"Reference to Feature ID";
}
}
}
// Fill more leafs for license when organization module is present here...
}
augment /ietf-lmo:lmos/ietf-lmo:lmo/ietf-lmo:inst {
when "derived-from-or-self(../ietf-lmo:lmo-class, 'ietf-lmo-feature:feature')";
description
"feature attributes";
leaf name {
type string;
description
"Friendly name of the feature";
}
leaf summary {
type string;
description
"Brief description of the feature";
}
leaf category {
type string;
description
"Feature category or tag list (as applicable to the
product)";
}
leaf entitlement {
type string;
description
"Minimum entitlement level, subscription, or license level
required for the feature";
}
leaf first-available-version {
type string;
description
"The first version in which this feature was enabled";
}
container backported-versions {
config false;
description
"software patch or update is taken from a recent software
version and applied to an older version of the same
software";
list backported-version {
config false;
description
"Backport releases to older release";
leaf version {
type identityref {
base ietf-lmo-common:version;
}
description
"version of the backport release";
}
}
}
leaf scope {
type identityref {
base ietf-lmo-common:feature-scope;
}
description
"Optional tag that could apply to any of the usage
features, so that if there are multiple dimensions of
reporting that need to be accommodated (i.e., report
feature usage by 'site')";
}
list config-options {
key "id";
description
"Feature configuration profile - optional, for features
that require configuration beyond enable/disable";
leaf id {
type string;
description
"Identify feature configuration option uniquely across
all products";
}
leaf name {
type string;
description
"Friendly name of the feature option";
}
leaf summary {
type string;
description
"Brief description of the feature option";
}
list characteristic {
key "id";
description
"Characteristics of feature configuration options,
i.e. value=enabled/disabled";
leaf id {
type string;
description
"Identifier for feature option configuration
characteristic";
}
leaf name {
type string;
description
"Friendly name for feature option configuration
characteristic";
}
leaf value {
type string;
description
"Configuration characteristic value; describes how
this feature option characteristic is configured";
}
}
}
container asset{
description
"Asset that this feature is attached to";
leaf lmo-class {
type leafref {
path "/ietf-lmo:lmos/ietf-lmo:lmo/ietf-lmo:lmo-class";
}
must "derived-from-or-self(current(), 'ietf-lmo-asset:asset')";
default ietf-lmo-asset:asset;
description
"Asset class to which this feature is attached";
}
leaf id {
type leafref {
path "/ietf-lmo:lmos/ietf-lmo:lmo[ietf-lmo:lmo-class = current()/../lmo-class]/ietf-lmo:inst/ietf-lmo:id";
}
description
"Asset to which this feature is attached";
}
}
container subfeatures {
description
"Sub-features to the top-level feature";
list subfeature {
key "lmo-class id";
description
"Subfeature ID";
leaf lmo-class {
type leafref {
path "/ietf-lmo:lmos/ietf-lmo:lmo/ietf-lmo:lmo-class";
}
must "derived-from-or-self(current(), 'ietf-lmo-feature:feature')";
description
"lmo-class reference";
}
leaf id {
type leafref {
path "/ietf-lmo:lmos/ietf-lmo:lmo[ietf-lmo:lmo-class = current()/../lmo-class]/ietf-lmo:inst/ietf-lmo:id";
}
description
"Reference to Feature ID";
}
}
}
}
}