module ietf-lmo-licenses {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-lmo-licenses";
prefix ietf-lmo-licenses;
import ietf-yang-types {
prefix yang;
}
import ietf-lmo-common {
prefix ietf-lmo-common;
}
import ietf-lmo {
prefix ietf-lmo;
}
import ietf-lmo-feature {
prefix ietf-lmo-feature;
}
import ietf-lmo-assets-inventory {
prefix ietf-lmo-asset;
}
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 licenses attributes of a
product.
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-02-28 {
description
"Introduced flexible root structure";
reference
"RFC XXXX: LMO YANG Model";
}
revision 2021-10-25 {
description
"Initial revision for Licenses Module as part of the LMO YANG
Model";
reference
"RFC XXXX: LMO YANG Model";
}
// Can we capture licensing ties to API access where we may be
// licensed on events queries per second, minute, hour, etc.
// This is a popular model in the cloud space for example the Google
// MAPs API??
identity license {
description "A license is a class of lmo that represents ...";
base ietf-lmo-common:lmo-class;
}
augment /ietf-lmo:lmos/ietf-lmo:lmo/ietf-lmo:inst {
when "derived-from-or-self(../ietf-lmo:lmo-class, 'ietf-lmo-licenses:license')";
description
"licenses container includes attributes for licenses";
leaf virtual-account {
type string;
description
"Virtual Accounts help to organize assets in a way that is
logical for the business. The most common use of a Virtual
Account is to provide access and allocate specific
licenses to different departments or geographies while
maintaining an overall view of the organizational usage";
}
leaf model {
type ietf-lmo-common:license-model-t;
description
"License Model or Type";
}
leaf buying-program {
type identityref {
base ietf-lmo-common:license-buying-program-t;
}
description
"License buying program, if applicable";
}
leaf offer-type {
type identityref {
base ietf-lmo-common:offer-type-t;
}
description
"License offer type, if applicable";
}
leaf external-store {
type boolean;
default false;
description
"Licensing goes through an external store";
}
leaf pid {
type string;
description
"License Product Identifier";
}
leaf purchase-order-id {
type ietf-lmo-common:purchase-order-t;
description
"License Order Number";
}
leaf account-id {
type string;
description
"Account identifier entitled to the license. Account-id
could e.g., be composed by account or customer name +
organization identifier";
}
container assets {
description
"Assets to which this license are attached";
list asset {
key "lmo-class id";
description
"list of assests";
leaf lmo-class {
description
"Asset class to which this license is attached";
type leafref {
path "/ietf-lmo:lmos/ietf-lmo:lmo/ietf-lmo:lmo-class";
}
must "derived-from-or-self(current(), 'ietf-lmo-asset:asset')";
}
leaf id {
description
"Asset to which this license is attached";
type leafref {
path "deref(../lmo-class)/../ietf-lmo:inst/ietf-lmo:id";
}
}
}
}
container features {
description
"Features to which this license are attached";
list feature {
description
"list of features";
key "lmo-class 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
"feature to which this license is attached";
}
leaf id {
description
"Feature to which this license is attached";
type leafref {
path "deref(../lmo-class)/../ietf-lmo:inst/ietf-lmo:id";
}
}
}
}
leaf state {
type ietf-lmo-common:license-state-t;
description
"License state; e.g., active, inactive, or unknown";
}
container renewal-profile {
description
"Profile of license renewal status and information";
leaf purchase-date {
type yang:date-and-time;
description
"Purchase Date";
}
leaf claim-date {
type yang:date-and-time;
description
"Claim Date - if different from Purchase Date";
}
leaf activation-date {
type yang:date-and-time;
description
"Activation Date";
}
leaf expiration-date {
type yang:date-and-time;
description
"Expiration Date";
}
}
}
augment /ietf-lmo:lmos/ietf-lmo:lmo/ietf-lmo:inst {
when "derived-from-or-self(../ietf-lmo:lmo-class, 'ietf-lmo-asset:asset')";
description
"assets attributes related to licenses";
container licenses {
leaf lmo-class {
description
"Asset class to which this license is attached";
type leafref {
path "/ietf-lmo:lmos/ietf-lmo:lmo/ietf-lmo:lmo-class";
}
must "derived-from-or-self(current(), 'ietf-lmo-licenses:license')";
}
leaf id {
description
"Asset to which this license is attached";
type leafref {
path "deref(../lmo-class)/../ietf-lmo:inst/ietf-lmo:id";
}
}
}
// Fill more leafs for license if it is required here...
}
}