Data Model for Asset Lifecycle Management and Operations
Marisol Palmero
Cisco Systems
mpalmero@cisco.com
Frank Brockners
Cisco Systems
fbrockne@cisco.com
Sudhendu Kumar
NC State University
skumar23@ncsu.edu
Camilo Cardona
NTT
camilo@ntt.net
Diego Lopez
Telefonica I+D
diego.r.lopez@telefonica.com
08 July 2024
operations
IVY Working Group
Internet-Draft
This document includes a data model for assets lifecycle management and operations. The primary objective of the data model is to measure and improve the network operators' experience along the lifecycle journey, from technical requirements and technology selection through renewal, including the end of life of an asset.
This model is based on the information model introduced in "Asset Lifecycle Management and Operations: A Problem Statement" (ALMO) [I-D.draft-palmero-opsawg-ps-almo-00] IETF draft.
Introduction
The dynamicity in "where", "how" and "who" uses an asset introduces challenges for both lifecycle and adoption management of the assets. These challenges and the motivation to fix the problems are shown with some examples in the companion draft "Asset Lifecycle Management and Operations: A Problem Statement" (ALMO) [I-D.draft-palmero-opsawg-ps-almo-00] IETF draft. Taking inspiration from the use cases and the Information Model given in Section 5 of the companion draft, we attempt to standardize some of the associations (with the data attributes) between the entities in the Information model. The YANG data models specified in this draft are subject to modification and refinement subsequent to the IVY Working Group's ratification of a stable iteration of the core inventory data models. Please note, the data model presented in the draft can be extended as per the expandability provided by the Information Model using the entity Future Expansion.
Requirements language
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
Terminology
The document makes use of the following terms:
- Asset: refers to hardware, software, applications, or services. An asset can be physical or virtual. The granularity of what constitutes an asset is deployment and implementation specific.
- Features: are options or functional capabilities offered by an asset.
- Entitlement: commonly implemented as license; it represents the rights obtained by the user, that allow them to access and utilize certain capabilities of the asset, including a feature or set of features.
- Lifecycle Management and Operations (LMO) connects to:
  1. Assets as a generalized entity subject to Lifecycle Management (LCM).
  2. Entitlements as the essential policy root for LCM.
  3. Metrics as the evidence for LCM transitions.
  4. Reports (no incidents) as the way of collecting input from users.
- Usage: refers to how an asset is being used (e.g., which features are used).
Abbreviations:
- ALMO: Asset Lifecycle Management and Operations
- EOL: End of Life
- EoS: End of Support
- LCM: Lifecycle Management
- PID: Product Identifier
Motivation
The motivation behind ALMO is to address the existing gap that network operators and business architects face in measuring and producing data related to various issues. This includes challenges such as unactivated entitlements, underutilized features, incident resolution, virtualized asset lifecycle events, DevOps deployment, and supply chain management.
By implementing ALMO, developer organizations can optimize their features by identifying and deprecating infrequently used features. They can also focus on widely deployed assets and improve usability and integration. ALMO provides a structured approach for users to provide feedback about an asset, enabling developers to assess the impact of potential deficiencies based on user feedback.
Overall, ALMO aims to bridge the gap in data measurement and production, helping operators and business architects improve asset management, optimize features, and gather valuable user feedback for continuous improvement.
DMALMO offers a common data model to implement ALMO data.
Data Models
Overview
Based on the ALMO IETF draft, assets can be characterized by their features, entitlements, and other attributes. Features represent the specific capabilities or functionalities of an asset. Entitlements, on the other hand, are related to asset usage and determine the level of access granted to users for utilizing the features. This implies that users have the necessary rights or licenses to use the asset and its associated features.
Entitlements can be complex to model as they vary in coverage and limitations. Some entitlements cover all features, while others target specific ones. For example, advanced or additional licenses may be required to access certain features like "MPLS-EVPN".
It is common in the industry to have tables that outline the entitlements and the features they cover, enabling users to understand their access based on entitlements. Some entitlements also impose restrictions on feature usage, such as limiting the number of users or CPUs.
The DMALMO model does not aim to provide a catalog of features and entitlements, but rather provides an inventory with focus on connecting features and entitlements to assets and tracking their usage. While it is possible to have multiple usage limits, the model may not support interrelating them. For instance, the statement "Entitlement covers up to N CPUs if you have more than X users, if not then M CPUs" may not be supported, but "Entitlement covers up to N CPUs and up to X users" is supported.
The usage aspect is particularly relevant in business use cases as it helps understand how to effectively utilize an asset. It provides insights into asset usage and highlights the importance of tracking it. While there may be other models addressing different aspects of an asset's lifecycle, the usage model serves a unique purpose by specifically focusing on practical utilization. Therefore, it is not redundant with other models and offers valuable insights into asset usage.
The different modules included in DMALMO are:
- Aggregated Assets Module
In the context of ALMO, the Asset module represents specific entity, that can include various elements such as hardware, software, virtualized components, or even services. The assets module can be linked to specific network inventory and can also augment certain attributes that might be required for the implementation of a specific use case.
- Entitlements Module
Entitlement module defines the level of access or permission granted to a user or entity to utilize specific features, functionalities, or resources associated with an asset. It represents the rights or licenses obtained by the user that allow them to access and utilize certain capabilities of the asset.
- Features Module
Feature module includes various attributes and relationships that describe the characteristics, properties, and associations of the feature within a specific context. A well-defined feature enhances the asset's value, differentiates it from others, and meets the requirements and expectations of users.
- Usage Module
The Usage model of a feature includes various elements that capture information about how the feature is utilized within the asset.
As part of the ALMO future extension modules, DMALMO considers:
- Event Report Module
- Organization Module, and
- User Module
Where the Event Report module includes various components that capture information about specific events or incidents that occur within ALMO related entities. And the Organization and User Modules encompass various components to capture information about users and organizations and their relationship to assets, features and/or entitlements.
Tree Diagrams of ALMO Modules
Aggregated Assets Module
This specification uses [RFC9179], [RFC9472] module: ietf-almo-assets

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst:
    +--rw role?                     identityref
    +--rw aggregation?              boolean
    +--rw number-of-instances?      uint32
    +--rw platform-dependency-os?   identityref
    +--rw install-location
    |  +--rw geo-location
    |     +--rw reference-frame
    |     |  +--rw alternate-system?    string {alternate-systems}?
    |     |  +--rw astronomical-body?   string
    |     |  +--rw geodetic-system
    |     |     +--rw geodetic-datum?    string
    |     |     +--rw coord-accuracy?    decimal64
    |     |     +--rw height-accuracy?   decimal64
    |     +--rw (location)?
    |     |  +--:(ellipsoid)
    |     |  |  +--rw latitude?    decimal64
    |     |  |  +--rw longitude?   decimal64
    |     |  |  +--rw height?      decimal64
    |     |  +--:(cartesian)
    |     |     +--rw x?           decimal64
    |     |     +--rw y?           decimal64
    |     |     +--rw z?           decimal64
    |     +--rw velocity
    |     |  +--rw v-north?   decimal64
    |     |  +--rw v-east?    decimal64
    |     |  +--rw v-up?      decimal64
    |     +--rw timestamp?         yang:date-and-time
    |     +--rw valid-until?       yang:date-and-time
    +--rw deployment-mode?          identityref
    +--rw activation-date?          yang:date-and-time
    +--rw software-version?         string
    +--ro hotfixes
    |  +--ro hostfix* []
    |     +--ro version?   identityref
    |     +--ro order?     uint8
    +--rw software-type?            string
    +--rw sign-of-life-timestamp?   yang:date-and-time
    +--rw tags?                     string

Entitlements Module

module: ietf-almo-entitlements

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst:
    +--rw uid?                        string
    +--rw state?                      ietf-almo-common:entitlement-state-t
    +--rw renewal-profile
    |  +--rw activation-date?   yang:date-and-time
    |  +--rw expiration-date?   yang:date-and-time
    +--rw parent-entitlement
    |  +--rw almo-class?   -> /ietf-almo:almos/almo/almo-class
    |  +--rw id?           -> /ietf-almo:almos/almo[ietf-almo:almo-class=current()/../almo-class]/inst/id
    +--rw entitlement-attachements
       +--rw entity
       |  +--rw organizations
       |     +--rw organization* [almo-class id]
       |        +--rw almo-class    -> /ietf-almo:almos/almo/almo-class
       |        +--rw id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
       +--rw assets
          +--rw assets
             +--rw asset* [almo-class id]
                +--rw almo-class    -> /ietf-almo:almos/almo/almo-class
                +--rw id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst/ietf-almo-feature:features/ietf-almo-feature:feature:
    +--ro entitlements-info
       +--ro entities-entitlement-info* []
          +--ro entity-entitlement-info
          |  +--ro organizations
          |     +--ro organization* [almo-class id]
          |        +--ro almo-class    -> /ietf-almo:almos/almo/almo-class
          |        +--ro id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
          +--ro entitlements
          |  +--ro entitlement* [almo-class id]
          |     +--ro almo-class    -> /ietf-almo:almos/almo/almo-class
          |     +--ro id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
          +--ro entitled?                  boolean
          +--ro infriges?                  boolean
          +--ro in-use?                    boolean
          +--ro entitlement-limit
             +--ro users
             |  +--ro value?     uint32
             |  +--ro maximum?   uint32
             +--ro cpus
             |  +--ro value?     uint32
             |  +--ro maximum?   uint32
             +--ro bandwidth
                +--ro value?     decimal64
                +--ro maximum?   decimal64

Features Module

module: ietf-almo-feature

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst:
    +--rw features
       +--rw feature* [almo-class id]
          +--rw almo-class    -> /ietf-almo:almos/almo/almo-class
          +--rw id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst:
    +--rw name?                      string
    +--rw summary?                   string
    +--rw category?                  string
    +--rw entitlement?               string
    +--rw first-available-version?   string
    +--ro backported-versions
    |  +--ro backported-version* []
    |     +--ro version?   identityref
    +--rw scope?                     identityref
    +--rw config-options* [id]
    |  +--rw id                string
    |  +--rw name?             string
    |  +--rw summary?          string
    |  +--rw characteristic* [id]
    |     +--rw id       string
    |     +--rw name?    string
    |     +--rw value?   string
    +--rw asset
    |  +--rw almo-class?   -> /ietf-almo:almos/almo/almo-class
    |  +--rw id?           -> /ietf-almo:almos/almo[ietf-almo:almo-class = current()/../almo-class]/inst/id
    +--rw subfeatures
       +--rw subfeature* [almo-class id]
          +--rw almo-class    -> /ietf-almo:almos/almo/almo-class
          +--rw id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id

Usage Module

module: ietf-almo-usage

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst:
    +--rw feature
    |  +--rw almo-class?   -> /ietf-almo:almos/almo/almo-class
    |  +--rw id?           -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
    +--rw name?                   string
    +--rw summary?                string
    +--rw uri?                    string
    +--rw deployment-mode?        identityref
    +--rw scope?                  identityref
    +--rw activation-status?      string
    +--rw instances?              uint32
    +--rw timestamp?              yang:date-and-time
    +--rw count?                  uint32
    +--rw frequency* [name]
    |  +--rw name         string
    |  +--rw type-freq?   string
    |  +--rw value?       yang:counter64
    +--rw resource-consumption* [id]
       +--rw id                string
       +--rw name?             string
       +--rw summary?          string
       +--rw characteristic* [id]
          +--rw id           string
          +--rw name?        string
          +--rw unit?        string
          +--rw value?       yang:counter64
          +--rw value-max?   yang:counter64

Event Report Module

module: ietf-almo-event-report

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst:
    +--rw id?                 string
    +--rw title?              string
    +--rw summary?            string
    +--rw severity?           string
    +--rw status?             string
    +--rw created?            yang:date-and-time
    +--rw last_updated?       yang:date-and-time
    +--rw capability?         string
    +--rw technology?         string
    +--rw subtechnology?      string
    +--rw problem-type?       string
    +--rw resolution?         string
    +--rw owner?              string
    +--rw support-engineer?   string
    +--rw asset
    |  +--rw almo-class?   -> /ietf-almo:almos/almo/almo-class
    |  +--rw id?           -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
    +--rw feature
    |  +--rw almo-class?   -> /ietf-almo:almos/almo/almo-class
    |  +--rw id?           -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
    +--rw contract-number?    string

Organization Module

module: ietf-almo-organization

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst:
    +--rw address?      string
    +--rw department?   boolean

User Module

module: ietf-almo-user

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst:
    +--rw billing-account?   uint32
    +--rw represents
    |  +--rw almo-class?   -> /ietf-almo:almos/almo/almo-class
    |  +--rw id?           -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
    +--rw authority?         enumeration
    +--rw email?             string
  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst/ietf-almo-entitlements:entitlement-attachements/ietf-almo-entitlements:entity:
    +--rw users
       +--rw users* [almo-class id]
          +--rw almo-class    -> /ietf-almo:almos/almo/almo-class
          +--rw id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst/ietf-almo-feature:features/ietf-almo-feature:feature/ietf-almo-entitlements:entitlements-info/ietf-almo-entitlements:entities-entitlement-info/ietf-almo-entitlements:entity-entitlement-info:
    +--ro users
       +--ro users* [almo-class id]
          +--ro almo-class    -> /ietf-almo:almos/almo/almo-class
          +--ro id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id

YANG data models of ALMO Modules
LMO Common Module

<CODE BEGINS> file "ietf-almo-common@2023-10-23.yang"
module ietf-almo-common {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-almo-common";
  prefix ietf-almo-common;
  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Editor:  Marisol Palmero
              <mailto:mpalmero@cisco.com>
     Editor:  Josh Suhr
              <mailto:josuhr@cisco.com>
     Editor:  Sudhendu Kumar
              <mailto:skumar23@ncsu.edu>";
  description
    "This YANG module defines a collection of useful data types
     and identity for Lifecycle Management and Operations (LMO).

     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 2023-10-23 {
    description
      "Renamed all references from LMO to ALMO. Refer to
      DMLMO draft";
    reference
      "RFC XXXX: ALMO YANG Model";
  }

  typedef entitlement-id-t {
    type string;
    description
      "Entitlement ID Type";
  }
  typedef entitlement-model-t {
    type enumeration {
      enum perpetual {
        description
          "Perpetual entitlement";
      }
      enum subscription {
        description
          "Subscription entitlement";
      }
      enum usage-based {
        description
          "Usage-based entitlement";
      }
      enum other {
        description
          "Undefined entitlement type";
      }
    }
    description
      "Entitlement Model Type";
  }
  identity entitlement-buying-program-t {
    description
      "Entitlement Buying Program that contains the plan to generate
       revenue for specific asset";
  }
  identity enterprise-agreement {
        base entitlement-buying-program-t;
        description
          "Enterprise Agreement";
  }
  identity managed-service-entitlement-agreement {
        base entitlement-buying-program-t;
        description
          "Managed Service Entitlement Agreement";
  }
  identity service-provider-network-agreement {
        base entitlement-buying-program-t;
        description
          "Service Provider Network Agreement";
  }
  identity collab-active-user {
        base entitlement-buying-program-t;
        description
          "Collaboration Active User";
  }
  identity service-full-coverage {
        base entitlement-buying-program-t;
        description
          "Service Full-Coverage";
  }
  identity offer-type-t {
    description
      "License Offer Type, part of the plan to generate revenue
       for specific asset";
  }
  identity perpetual-software {
      base offer-type-t;
      description
          "Perpetual softwar gives the user the right to use the
           program indefinitely";
  }
  identity standalone-hardware {
      base offer-type-t;
      description
          "Standalone hardware is able to function independently
           of other hardware";
  }
  identity on-premise-software-subscription {
      base offer-type-t;
      description
          "On-Premise software subscription, relates to a temporary
           on-prem licencing model, allowing users to pay a per user
           fee";
  }
  identity cloud-software-saas-subscription {
      base offer-type-t;
      description
          "Cloud Software (SaaS) subscription is a service busines
           model where the user is entitled to use the cloud software
           for a specific time period";
  }
  identity third-party-software {
      base offer-type-t;
      description
          "It includes licenses, entitlements, agreements, obligations
          or other commitment under which the user can use the asset
          not directly sold by the manufacturer";
  }
  identity flex-cloud-prem-subscription {
      base offer-type-t;
      description
          "Flex Cloud-Prem subscription allows software vendors to
          limit the number of entitlements for the use of the specific
          asset";
  }
  typedef purchase-order-t {
    type string;
    description
      "License purchase order number";
  }
  typedef entitlement-state-t {
    type enumeration {
      enum inactive {
        description
          "Inactive State";
      }
      enum active {
        description
          "Active State";
      }
      enum unknown {
        description
          "Unknown State";
      }
    }
    description
      "Entitlement State Type";
  }

  typedef asset-id {
    type string;
    description
      "Asset ID Type";
  }

  typedef vendor-id {
    type enumeration {
      enum cisco {
        description
          "Vendor-id is Cisco";
      }
      enum other {
        description
          "Vendor-id is not determined";
      }
    }
    description
      "Vendor identifier";
  }

  identity asset-type {
    description
      "type of the asset: hardware, software, software cloud, ...";
  }
  identity hw {
    base asset-type;
    description
      "Hardware refers to any physical device";
  }
  identity sw {
    base asset-type;
    description
      "Software refers to a collection of code installed on a
      hardware asset";
  }
  identity sw-cloud {
    base asset-type;
    description
      "Cloud-based software, that allows users access to software
      application that run on a shared computing resources via
      Internet";
  }
  identity nfv {
    base asset-type;
    description
      "irtual assets, as a separate type to connect with NFV practice";
  }
  identity phone {
    base asset-type;
    description
      "Mobile telephone or a handheld two-way communication device
      over a cellular network.";
  }
  identity other {
    base asset-type;
    description
      "Different or additional type not specified as part of another
      defined asset-type.";
  }
  identity asset-subtype {
    description
      "subtype of the asset: router, switch, wireless,
      controller, ...";
  }
  identity router {
    base asset-subtype;
    description
      "Network connecting device. It operates at layer-3 of the OSI
      model.";
  }
  identity switch {
    base asset-subtype;
    description
      "Network connecting device. It operates at layer-2(Data Link
      Layer) of the OSI model.";
  }
  identity wireless {
    base asset-subtype;
    description
      "Network connecting device. It creates a wireless local area
      network. It connects to a wired router, switch, or hub via an
      Ethernet cable, and projects a Wi-Fi signal to a designated
      area";
  }
  identity controller {
    base asset-subtype;
    description
      "Centralized device in the network which is used in combination
      with network connection devices, when there is a need to manage
      them in large quantities.";
  }
  identity board {
    base asset-subtype;
    description
      "Electronic circuit board in an asset which interconnects
      another hardware assets attached to it.";
  }
  identity p-supply {
    base asset-subtype;
    description
      "Power supply, as it might have independent identity.";
  }
  identity transceiver {
    base asset-subtype;
    description
      "Device that is both a transmitter and a receiver. Usually
      it's in a single device.
      This is commonly used as a modular network interface";
  }
  identity others {
    base asset-subtype;
    description
      "Different or additional type not specified as part of another
      defined asset-subtype. To be considered a few specific subtype
      of assets related to: 3GPP, BBF, TMF, I2NSF (and security in
      general), PCE, etc";
  }
  identity version {
    description
      "Base identity for all version types";
  }
  identity version-sw {
  base version;
    description
      "Version release of the operating system that runs on the
      asset";
  }
  identity platform-dependency-os {
    description
      "Operating system that creates an environment for the asset
       to get deployed. Enum of options covering OS platform
       dependency.";
  }
  identity linux {
    base platform-dependency-os;
    description
      "UNIX like operating system";
  }
  identity windows {
    base platform-dependency-os;
    description
      "Windows operating system";
  }
  identity macOS {
    base platform-dependency-os;
    description
      "Mac operating system develop by Apple, Inc.";
  }
  identity darwin {
    base platform-dependency-os;
    description
      "Open-source Unix-like operating system first released by Apple
      Inc.";
  }
  identity ubuntu {
    base platform-dependency-os;
    description
      "Linux distribution, used in desktop distribution";
  }
  identity red-hat {
    base platform-dependency-os;
    description
      "Red Hat Enterprise Linux, released in multiple server and
      desktop versions";
  }
// NEED to extend and include iOS, Android, etc.;

  identity role {
    description
      "What the role of a given device/component is in the network.
      This attribute normally will be configured on the specific
      component during setup. This attribute normally will be
      configured on the specific component during setup";
  }
  identity border-router {
    base role;
    description
      "Router that provides connectivity between interior and
      exterior network routers or to the cloud";
  }
  identity access {
    base role;
    description
      "Router that provides access to a larger communication network
      of some sort.";
  }
  identity control-plane {
    base role;
    description
      "Network component that controls how data packets are
      forwarded";
  }
  identity edge {
    base role;
    description
      "Router that provides an entry point into enterprise or service
      provider core networks";
  }
  identity core {
    base role;
    description
      "Component part of the high-speed backbone of the network. It
      provides fast and efficient data transport, excluding 3GPP";
  }
  identity ran {
    base role;
    description
       "RAN links user equipment, such as a cellphone, computer or
       any remotely controlled machine, over a fiber or wireless
       backhaul connection. That link goes to the core network, which
       manages subscriber information, location and more.";
  }
  identity datacenter {
    base role;
    description
      "Component placed in the data center, mantaining and housing
      back-end IT system and data stores";
  }
  identity branch {
    base role;
    description
      "Router in a remote branch of an enterprise's network";

  }
  identity deployment-mode {
    description
      "This attribute will denote the configured deployment mode
       for the asset and features, if applicable; e.g.,
       High Availability(HA) or Faiover cluster, virtual appliance,
       etc.";
  }
  identity primary {
    base deployment-mode;
    description
      "Asset or featurs that support critical applications to
      minimize system downtime, to achieve high availabiilty or
      failover";
  }
  identity secondary {
    base deployment-mode;
    description
      "Redundant asset or feature, that is triggered when the
      primary encounters performance issues, to achieve high
      availability or failover";
  }
  identity cloud {
    base deployment-mode;
    description
      "Especially it refers to remote, distributed and shared asset
      resources (i.e. data storage, computing power, etc.), which
      are hooked together and meant to operate as a single
      ecosystem.";
  }
  identity virtual-appliance {
    base deployment-mode;
    description
      "pre-configured virtual machine image, ready to run on a
      hypervisor";
  }
  identity container {
    base deployment-mode;
    description
      "Standard unit of software that packages up code and all its
      dependencies so the application runs quickly and reliably from
      one computing environment to another";

  }
  identity undeployed {
    base deployment-mode;
    description
      "it refers to an asset that is undeployed";

  }
  identity metric-type {
    description
      "Specify the different type of metrics, i.e accumulated-count,
       average-count, last-count, high-water mark count, low-water
       mark count" ;
  }
  identity feature-scope {
    description
      "Optional tag that could apply to any usage feature, so that
       if there are multiple dimensions of reporting that need to
       be accommodated (i.e., report feature usage by 'site')";
  }
  identity site {
    base feature-scope;
    description
      "Single location, part of the network";
  }
  identity network {
    base feature-scope;
    description
      "scope limited to the networking assets";
  }
  typedef feature-usage-type {
    type enumeration {
      enum none {
        description
          "No Usage";
      }
      enum low {
        description
          "Usage meeting the Low Threshold";
      }
      enum medium {
        description
          "Usage meeting the Medium Threshold";
      }
      enum high {
        description
          "Usage meeting the High Threshold";
      }
      // NEED to elaborate more on this list, based on use case
      // validation
    }
    description
      "feature usage % 0-25-50-75-100";
  }

  identity almo-class {
    description "Base identity for classes of LMOs";
  }
<CODE ENDS>
}

LMO Module

<CODE BEGINS> file "ietf-almo@2023-10-23.yang"
module ietf-almo {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-almo";
  prefix ietf-almo;
  import ietf-almo-common {
    prefix ietf-almo-common;
  }
  import ietf-yang-types {
    prefix yang;
  }
  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Editor:  Jan Lindblad
              <mailto:jlindbla@cisco.com>
     Editor:  Marisol Palmero
              <mailto:mpalmero@cisco.com>";
  description
    "This YANG module add the flexibility to define its own
     and extensible set of almo classes.

     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 2023-10-23 {
    description
      "Renamed all references from LMO to ALMO. Refer to
      DMLMO draft";
    reference
      "RFC XXXX: ALMO YANG Model";
  }

  container almos {
    //config false; //temporarily commented out for easy testing
    description
      "Container that includes instances for all types of datasets
       which are part of DMLMO";
    list almo {
      key almo-class;
      description
        "list that includes the instances for all DMLMO datasets";
      leaf almo-class {
        type identityref {
          base ietf-almo-common:almo-class;
        }
        description
          "almo-class defining the type of instance";
      }
      list inst {
        key id;
        description
          "defines the specific instance";
        leaf id {
          type string;
          description
            "Identifies the instance";
        }
        container parent {
          description
            "identifies the hierarchy structure for a given instance";
          leaf almo-class {
            type leafref {
              path /almos/almo/almo-class;
            }
            description
              "almo-class that defines the parent type of instance";
          }
          leaf id {
            type leafref {
               path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class"
            + "=current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
            }
            description
              "identifies the parent type of instance";
          }
        }
        container capture-info {
          // Moved capture-info to the instance level, as
          // asset/... data will generally be collected
          // from one source at one time.
          description
            "Capture information for this data";
          leaf collected-on {
            type yang:date-and-time;
            description
              "Time at which this data was collected";
          }
          leaf collected-from {
            type string;
            description
              "Identifier for original source of this data";
          }
        }
      }
    }
  }
<CODE ENDS>
} ### Aggregated Asset Module

<CODE BEGINS> file "ietf-almo-assets@2023-10-23.yang"
module ietf-almo-assets {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-almo-assets";
  prefix ietf-almo-asset;
  import ietf-almo-common {
    prefix ietf-almo-common;
  }
  import ietf-almo {
    prefix ietf-almo;
  }
  import ietf-yang-types {
    prefix yang;
  }
  import ietf-geo-location {
    prefix ietf-geo-location;
  }
  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Editor:  Marisol Palmero
              <mailto:mpalmero@cisco.com>
     Editor:  Josh Suhr
              <mailto:josuhr@cisco.com>
     Editor:  Sudhendu Kumar
              <mailto:skumar23@ncsu.edu>";
  description
    "This YANG module includes the concept asset aggregation
     and platform dependency of an asset.

     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 2023-10-23 {
    description
      "Renamed all references from LMO to ALMO. Refer to
      DMLMO draft";
    reference
      "RFC XXXX: ALMO YANG Model";
  }

  identity asset {
    base ietf-almo-common:almo-class;
    description
      "An asset is a class of almo that represents a
      hardware, software, application, or service component.
      An asset can also be physical or virtual";
  }
  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst {
    when "derived-from-or-self(../ietf-almo:almo-class,'ietf-almo-asset:asset')";
    description
      "Assets container includes attributes that add the aggregated
       view";
    // Removed vendor, name, description, pid, serial-number, vid,
    // mac-address, ip-address, entity-name, product-description, udi,
    // transparency-info, from version 08;
    // as these and similar properties are expected to be managed using
    // other inventory mechanisms. Maybe more leafs should be removed.
    leaf role {
      type identityref {
        base ietf-almo-common:role;
      }
      description
        "What the role of a given device/component is in the
        network. This attribute normally will be configured on the
        specific component during setup";
    }
    leaf aggregation {
      type boolean;
      must "../number-of-instances = 1 or current() = 'true'";
      default false;
      description
        "Asset aggregation; e.g., false (default) or true";
    }
    leaf number-of-instances {
      type uint32;
      default 1;
      description
        "Number of instances or endpoints covered by the aggregated
          asset. If different from 1, it should enforce that
          aggregation attribute is set to true";
    }
    leaf platform-dependency-os {
      type identityref {
          base ietf-almo-common:platform-dependency-os;
      }
      description
        "Operating system for the asset to be deployed.";
    }
    container install-location {
      uses ietf-geo-location:geo-location;
      description
        "Physical installed location of the product. Location is
          provided based on what customer/user configures";
    }
    leaf deployment-mode {
      type identityref {
        base ietf-almo-common:deployment-mode;
      }
      description
        "Deployment mode for the asset, if applicable; e.g.,
          HA cluster, virtual appliance, etc.";
    }
    leaf activation-date {
      type yang:date-and-time;
      description
        "Date of asset activation or initial contact";
    }
    leaf software-version {
      type string;
      description
        "Software version running on the hardware device or
          software component";
    }
    container hotfixes {
      config false;
      description "list of hotfixes";
      list hostfix {
      description
        "List of hotfixes that have been installed";
        leaf version {
          type identityref {
            base ietf-almo-common:version;
          }
          description
            "It includes the first hotfix installed";
        }
        leaf order {
          type uint8;
          description
            "It refers to the order of how the hotfixes have been
              installed, range 0..100";
        }
      }
    }
    leaf software-type {
      type string;
      description
        "Software type or Operating System";
    }
    leaf sign-of-life-timestamp {
      type yang:date-and-time;
      description
        "Date of last contact";
    }
    leaf tags {
      type string;
      description
        "Comma-separated descriptive tags for this asset";
    }
  }
<CODE ENDS>
}

Entitlements Module

<CODE BEGINS> file "ietf-almo-entitlements@2023-10-23.yang"
module ietf-almo-entitlements {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-almo-entitlements";
  prefix ietf-almo-entitlements;
  import ietf-yang-types {
    prefix yang;
  }
  import ietf-almo-common {
    prefix ietf-almo-common;
  }
  import ietf-almo {
    prefix ietf-almo;
  }
  import ietf-almo-assets {
    prefix ietf-almo-asset;
  }
  import ietf-almo-feature {
    prefix ietf-almo-feature;
  }
  import ietf-almo-organization {
    prefix ietf-almo-organization;
  }
  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Editor:  Marisol Palmero
              <mailto:mpalmero@cisco.com>
     Editor:  Josh Suhr
              <mailto:josuhr@cisco.com>
     Editor:  Sudhendu Kumar
              <mailto:skumar23@ncsu.edu>";
  description
    "This YANG module includes the entitlement 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.

     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.
     ";

  revision 2023-10-23 {
    description
      "Renamed all references from LMO to ALMO. Refer to
      DMLMO draft";
    reference
      "RFC XXXX: ALMO YANG Model";
  }

// Can we capture entitlement ties to API access where we may be
// entitled on events queries per second, minute, hour, etc.
// This is a popular model in the cloud space for example the Google
// MAPs API??

  identity entitlement {
    base ietf-almo-common:almo-class;
    description "A entitlement is a class of ALMO that represents how
    the asset(s) or feature(s) can be leveraged and what is required
    in cases the asset(s) or feature(s) are changed.";
  }
  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst {
    when "derived-from-or-self(../ietf-almo:almo-class, "+
         " 'ietf-almo-entitlements:entitlement')";
    description
      "entitlements container includes attributes for entitlements";
    leaf uid {
      type string;
      description
        "Unique Entitlement Identifier";
    }

    leaf state {
      type ietf-almo-common:entitlement-state-t;
      description
        "Entitlement state; e.g., active, inactive, or unknown";
    }
    container renewal-profile {
      description
        "Profile of entitlement renewal status and information";
      leaf activation-date {
        type yang:date-and-time;
        description
          "Activation Date";
      }
      leaf expiration-date {
        type yang:date-and-time;
        description
          "Expiration Date";
      }
    }

    container parent-entitlement {
      // There is already a parent in the base model  but we have to force this  to
      // be entilement.. can we do something else?
      description
        "identifies the hierarchy structure for a given instance";
      leaf almo-class {
        type leafref {
          path /ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class;
        }
          must "derived-from-or-self(current(), "+
             " 'ietf-almo-entitlements:entitlement')";
          description
          "almo-class that defines the parent type of instance";
      }
      leaf id {
        type leafref {
           path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class"
        + "=current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
        }
        description
          "identifies the parent type of instance";
      }
    }

    container entitlement-attachements {
      description
         "An entilement entitles an entity to the use of a feature under an
         asset.";

      container entity {
        description "The entity to which the entilemets entitles.
        There can be multiple. Empty entity attachments can occur for
        special licenses. This value  still SHOULD always be explicitly filed.
        It might be expanded to cover selection cases e.g. all users in
        a special country.";
        container organizations {
          description "Attachment to specifc organizations.";
          list organization {
            key "almo-class id";
            description
              "list of organizations";
            leaf almo-class {
              type leafref {
                path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
              }
              must "derived-from-or-self(current(), "+
                   " 'ietf-almo-organization:organization')";
              description
                "organization to which this entitlement is attached";
            }
            leaf id {
              type leafref {
                path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
                     " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
              }
              description
                "organization to which this entitlement is attached";
            }
          }

        }

      }

        // We could expand this to more generic selections of users
        // or organizations, but not to save lines, but when the attachment
        // is loose per the license: "e.g. users in Asia"

      container assets {
        description "Descriptive set of assets to which the license is attached. Some licenses might not be attached to specific assets";

        container assets {
          description
             "list of assets to which this license is attached";
          list asset {
            key "almo-class id";
            description
              "list of assets to which this license is attached";
            leaf almo-class {
              type leafref {
                path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
              }
              must "derived-from-or-self(current(), "+
                   " 'ietf-almo-asset:asset')";
              description
                "organization to which this entitlement is attached";
            }
            leaf id {
              type leafref {
                path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
                     " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
              }
              description
                "organization to which this entitlement is attached";
            }
          }

        }

        // We could have other container with more descriptive set of assets
        // such as "all laptops in school Y (site license)"

      }
      }

    }

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst/ietf-almo-feature:features/ietf-almo-feature:feature {
    when "derived-from-or-self(../../../ietf-almo:almo-class, "+
         " 'ietf-almo-asset:asset')";
    description "Augmenting features with entilement info.";

    container entitlements-info {
      config false;
      description
       "information over this feature under this asset";

        list entities-entitlement-info {
          description "include info for the entitlement";
          container entity-entitlement-info {
            description "Entities that uses the feature. It can be empty
            but each server should provide meaning to this. It could mean
            general use of the feature";
            container organizations {
              description "link  to  organizations.";
              list organization {
                key "almo-class id";
                description
                  "list of organizations";
                leaf almo-class {
                  type leafref {
                    path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
                  }
                  must "derived-from-or-self(current(), "+
                       " 'ietf-almo-organization:organization')";
                  description
                    "organization to which this entitlement is attached";
                }
                leaf id {
                  type leafref {
                    path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
                         " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
                  }
                  description
                    "organization to which this feature and entitlement is related";
                }
              }

        }

          }

          container entitlements {
            description "List of entitlements that enable the use of this
            feature.";
            list entitlement {
              key "almo-class id";
              description
                "Subfeature ID";
              leaf almo-class {
                type leafref {
                  path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
                }
                must "derived-from-or-self(current(), "+
                " 'ietf-almo-entitlements:entitlement')";
                description
                  "Reference to almo-class";
              }
              leaf id {
                type leafref {
                   path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
                        " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
                }
                description
                  "Reference to Feature ID";
              }

            }

          }

          leaf entitled {
            type boolean;
            description "Means one or more entitles allows the use of this feature.
            This does not deal with limits, just the general use of the feature
            The lack of this leaf means the server state is not determined";
          }

          leaf infriges {
            type boolean;
            description "Whether the feature use is infriging its entilement level.
            It means the feature is in use iwthout an entitlement, or going over a level.";
          }

          leaf in-use {
            type boolean;
            description "Whther the level of usage of the feature will leave it
            to infrigement if the entilement in entitlements is removed";
          }

          container entitlement-limit {
            // TODO: this was failing even without the entitled.
            //must "../entitled = 'true'" {
            //  error-message "entiltlement-limit can only exist if entitled is set to true";
            //}
            description "Limits of the entilement";
            // Check with Jan if it is better to use the usage class, but thsi one is specific
            // for licenses.
            // This container should be expanded if needed by augmentation
            // This could also be a grouping with the usage, but then the meanings
            // could change..
            // And one cannot really augment groupins, so yeah..
            // Pending: Will the meaning of this containers mean anything?
            // Maybe the container without the value as None?
            container users {
              description "Number of users";
              leaf value {
                type uint32;
                units "users";
                description "Limit in number of users";
              }
              leaf maximum {
                type uint32;
                units "users";
                description
                "Maximum number of users allowed by the current entilement.
                Lack of this container means there is no user limit";
              }
            }
            container cpus {
              description "Number of cpus";
              leaf value {
                type uint32;
                units "cpus";
                description "Limit in number of cpus. Some vendors have their own
                meaning of cpus in the commercial sense. This could mean that too.";
              }

              leaf maximum {
                type uint32;
                units "cpus";
                description
                "Maximum number of cpus allowed by the current entilement.
                Lack of this container means there is no cpu limit on the entitlement level";
              }
            }

            container bandwidth {
              description "Limit in bandwidth";
              leaf value {
                type decimal64 {
                fraction-digits 6;
                }
                units "Mbps";
                description "Limit in the bandwidth of a service.";
              }
              leaf maximum {
                type decimal64 {
                fraction-digits 6;
                }
                units "Mbps";
                description
                "Maximum amount of bandwidth of the server by license restriction.";
              }
            }

            // do an expansion of egress and ingress queues as an example

          }
      }

      }

  }
<CODE ENDS>
}

Features Module

<CODE BEGINS> file "ietf-almo-feature@2023-10-23.yang"
module ietf-almo-feature {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-almo-feature";
  prefix ietf-almo-feature;
  import ietf-almo-common {
    prefix ietf-almo-common;
  }
  import ietf-almo {
    prefix ietf-almo;
  }
  import ietf-almo-assets {
    prefix ietf-almo-asset;
  }
  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Editor:  Marisol Palmero
              <mailto:mpalmero@cisco.com>
     Editor:  Josh Suhr
              <mailto:josuhr@cisco.com>
     Editor:  Sudhendu Kumar
              <mailto:skumar23@ncsu.edu>";
  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 2023-10-23 {
    description
      "Renamed all references from LMO to ALMO. Refer to
      DMLMO draft";
    reference
      "RFC XXXX: ALMO YANG Model";
  }

  identity feature {
    base ietf-almo-common:almo-class;
    description
      "A feature is a class of almo that represents
       options or functional capabilities available in an asset";
  }

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst {
    when "derived-from-or-self(../ietf-almo:almo-class, 'ietf-almo-asset:asset')";
    description
      "feature attributes related to assets";

    container features {
      description
        "Features supported by an asset";
      list feature {
        key "almo-class id";
        description
          "Subfeature ID";
        leaf almo-class {
          type leafref {
            path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
          }
          must "derived-from-or-self(current(), "+
          " 'ietf-almo-feature:feature')";
          description
            "Reference to almo-class";
        }
        leaf id {
          type leafref {
             path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
                  " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
          }
          description
            "Reference to Feature ID";
        }

        }

      }
    //Fill more leafs for license when organization
    //module is present here...
  }

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst {
    when "derived-from-or-self(../ietf-almo:almo-class, "+
         " 'ietf-almo-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-almo-common:version;
          }
          description
            "version of the backport release";
        }
      }
    }
    leaf scope {
      type identityref {
        base ietf-almo-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 almo-class {
        type leafref {
          path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
        }
        must "derived-from-or-self(current(), "+
             " 'ietf-almo-asset:asset')";
        default ietf-almo-asset:asset;
        description
          "Asset class to which this feature is attached";
      }
      leaf id {
        type leafref {
          path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
              "current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
        }
        description
          "Asset to which this feature is attached";
      }
    }
    container subfeatures {
      description
        "Sub-features to the top-level feature";
      list subfeature {
        key "almo-class id";
        description
          "Subfeature ID";
        leaf almo-class {
          type leafref {
            path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
          }
          must "derived-from-or-self(current(), "+
               " 'ietf-almo-feature:feature')";
          description
            "almo-class reference";
        }
        leaf id {
          type leafref {
            path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
                 " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
          }
          description
            "Reference to Feature ID";
        }
      }
    }
  }
<CODE ENDS>
}

Usage Module

<CODE BEGINS> file "ietf-almo-usage@2023-10-23.yang"
module ietf-almo-usage {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-almo-usage";
  prefix ietf-almo-usage;
  import ietf-almo-common {
    prefix ietf-almo-common;
  }
  import ietf-almo {
    prefix ietf-almo;
  }
  import ietf-yang-types {
    prefix yang;
  }
  import ietf-almo-feature {
    prefix ietf-almo-feature;
  }
  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Editor:  Jan Lindblad
              <mailto:jlindbla@cisco.com>
     Editor:  Marisol Palmero
              <mailto:mpalmero@cisco.com>";
  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 2023-10-23 {
    description
      "Renamed all references from LMO to ALMO. Refer to
      initial DMLMO draft";
    reference
      "RFC XXXX: ALMO YANG Model";
  }

  identity usage {
    base ietf-almo-common:almo-class;
    description "A usage is a class of almo that represents how
    features of an asset are used";
  }
  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst {
    when "derived-from-or-self(../ietf-almo:almo-class, "+
         " 'ietf-almo-usage:usage')";
    description
      "usage attributes";
    container feature {
      leaf almo-class {
        type leafref {
          path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
        }
        must "derived-from-or-self(current(), "+
             " 'ietf-almo-feature:feature')";
        default ietf-almo-feature:feature;
        description
          "feature to which this license is attached";
      }
      leaf id {
        type leafref {
           path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
                " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
        }
        description
          "Feature to which this license is attached";
      }
      description
        "usage link to a feature";
    }
    leaf name {
      type string;
      description
        "Name of feature usage characteristic";
    }
    leaf summary {
      type string;
      description
        "Brief description of feature usage characteristic";
    }
    leaf uri {
      type string;
      description
        "Target URI of feature characteristic, if applicable - e.g.,
         for clickstream or API";
    }
    leaf deployment-mode {
      type identityref {
        base ietf-almo-common:deployment-mode;
      }
      description
        "Deployment mode for the feature. When applicable, feature
         might be independent of the deployment mode in the asset;
         e.g., cloud, HA cluster, virtual appliance, etc.";
    }
    leaf scope {
      type identityref {
        base ietf-almo-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')";
    }
    leaf activation-status {
      type string;
      description
        "Feature activation status for this instance of the
        product (on/off; active/inactive; enabled/disabled)";
    }
    leaf instances {
      type uint32;
      description
        "Number of instances or end-points using this feature";
    }

    leaf timestamp {
      type yang:date-and-time;
      description
        "Some counters will benefit from timestamp based on the
        time when the counter has been collected";
    }
    leaf count {
      type uint32;
      units "times";
      description
        "Count of times the feature has been used";
    }
    list frequency {
      key "name";
      description
        "Frequency with which the feature is used";
      leaf name {
        type string {
          length "1..64";
        }
        description
          "reference in case that feature is for different
          purpose of usage";
      }
      leaf type-freq {
        type string;
        description
          "Frequency type, i.e daily, weekly, monthly";
      }
      leaf value {
        type yang:counter64;
        description
          "Value collected for the usage";
      }
    }
    list resource-consumption {
      key "id";
      description
        "Resource consumption profile";
      leaf id {
        type string;
        description
          "Identify resource for consumption measurement";
      }
      leaf name {
        type string;
        description
          "Friendly name of the resource";
      }
      leaf summary {
        type string;
        description
          "Brief description of the resource";
      }
      list characteristic {
        key "id";
        description
          "Characteristic of resource consumption";
        leaf id {
          type string;
          description
            "Identifier for resource consumption characteristic";
        }
        leaf name {
          type string;
          description
            "Friendly name for resource consumption
            characteristic";
        }

        leaf unit {
          type string;
          description
            "unit of measurement for the characteristic";
        }

        // NEED to define identity type for unit: min, hour, sec,
        // days, ...

        leaf value {
          type yang:counter64;
          description
            "Resource consumption characteristic measurement";
        }
        leaf value-max {
          type yang:counter64;
          description
            "Maximum resource consumption characteristic value";
        }
      }
    }
  }
<CODE ENDS>
}

Event Report Module

<CODE BEGINS> file "ietf-almo-event-report@2023-10-23.yang"
module ietf-almo-event-report {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-almo-event-report";
  prefix ietf-almo-event;

  import ietf-almo-common {
    prefix ietf-almo-common;
  }
  import ietf-almo {
    prefix ietf-almo;
  }
  import ietf-yang-types {
    prefix yang;
  }
  import ietf-almo-assets {
    prefix ietf-almo-asset;
  }
  import ietf-almo-feature {
    prefix ietf-almo-feature;
  }
  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Editor:  Marisol Palmero
              <mailto:mpalmero@cisco.com>
     Editor:  Josh Suhr
              <mailto:josuhr@cisco.com>
     Editor:  Sudhendu Kumar
              <mailto:skumar23@ncsu.edu>";
  description
    "This YANG module includes the incident management attributes
     to handle event reports.

     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 2023-10-23 {
    description
      "Renamed all references from LMO to ALMO. Refer to
       DMLMO draft";
    reference
      "RFC XXXX: ALMO YANG Model";
  }

  identity event {
    base ietf-almo-common:almo-class;
    description
    "An event is a class of ALMO that represents an event
    that is not part of normal operations that disrupts
    operational processes.";
  }
  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst {
    when "derived-from-or-self(../ietf-almo:almo-class, "+
         " 'ietf-almo-event:event')";
    description
      "event container includes attributes for event reports";

    leaf id {
      type string;
      description
        "Technical Support Center Case Number id";
    }
    leaf title {
      type string;
      description
        "headline Incident Case";
    }
    leaf summary {
      type string;
      description
        "Problem description summary";
    }
    leaf severity {
      type string;
      description
      "severity, in some cases also defined as priority";
      // NEED to define different levels of severity, from
      // severity 1 to 6, i.e. Sev1: network down, Sev6: enhacement
    }
    leaf status {
      type string;
      description
      "case status, i.e. Customer-Pending, Customer
      Engineer-Pending, Developer-Pending, Closed, Open, etc.";
      // NEED to define different status
    }
    leaf created {
      type yang:date-and-time;
      description
      "created date-and-time";
    }
    leaf last_updated {
      type yang:date-and-time;
      description
      "last updated date-and-time";
    }
    leaf capability {
      type string;
      description
      "i.e. to reveal associated RMA items";
    }
    leaf technology{
      type string;
      description
      "Technology related";
    }
    leaf subtechnology{
      type string;
      description
      "Subtechnology related";
    }
    leaf problem-type{
      type string;
      description
      "Problem type definition, i.e. network, faulty hardware,
      performance, security, etc. ";
    }
    leaf resolution{
      type string;
      description
      "code (closed cases only)";
    }
    leaf owner{
      type string;
      description
      "Customer in charge of the case";
    // NEED to refer to user almo-class
    }
    leaf support-engineer{
      type string;
      description
      "Customer Support Engineer in charge of the case";
    // NEED to refer to user almo-class
    }
    container asset {
      description
          "Asset container to which this event is attached";
      leaf almo-class {
        type leafref {
          path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
        }
        must "derived-from-or-self(current(), "+
             " 'ietf-almo-asset:asset')";
        default ietf-almo-asset:asset;
        description
          "Asset class to which this event is attached";
      }
      leaf id {
        type leafref {
           path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
                " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
        }
        description
          "Asset to which this event is attached";
      }
    }
    container feature {
      description
          "Feature to which this event is attached";
      leaf almo-class {
        type leafref {
          path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
        }
        must "derived-from-or-self(current(), "+
             " 'ietf-almo-feature:feature')";
        default ietf-almo-feature:feature;
        description
          "Feature class to which this event is attached";
      }
      leaf id {
        type leafref {
          path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
               " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
        }
        description
          "Feature to which this event is attached";
      }
    }
    leaf contract-number {
      type string;
      description
      "Support contract number";
    // NEED to evaluate if it should be independent container. It
    // should be associated to asset and license
    }
  }
<CODE ENDS>
} ### Organization Module

<CODE BEGINS> file "ietf-almo-organization@2023-10-23.yang"
module ietf-almo-organization {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-almo-organization";
  prefix ietf-almo-organization;
  import ietf-almo-common {
    prefix ietf-almo-common;
  }
  import ietf-almo {
    prefix ietf-almo;
  }
  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Editor:  Jan Lindblad
              <mailto:jlindbla@cisco.com>
     Editor:  Marisol Palmero
              <mailto:mpalmero@cisco.com>";
  description
    "This YANG module defines the organization module and the
     different attributes that defines it.

     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 2023-10-23 {
    description
      "Renamed all references from LMO to ALMO. Refer to
      DMLMO draft";
    reference
      "RFC XXXX: ALMO YANG Model";
  }

  identity organization {
    base ietf-almo-common:almo-class;
    description
    "An organization is a class of almo that represents an entity
    such as a company, an institution, or an association,
    comprising one or more people and having a particular
    purpose";
  }
  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst {
    when "derived-from-or-self(../ietf-almo:almo-class, "+
         " 'ietf-almo-organization:organization')";
    description
      "organization attributes";

    leaf address {
      type string;
      description
        "organization address";
    }
    leaf department {
      type boolean;
      default false;
      description
        "How to categorize the organization";
    }
    //Fill more leafs for organizations here...
  }
<CODE ENDS>
}

User Module

<CODE BEGINS> file "ietf-almo-user@2023-10-23.yang"
module ietf-almo-user {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-almo-user";
  prefix ietf-almo-user;
  import ietf-almo-common {
    prefix ietf-almo-common;
  }
  import ietf-almo {
    prefix ietf-almo;
  }
  import ietf-almo-entitlements {
    prefix ietf-almo-entitlements;
  }
  import ietf-almo-organization {
    prefix ietf-almo-organization;
  }
  import ietf-almo-feature {
    prefix ietf-almo-feature;
  }
  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Editor:  Jan Lindblad
              <mailto:jlindbla@cisco.com>
     Editor:  Marisol Palmero
              <mailto:mpalmero@cisco.com>";
  description
    "This YANG module includes the user module and the different
     attributes that defines it.

     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 2023-10-23 {
    description
      "Renamed all references from LMO to ALMO. Refer to
      DMLMO draft";
    reference
      "RFC XXXX: ALMO YANG Model";
  }

  identity user {
    base ietf-almo-common:almo-class;
    description
    "A user is a class of almo that refers to owner or consumer
    of the asset. User belongs to an organization. Within the
    organization there are entities that: a) use the assets
    in their operations, b) manage the assets. ";
  }
  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst {
    when "derived-from-or-self(../ietf-almo:almo-class, "+
         " 'ietf-almo-user:user')";
    description
      "user attributes";

    leaf billing-account {
      type uint32;
      description "billing account information";
    }
    container represents {
      description
        "Organization to which this user is attached";
      leaf almo-class {
        type leafref {
          path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
        }
        must "derived-from-or-self(current(), "+
             " 'ietf-almo-organization:organization')";
        description
          "Organization class to which this user is attached";
      }
      leaf id {
        type leafref {
          path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
               " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
        }
        description
          "Organization to which this user is attached";
      }
    }
    leaf authority {
      type enumeration {
        enum super-user {
          description
            "super-user";
          }
        enum standard-user {
          description
            "standard-user";
          }
        enum restricted-user {
          description
            "restricted-user";
          }
        enum admin {
          description
            "admin";
          }
      }
      default standard-user;
      description
        "authority assign to the user";
    }
    leaf email {
      type string;
      description
          "user email";
    }
    // Fill in more leafs you want on organizations here...
  }

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst/ietf-almo-entitlements:entitlement-attachements/ietf-almo-entitlements:entity {
    when "derived-from-or-self(../../../ietf-almo:almo-class, "+
         " 'ietf-almo-entitlements:entitlement')";
    description
      "entitlement attributes related to user";

    container users {
      description "Users to which the entilement is attached";
      list users {
        key "almo-class id";
        description
          "list of users";
        leaf almo-class {
          type leafref {
            path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
          }
          must "derived-from-or-self(current(), "+
               " 'users')";
          description
            "users to which this entitlement is attached";
        }
        leaf id {
          type leafref {
            path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
                 " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
          }
          description
            "users to which this entitlement is attached";
        }
      }

    }
  }

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst/ietf-almo-feature:features/ietf-almo-feature:feature/ietf-almo-entitlements:entitlements-info/ietf-almo-entitlements:entities-entitlement-info/ietf-almo-entitlements:entity-entitlement-info {
    when "derived-from-or-self(../../../../../../ietf-almo:almo-class, "+
         " 'ietf-almo-entitlements:entitlement')";
    description
      "entitlement attributes related to user";

    container users {
      description "Users to which the entilement is attached";
      list users {
        key "almo-class id";
        description
          "list of users";
        leaf almo-class {
          type leafref {
            path "/ietf-almo:almos/ietf-almo:almo/ietf-almo:almo-class";
          }
          must "derived-from-or-self(current(), "+
               " 'users')";
          description
            "users to which this entitlement is attached";
        }
        leaf id {
          type leafref {
            path "/ietf-almo:almos/ietf-almo:almo[ietf-almo:almo-class = "+
                 " current()/../almo-class]/ietf-almo:inst/ietf-almo:id";
          }
          description
            "users to which this entitlement is attached";
        }
      }

    }
  }

<CODE ENDS>
}

Deployment Considerations
ALMO Data Models defines the data schemas for ALMO data. ALMO Data Models are based on YANG. YANG data models can be used independent of the transport and can be converted into any encoding format supported by the network configuration protocol. YANG is a protocol independent.
To enable the exchange of ALMO data among all interested parties, deployment considerations that are out of the scope of this document, will need to include:
- The data structure to describe all metrics and quantify relevant data consistently, i.e. specific formats like XML or JSON encoded message would be deemed valid or invalid based on ALMO models.
- The process to share and collect ALMO data across the consumers consistently, including the transport mechanism. The ALMO YANG models can be used with network management protocols such as NETCONF [RFC6241], RESTCONF [RFC8040], streaming telemetry, etc. OpenAPI specification might also help to consume ALMO metrics.
- How the configuration of assets should be done.
Security Considerations
The security considerations mentioned in section 17 of [RFC7950] apply.
LMO brings several security and privacy implications because of the various components and attributes of the information model. For example, each functional component can be tampered with to give manipulated data. ALMO when used alone or with other relevant data, can identify an individual, revealing Personal Identifiable Information (PII). Misconfigurations can lead to data being accessed by unauthorized entities.
Methods exist to secure the communication of management information. The transport entity of the functional model MUST implement methods for secure transport. This document also contains an Information model and Data-Model in which none of the objects defined are writable. If the objects are deemed sensitive in a particular environment, access to them MUST be restricted using appropriately configured security and access control rights. The information model contains several optional elements which can be enabled or disabled for the sake of privacy and security. Proper authentication and audit trail MUST be included for all the users/processes that access ALMO data.
IANA Considerations
The IETF XML Registry
This document registers URIs in the IETF XML registry [RFC3688]. Following the format in [RFC3688], the registrations defined below are requested:
URI: urn:ietf:params:xml:ns:yang:ietf-almo
Registrant Contact: The OPSA WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-almo-common
Registrant Contact: The OPSA WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-almo-assets
Registrant Contact: The OPSA WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-almo-entitlements
Registrant Contact: The OPSA WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-almo-feature
Registrant Contact: The OPSA WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-almo-usage
Registrant Contact: The OPSA WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-almo-event-report
Registrant Contact: The OPSA WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-almo-organization
Registrant Contact: The OPSA WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-almo-user
Registrant Contact: The OPSA WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
The YANG Module Names Registry
This document registers YANG modules in the YANG Module Names registry [RFC7950]. Following the format in [RFC7950], the registrations defined below are requested:
name: ietf-almo
namespace: urn:ietf:params:xml:ns:yang:ietf-almo
maintained by IANA: N
prefix: ietf-almo
reference: RFC XXXX
name: ietf-almo-common
namespace: urn:ietf:params:xml:ns:yang:ietf-almo-common
maintained by IANA: N
prefix: ietf-almo-common
reference: RFC XXXX
name: ietf-almo-assets
namespace: urn:ietf:params:xml:ns:yang:ietf-almo-assets
maintained by IANA: N
prefix: ietf-almo-asset
reference: RFC XXXX
name: ietf-almo-entitlements
namespace: urn:ietf:params:xml:ns:yang:ietf-almo-entitlements
maintained by IANA: N
prefix: ietf-almo-entitlements
reference: RFC XXXX
name: ietf-almo-feature
namespace: urn:ietf:params:xml:ns:yang:ietf-almo-feature
maintained by IANA: N
prefix: ietf-almo-feature
reference: RFC XXXX
name: ietf-almo-usage
namespace: urn:ietf:params:xml:ns:yang:ietf-almo-usage
maintained by IANA: N
prefix: ietf-almo-usage
reference: RFC XXXX
name: ietf-almo-event-report
namespace: urn:ietf:params:xml:ns:yang:ietf-almo-event-report
maintained by IANA: N
prefix: ietf-almo-event
reference: RFC XXXX
name: ietf-almo-organization
namespace: urn:ietf:params:xml:ns:yang:ietf-almo-organization
maintained by IANA: N
prefix: ietf-almo-organization
reference: RFC XXXX
name: ietf-almo-user
namespace: urn:ietf:params:xml:ns:yang:ietf-almo-user
maintained by IANA: N
prefix: ietf-almo-user
reference: RFC XXXX

Normative References
[RFC2119]

Key words for use in RFCs to Indicate Requirement Levels
S. Bradner
March 1997
BCP 14
RFC 2119
DOI 10.17487/RFC2119
[RFC8174]

Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words
B. Leiba
May 2017
BCP 14
RFC 8174
DOI 10.17487/RFC8174

Informative References
[I-D.draft-palmero-opsawg-ps-almo-00]

Asset Lifecycle Management and Operations, Problem Statement
Marisol Palmero
Cisco Systems
Frank Brockners
Cisco Systems
Sudhendu Kumar
NC State University
Camilo Cardona
NTT
Diego Lopez
Telefonica I+D
29 June 2023
Internet-Draft draft-palmero-opsawg-ps-almo-00
[RFC9179]

A YANG Grouping for Geographic Locations
C. Hopps
February 2022
RFC 9179
DOI 10.17487/RFC9179
[RFC9472]

A YANG Data Model for Reporting Software Bills of Materials (SBOMs) and Vulnerability Information
E. Lear
S. Rose
October 2023
RFC 9472
DOI 10.17487/RFC9472
[RFC6241]

Network Configuration Protocol (NETCONF)
R. Enns, Ed.
M. Bjorklund, Ed.
J. Schoenwaelder, Ed.
A. Bierman, Ed.
June 2011
RFC 6241
DOI 10.17487/RFC6241
[RFC8040]

RESTCONF Protocol
A. Bierman
M. Bjorklund
K. Watsen
January 2017
RFC 8040
DOI 10.17487/RFC8040
[RFC7950]

The YANG 1.1 Data Modeling Language
M. Bjorklund, Ed.
August 2016
RFC 7950
DOI 10.17487/RFC7950
[RFC3688]

The IETF XML Registry
M. Mealling
January 2004
BCP 81
RFC 3688
DOI 10.17487/RFC3688
[RFC8345]

A YANG Data Model for Network Topologies
A. Clemm
J. Medved
R. Varga
N. Bahadur
H. Ananthakrishnan
X. Liu
March 2018
RFC 8345
DOI 10.17487/RFC8345
Change log
RFC Editor Note: This section is to be removed during the final publication of the document.
version 02
- Added Appendix B for Entitlements Use Case.
version 01
- DMALMO data models will be adjusted once the terminology of the core IVY WG data models is agreed.
version 00
- Initial version of DMALMO, based on ALMO version 01 and DMLMO version 10.
Acknowledgments
This document was created by meaningful contributions from Josh Suhr, Eric Vyncke, Yannis Viniotis, Nagendra Kumar Nainar, Yenu Gobena, Dhiren Tailor, Jan Lindblad and Shwetha Bhandari.
The authors wish to thank Gonzalo Salgueiro, Martin Beverley, Mohamed Boucadair, Ignacio Dominguez Martinez, and many others for their helpful comments and suggestions.
Appendix A: DMALMO independent of any based inventory YANG models
Hardware network inventory is described as part of network topology which is defined in [RFC8345], it has been explored in several IETF work as it might need an extension for some of the use cases that need to consume inventory information. This is the case for ALMO and DMALMO, as assets are defined as hardware, software or even service instances.
This section summarizes and provides an example with the changes to make DMALMO compatible to any future changes that will come as part of the current inventory discussions and decisions.
DMLMO version -09 provided the approach to make DMALMO independent from the network inventory discussions, providing a way to consume any inventory management module(s). Version -09 contains changes to accommodate ietf-almo-assets, to any other inventory module that might be required.
The following example considers iana-hardware and ietf-network-inventory YANG modules as inventory YANG modules to consider. It could include others, i.e., openconfig-platform.

<CODE BEGINS> file "iana-hardware@.yang"
module iana-hardware {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:iana-hardware";
  prefix ianahw;

  organization "IANA";
  contact
    "        Internet Assigned Numbers Authority

     Postal: ICANN
             12025 Waterfront Drive, Suite 300
             Los Angeles, CA  90094-2536
             United States of America

     Tel:    +1 310 301 5800
     E-Mail: iana@iana.org>";

  description
    "IANA-defined identities for hardware class.

     The latest revision of this YANG module can be obtained from
     the IANA website.

     Requests for new values should be made to IANA via
     email (iana@iana.org).

     Copyright (c) 2018 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).

     The initial version of this YANG module is part of RFC 8348;
     see the RFC itself for full legal notices.";
  reference
    "https://www.iana.org/assignments/yang-parameters";

  revision 2018-03-13 {
    description
      "Initial revision.";
    reference
      "RFC 8348: A YANG Data Model for Hardware Management";
  }

  /*
   * Identities
   */

  identity hardware-class {
    description
      "This identity is the base for all hardware class
       identifiers.";
  }

  identity unknown {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is unknown
       to the server.";
  }

  identity chassis {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is an
       overall container for networking equipment.  Any class of
       physical component, except a stack, may be contained within a
       chassis; a chassis may only be contained within a stack.";
  }

  identity backplane {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is some sort
       of device for aggregating and forwarding networking traffic,
       such as a shared backplane in a modular ethernet switch.  Note
       that an implementation may model a backplane as a single
       physical component, which is actually implemented as multiple
       discrete physical components (within a chassis or stack).";
  }

  identity container {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is capable
       of containing one or more removable physical entities,
       possibly of different types.  For example, each (empty or
       full) slot in a chassis will be modeled as a container.  Note
       that all removable physical components should be modeled
       within a container component, such as field-replaceable
       modules, fans, or power supplies.  Note that all known
       containers should be modeled by the agent, including empty
       containers.";
  }

  identity power-supply {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is a
       power-supplying component.";
  }

  identity fan {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is a fan or
       other heat-reduction component.";
  }

  identity sensor {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is some sort
       of sensor, such as a temperature sensor within a router
       chassis.";
  }

  identity module {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is some sort
       of self-contained sub-system.  If a module component is
       removable, then it should be modeled within a container

       component; otherwise, it should be modeled directly within
       another physical component (e.g., a chassis or another
       module).";
  }

  identity port {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is some sort
       of networking port capable of receiving and/or transmitting
       networking traffic.";
  }

  identity stack {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is some sort
       of super-container (possibly virtual) intended to group
       together multiple chassis entities.  A stack may be realized
       by a virtual cable, a real interconnect cable attached to
       multiple chassis, or multiple interconnect cables.  A stack
       should not be modeled within any other physical components,
       but a stack may be contained within another stack.  Only
       chassis components should be contained within a stack.";
  }

  identity cpu {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is some sort
       of central processing unit.";
  }

  identity energy-object {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is some sort
       of energy object, i.e., it is a piece of equipment that is
       part of or attached to a communications network that is
       monitored, it is controlled, or it aids in the management of
       another device for Energy Management.";
  }

  identity battery {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is some sort
       of battery.";
  }

  identity storage-drive {
    base ianahw:hardware-class;
    description
      "This identity is applicable if the hardware class is some sort
       of component with data storage capability as its main
       functionality, e.g., hard disk drive (HDD), solid-state device
       (SSD), solid-state hybrid drive (SSHD), object storage device
       (OSD), or other.";
  }
<CODE ENDS>
}

<CODE BEGINS> file "ietf-network-inventory@2022-07-11.yang"
module ietf-network-inventory {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-network-inventory";
  prefix ni;

  import ietf-yang-types {
    prefix yang;
    reference
      "RFC6991: Common YANG Data Types.";
  }

  import iana-hardware {
    prefix ianahw;
    reference
      "RFC 8348: A YANG Data Model for Hardware Management.";
  }

  import ietf-inet-types {
    prefix inet;
  }

  organization
    "IETF CCAMP Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/ccamp/>
     WG List:  <mailto:ccamp@ietf.org>

     Editor:   Chaode Yu
               <yuchaode@huawei.com>

     Editor:   Italo Busi
               <italo.busi@huawei.com>

     Editor:   Aihua Guo
               <aihuaguo.ietf@gmail.com>

     Editor:   Sergio Belotti
               <sergio.belotti@nokia.com>

     Editor:   Jean-Francois Bouquier
               <jeff.bouquier@vodafone.com>

     Editor:   Fabio Peruzzini
               <fabio.peruzzini@telecomitalia.it>";

  description
    "This module defines a model for retrieving network inventory.
    The model fully conforms to the Network Management
    Datastore Architecture (NMDA).

    Copyright (c) 2022 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).

    This version of this YANG module is part of RFC XXXX; see
    the RFC itself for full legal notices.

    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.";

  // RFC Ed.: replace XXXX with actual RFC number and remove this
  // note.
  // RFC Ed.: update the date below with the date of RFC publication
  // and remove this note.

  revision 2022-07-11 {
    description
      "version 3.0.0";
    reference
      "draft-yg3bp-ccamp-inventory-yang-01: A YANG Data
      Model for Network Inventory.";
  }

  revision 2022-03-04 {
    description
      "version 3.0.0";
    reference
      "draft-yg3bp-ccamp-inventory-yang-00: A YANG Data
      Model for Network Inventory.";
  }

  revision 2021-11-09 {
    description
      "version 2.0.0";
    reference
      "draft-yg3bp-ccamp-optical-inventory-yang-00: A YANG Data
      Model for Optical Network Inventory.";
  }

  revision 2021-10-25 {
    description
      "Initial revision.";
    reference
      "draft-yg3bp-ccamp-optical-inventory-yang-00: A YANG Data
      Model for Optical Network Inventory.";
  }

  container network-inventory {
    config true;
    description
      "The top-level container for the network inventory
      information.";
    uses equipment-rooms-grouping;
    uses network-elements-grouping;
  }

  grouping common-entity-attributes {
    description
      "A set of attributes which are common to all the entities
      (e.g., component, equipment room) defined in this module.";
    leaf uuid {
      config true;
      type string;
      description
        "Uniquely identifies an entity (e.g., component).";
    }
    leaf name {
      type string;
      description
        "A name for an entity (e.g., component), as specified by
        a network manager, that provides a non-volatile 'handle'
        for the entity and that can be modified anytime during the
        entity lifetime.

        If no configured value exists, the server MAY set the value
        of this node to a locally unique value in the operational
        state.";
    }
    leaf description {
      type string;
      description "a textual description of inventory object";
    }
    leaf alias {
      type string;
      description
      "a alias name of inventory objects. This alias name can be
      specified by network manager.";
    }
  }

  grouping network-elements-grouping {
    description
      "The attributes of the network elements.";
    container network-elements {
      description
        "The container for the list of network elements.";
      list network-element {
        key uuid;
        description
          "The list of network elements within the network.";
        uses common-entity-attributes;
        container ne-location {
          description
            "To be added.";
          leaf-list equipment-room-name {
            type leafref {
              path "/ni:network-inventory/ni:equipment-rooms/" +
                   "ni:equipment-room/ni:name";
            }
            description
              "Names of equipment rooms where the NE is located.
              Please note that a NE could be located in several
              equipment rooms.";
          }
        }
        uses ne-specific-info-grouping;
        uses components-grouping;
      }
    }
  }

  grouping ne-specific-info-grouping {
    description
      "To be added.";
    leaf hardware-rev {
      type string;
      description
        "The vendor-specific hardware revision string for the NE.";
    }
    leaf firmware-rev {
      type string;
      description
        "The vendor-specific firmware revision string for the NE.";
    }
    leaf software-rev {
      type string;
      description
        "The vendor-specific software revision string for the NE.";
    }
    leaf mfg-name {
      type string;
      description "The name of the manufacturer of this NE";
    }
    leaf mfg-date {
      type yang:date-and-time;
      description "The date of manufacturing of the NE.";
    }
    leaf part-number {
      type string;
      description
        "The vendor-specific model name identifier string associated
         with this NE.  The preferred value is the customer-visible
         part number, which may be printed on the NE itself.";
    }
    leaf serial-number {
      type string;
      description
        "The vendor-specific serial number string for the NE";
    }
    leaf product-name {
      type string;
      description
        "indicates the vendor-spefic device type infomation.";
    }
  }

  grouping equipment-rooms-grouping {
    description
      "The attributes of the equipment rooms.";
    container equipment-rooms {
      description
        "The container for the list of equipment rooms.";
      list equipment-room {
        key uuid;
        description
          "The list of equipment rooms within the network.";
        uses common-entity-attributes;
        leaf location {
          type string;
          description
            "compared with the location information of the other
            inventory objects, a GIS address is preferred for
            equipment room";
        }
        container racks {
          description
            "To be added.";
          list rack {
            key uuid;
            description
              "The list of racks within an equipment room.";
            uses common-entity-attributes;
            uses rack-specific-info-grouping;
            list contained-chassis {
              key "ne-ref component-ref";
              description
                "The list of chassis within a rack.";
              leaf ne-ref {
                type leafref {
                  path "/ni:network-inventory/ni:network-elements"
                  + "/ni:network-element/ni:uuid";
                }
                description
                  "The reference to the network element containing
                  the chassis component.";
              }
              leaf component-ref {
                type leafref {
                  path "/ni:network-inventory/ni:network-elements"
                  + "/ni:network-element[ni:uuid"
                  + "=current()/../ne-ref]/ni:components"
                  + "/ni:component/ni:uuid";
                }
                description
                  "The reference to the chassis component within
                  the network element and contained by the rack.";
              }
            }
          }
        }
      }
    }
  }

  grouping rack-specific-info-grouping {
    description
      "To be added.";
    container rack-location {
      description
        "To be added.";
      leaf equipment-room-name {
        type leafref {
          path "/ni:network-inventory/ni:equipment-rooms"
          + "/ni:equipment-room/ni:name";
        }
        description
        "Name of equipment room where this rack is located.";
      }
      leaf row-number {
        type uint32;
        description
          "Identifies the row within the equipment room where
          the rack is located.";
      }
      leaf column-number {
        type uint32;
        description
          "Identifies the physical location of the rack within
          the column.";
      }
    }
    leaf rack-number {
      type uint32;
      description
        "An integer identifier of rack.";
    }
    leaf height {
      type uint16;
      units millimeter;
      description
        "To be added.";
    }
    leaf width {
      type uint16;
      units millimeter;
      description
        "To be added.";
    }
    leaf depth {
      type uint16;
      units millimeter;
      description
        "To be added.";
    }
    leaf max-voltage {
      type uint16;
      units volt;
      description
        "The maximum voltage could be supported by the rack.";
    }
  }

  grouping components-grouping {
    description
      "The attributes of the hardware components.";
    container components {
      description
        "The container for the list of components.";
      list component {
        key uuid;
        description
          "The list of components within a network element.";
        uses common-entity-attributes;
        leaf location {
          type string;
          description
            "To be added.

            In optical transport network, the location string is
            using the following pattern:
              '/ne=<nw-ne-name>[/r=<r_index>][/sh=<sh_index>
              [/s_sh=<s_sh_index> ...]][[/sl=<sl_index>
              [/s_sl=<s_sl_index> ...]][/p=<p_index> …]]'
            ";
        }
        leaf class {
          type identityref {
            base ianahw:hardware-class;
          }
          description
            "An indication of the general hardware type of the
             component.";
          reference
            "RFC 8348: A YANG Data Model for Hardware Management.";
        }
        leaf-list contained-child {
          type leafref {
            path "../ni:uuid";
          }
          description
            "The child components' identifier that are physically
            contained by this component.";
        }
        leaf parent-rel-pos {
          type int32 {
            range "0 .. 2147483647";
          }
          description
            "To be added.";
          reference
            "RFC 6933: Entity MIB (Version 4) -
                       entPhysicalParentRelPos";
        }
        container parent-references {
          description
            "To be added.";
          leaf equipment-room-uuid {
            type leafref {
              path "/ni:network-inventory/ni:equipment-rooms/" +
                   "ni:equipment-room/ni:uuid";
            }
            description
              "To be added.";
          }
          leaf ne-uuid {
            type leafref {
              path "/ni:network-inventory/ni:network-elements/" +
                   "ni:network-element/ni:uuid";
            }
            description
              "To be added.";
          }
          leaf rack-uuid {
            type leafref {
              path "/ni:network-inventory/ni:equipment-rooms/" +
                   "ni:equipment-room/ni:racks/ni:rack/ni:uuid";
            }
            description
              "To be added.";
          }
          container component-references {
            description
              "To be added.";
            list component-reference {
              key index;
              description
                "this list object is used to indicate its
                hierarchial parent components' identifier.
                This hierarchial relation can be found by index
                parameter. The topest parent component should be
                0-index.";
              leaf index {
                type uint8;
                description
                  "To be added.";
              }
              leaf class {
                type leafref {
                  path "../../../../ni:class";
                }
                description
                  "To be added.";
              }
              leaf uuid {
                type leafref {
                  path "../../../../ni:uuid";
                }
                description
                  "To be added.";
              }
            }
          }
        }
        leaf hardware-rev {
          type string;
          description
            "The vendor-specific hardware revision string for the
             component.  The preferred value is the hardware revision
             identifier actually printed on the component itself (if
             present).";
          reference
            "RFC 6933: Entity MIB (Version 4) -
                       entPhysicalHardwareRev";
        }
        leaf firmware-rev {
          type string;
          description
            "The vendor-specific firmware revision string for the
             component.";
          reference
            "RFC 6933: Entity MIB (Version 4) -
                       entPhysicalFirmwareRev";
        }
        leaf software-rev {
          type string;
          description
            "The vendor-specific software revision string for the
             component.";
          reference
            "RFC 6933: Entity MIB (Version 4) -
                       entPhysicalSoftwareRev";
        }
        leaf serial-num {
          type string;
          description
            "The vendor-specific serial number string for the
             component.  The preferred value is the serial number
             string actually printed on the component itself (if
             present).";
          reference
            "RFC 6933: Entity MIB (Version 4) -
            entPhysicalSerialNum";
        }
        leaf mfg-name {
          type string;
          description
            "The name of the manufacturer of this physical component.
             The preferred value is the manufacturer name string
             actually printed on the component itself (if present).

             Note that comparisons between instances of the
             'model-name', 'firmware-rev', 'software-rev', and
             'serial-num' nodes are only meaningful amongst
             components with the same value of 'mfg-name'.

             If the manufacturer name string associated with the
             physical component is unknown to the server, then this
             node is not instantiated.";
          reference
            "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName";
        }
        leaf part-number {
          type string;
          description
            "The vendor-specific model name identifier string
             associated with this physical component.  The preferred
             value is the customer-visible part number, which may be
             printed on the component itself.

             If the model name string associated with the physical
             component is unknown to the server, then this node is
             not instantiated.";
          reference
            "RFC 6933: Entity MIB (Version 4) -
            entPhysicalModelName";
        }
        leaf asset-id {
          type string;
          description
            "This node is a user-assigned asset tracking identifier
             for the component.

             A server implementation MAY map this leaf to the
             entPhysicalAssetID MIB object.  Such an implementation
             needs to use some mechanism to handle the differences in
             size and characters allowed between this leaf and
             entPhysicalAssetID.  The definition of such a mechanism
             is outside the scope of this document.";
          reference
            "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID";
        }
        leaf is-fru {
          type boolean;
          description
            "This node indicates whether or not this component is
             considered a 'field-replaceable unit' by the vendor.  If
             this node contains the value 'true', then this component
             identifies a field-replaceable unit.  For all components
             that are permanently contained within a
             field-replaceable unit, the value 'false' should be
             returned for this node.";
          reference
            "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU";
        }
        leaf mfg-date {
          type yang:date-and-time;
          description
            "The date of manufacturing of the managed component.";
          reference
            "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate";
        }
        leaf-list uri {
          type inet:uri;
          description
            "This node contains identification information about the
             component.";
          reference
            "RFC 6933: Entity MIB (Version 4) - entPhysicalUris";
        }
        uses component-specific-info-grouping;
      }
    }
  }

  grouping component-specific-info-grouping {
    description
      "In case if there are some missing attributes of component not
      defined by RFC8348. These attributes could be
      component-specific.
      Here we provide a extension structure for all the components
      we recognized. We will enrich these component specifc
      containers in the future.";
    choice component-class {
      description
        "To be added.";
      case chassis {
        when "./class = 'ianahw:chassis'";
        container chassis-specific-info {
          description
            "This container contains some attributes belong to
            chassis only.";
          uses chassis-specific-info-grouping;
        }
      }
      case container {
        when "./class = 'ianahw:container'";
        container slot-specific-info {
          description
            "This container contains some attributes belong to
            slot or sub-slot only.";
          uses slot-specific-info-grouping;
        }
      }
      case module {
        when "./ni:class = 'ianahw:module'";
        container board-specific-info {
          description
            "This container contains some attributes belong to
            board only.";
          uses board-specific-info-grouping;
        }
      }
      case port {
        when "./ni:class = 'ianahw:port'";
        container port-specific-info {
          description
            "This container contains some attributes belong to
            port only.";
          uses port-specific-info-grouping;
        }
      }
    //TO BE ADDED: transceiver
    }
  }

  grouping chassis-specific-info-grouping {
  //To be enriched in the future.
    description
      "To be added.";
  }

  grouping slot-specific-info-grouping {
  //To be enriched in the future.
    description
      "To be added.";
  }

  grouping board-specific-info-grouping {
  //To be enriched in the future.
    description
      "To be added.";
  }

  grouping port-specific-info-grouping {
  //To be enriched in the future.
    description
      "To be added.";
  }
<CODE ENDS>
}

The YANG modules ietf-almo-example-mapping-ietf-network-inventory and ietf-almo-example-mapping-openconfig-platform make the import of the inventory module(s) and augment the ietf-almo-assets YANG module to include inventory attributes to the asset identity.
For this practice, ietf-almo-assets.yang, removes vendor, name, description, pid, serial-number, vid, mac-address, ip-address, entity-name, product-description, udi, transparency-info as these and similar properties are expected to be managed using other inventory mechanism.
This process requires to include a mapping YANG module per imported inventory YANG module.
Module ietf-almo-example-mapping-ietf-network-inventory, makes the mapping between ietf-network-inventory and ietf-almo-assets, augmenting asset identity:

<CODE BEGINS> file "ietf-almo-example-mapping-ietf-network-inventory@2023-10-23.yang"
module ietf-almo-example-mapping-ietf-network-inventory {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-almo-example-mapping-ietf-network-inventory";
  prefix ietf-almo-example-map-ietf;

  import ietf-almo {
    prefix ietf-almo;
  }
  import ietf-almo-assets {
    prefix ietf-almo-asset;
  }
  import ietf-network-inventory {
    prefix ni;
  }
  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Editor:  Jan Lindblad
              <mailto:jlindbla@cisco.com>
     Editor:  Marisol Palmero
              <mailto:mpalmero@cisco.com>";

  description
    "This YANG module maps the IETF LMO asset concept to the
     IETF network inventory framework.

     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 2023-10-23 {
    description
      "Renamed all references from LMO to ALMO. Refer to
      DMLMO draft";
    reference
      "RFC XXXX: ALMO YANG Model";
  }

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst {
    when "derived-from-or-self(../ietf-almo:almo-class,'ietf-almo-asset:asset')";

    choice mapping-type {
      // config true;
      description
        "mapping type description";
      case network-element {
        leaf network-element-ref {
          type leafref {
            path "/ni:network-inventory/ni:network-elements/"
            + "ni:network-element/ni:uuid";
          }
          description
            "network element reference description";
        }
      }
      case component {
        leaf component-network-element-ref {
          type leafref {
            path "/ni:network-inventory/ni:network-elements/"
            + "ni:network-element/ni:uuid";
          }
          description
            "component network element reference description";
        }
        leaf component-ref {
          type leafref {
            path "/ni:network-inventory/ni:network-elements/"
            + "ni:network-element"
            + "[ni:uuid = current()/../network-element-ref]/"
            + "ni:components/ni:component/ni:uuid";
          }
          description
            "component reference description";
          }
      }
      case rack {
        leaf rack-equipment-room-ref {
          type leafref {
            path "/ni:network-inventory/ni:equipment-rooms/"
            + "ni:equipment-room/ni:uuid";
          }
          description
            "rack equipment room reference description";
        }
        leaf rack-ref {
          type leafref {
            path "/ni:network-inventory/ni:equipment-rooms/"
            + "ni:equipment-room"
            + "[ni:uuid = current()/../rack-equipment-room-ref]/"
            + "ni:racks/ni:rack/ni:uuid";
          }
          description
            "rack reference description";
        }
      }
    }

    description
      "This adds a reference from LMO instances of class 'asset'
       to the IETF network inventory tree.";
  }
<CODE ENDS>
}

Module ietf-almo-example-mapping-openconfig-platform, includes the mapping between openconfig-platform and ietf-almo-assets, augmenting asset identity:

<CODE BEGINS> file "ietf-almo-example-mapping-openconfig-platform@2023-10-23.yang"
module ietf-almo-example-mapping-openconfig-platform {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-almo-example-mapping-openconfig-platform";
  prefix ietf-almo-example-map-oc;

  import ietf-almo {
    prefix ietf-almo;
  }
  import ietf-almo-assets {
    prefix ietf-almo-asset;
  }
  // For the show case, import statement should be uncommented,
  // import openconfig-platform {
  //  prefix oc-platform;
  // }
  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Editor:  Jan Lindblad
              <mailto:jlindbla@cisco.com>
     Editor:  Marisol Palmero
              <mailto:mpalmero@cisco.com>";
  description
    "This YANG module maps the IETF LMO asset concept to the
     OpenConfig platform framework.

     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 2023-10-23 {
    description
      "Renamed all references from LMO to ALMO. Refer to
      DMLMO draft";
    reference
      "RFC XXXX: ALMO YANG Model";
  }

  augment /ietf-almo:almos/ietf-almo:almo/ietf-almo:inst {
    when "derived-from-or-self(../ietf-almo:almo-class,'ietf-almo-asset:asset')";

    leaf oc-component-ref {
      type string;
      config true;
      // leafref path "/oc-platform:components/oc-platform:component/"
      // + "oc-platform:name";
      // this is simplified version to show case
      description "simplified example to include component reference";
    }

    description
      "This adds a reference from LMO instances of class 'asset'
       to the OpenConfig platform tree.";
  }
<CODE ENDS>
}

openconfig-platform.yang is not included in the section for simplicity of the output.
Once compilation is applied to the YANG modules, the following configuration, considers network element "router2" as a hardware network element, which is described under network-inventory YANG module:
network-inventory network-elements network-element 22222 name router2 hardware-rev 1.1 software-rev 17.1 mfg-name cisco serial-number AF123456 product-name ASR1k components component fan part-number 678678 components component psu part-number 654321
"router2" asset identity is augmented including attributes from ietf-network-inventory(i.e. rack-equipment-room-ref, rack-ref, network-element-ref, etc) and any other imported YANG module, i.e. openconfig-platform inventory YANG modules, with oc-component-ref.
lmo0(config)#lmos lmo asset inst router2 ? Possible completions: activation-date age aggregation capture-info component-network-element-ref
component-ref ietf-almo-asset:deployment-mode ietf-almo-feature:features install-location interfaces licenses network-element-ref number-of-instances oc-component-ref parent
platform-dependency-os rack-equipment-room-ref rack-ref role sign-of-life-timestamp
software-type software-version tags
Changes in future versions of DMLMO, might require one unique import statement in the mapping YANG module, from another inventory YANG module.
Appendix B: Entitlement explanation, scope and modelling
Under DLMO, Entitlements entitle an actor (e.g. organisations, individuals) the use of a feature provided by an asset. Entitlements under this context could also be called actor’s rights, commercial usage entitlements, or Commercial licensing agreements. Based on the context mentioned, one of the models is shown below.
Please note that DLMO entitlements are not security entitlements or access list type of control.
Scope of the entitlement model
The DLMO YANG model aims to establish an inventory of entitlements, providing details on each entitlement it encompasses. This includes the entitled actors and the features to which they are entitled. Additionally, it offers further information into the utilization of the entitlements, facilitating an understanding of how close a feature is to reaching its entitlement limit.
In general, this model seeks to address the following questions:
*What entitlements are administered/owned by the organization (entitlement's inventory)? *How are entitlements linked to actors/assets? *What constraints do assets, under the current entitlements, impose on the actors' use of the asset's features? *How are entitlements utilized? Which actors are using features backed by entilements? And in cases where the entitlements provide limits, how close the use of those features is to those limits.
These points will be elaborated further in sections below. Initially, we will delineate some aspects not covered by this model, followed by an explanation of features.
The model is designed with flexibility in mind, allowing for expansion through the utilization of tools provided by YANG.
Out of scope elmements of the DLMO entitlement model
The realm of entitlements or licenses is inherently complex, presenting challenges in creating a model that can comprehensively encompass all scenarios without ambiguity. While we strive to address various situations through examples and use cases, it's important to acknowledge that the model might not be able to cover all corner cases without ambiguity. In such cases, we recommend implementations provide additional documentation to clarify potential ambiguities.
The current model does not aim to serve as a catalog of licenses. While it may accommodate basic scenarios, it does not aim to cover the full spectrum of license characteristics, which can vary significantly. Instead, our focus is on providing a general framework for describing relationships and answering the questions we in scope mentioned above.
To clarify, here are some questions that our model does not attempt to answer:
*What are the implications of purchasing a specific entitlement? *Which license should I acquire to get feature X? *Is license migration feasible?
It's important to emphasize that this model primarily addresses the commercial utilization of features, rather than access control. For instance, if a network device cannot be configured for MPLS due to licensing restrictions, this implies that the organization owning the router (the actor in this scenario) is not permitted to utilize the MPLS feature. This distinction is separate from, for instance, the ability of user Y to configure MPLS due to access control limitations.
In some cases, the model will not contain information on why an actor can use a feature. The model does provide information on the attachments of entitlements to actors, but some licenses can entiltle actors without being attached to them. The model could provide descriptive information on which actors are covered by a license (by expanding the mdoel, see use case B below), but it does not say directly why an actor is entitled.
Features
Entitlements entitle an actor to enjoy a feature of an asset. In some cases, this feature can simply be the use of the asset itself (e.g., the use of software, the use of network equipment). However, in common cases, assets can offer a rich array of features that are subject to entitlement levels.
Under DLMO, we do not attempt to model features exhaustively. Instead, we provide a descriptive definition of features, which falls under the responsibility of the model's implementers.
We'll provide examples of feature definitions in our use cases.
Entitlements Modeling
The model aims to provide a framework for addressing the questions outlined above across various use cases. In this section, we delve deeper into these questions, offering examples to demonstrate why some are more complex than initially perceived.
Use case A: What entitlements are administered/owned by the organization (entitlement's inventory)?
The model should facilitate listing all entitlements associated with a set of assets under the same asset administration. In scenarios where entitlements are tied to assets, the asset itself could provide this information. Alternatively, providers may support something similar to a license server, which could house comprehensive information regarding an organization's licenses.
Within the model, all entitlements and features are listed using their respective ietf-almo class:

module: ietf-almo
  +--rw almos
     +--rw almo* [almo-class]
        +--rw almo-class    identityref
        +--rw inst* [id]

Just by listing the entitlements, and provide their basic information, a netconf client will be able to retrieve basic inventory information of existing entitlements, without processing the more complex relationships that we will describe in the next section.
Entitlements might be listed by multiple assets. For instance, a license server, functioning as an asset, might list an entitlement, while the asset entitled by the license might also list it. Proper identification of entitlements is imperative to ensure consistency across systems, enabling monitoring systems to recognize when multiple assets list the same entitlement.
Furthermore, there are cases where an authorized asset might not be aware of the covering license. Consider the scenario of a site license, wherein any device under the site may utilize a feature without explicit knowledge of the covering license. In such cases, asset awareness relies on management controls or a service license capable of listing it.
The model accommodates listing entitlements acquired by the organization but not yet applied or utilized by any actor/asset. For these "pending" entitlements, logistical constraints may arise in informing their existence, as there must be at least one element exporting the model that is aware of their existence.
Use case B: What is the link between a license and assets/actors?
Attaching an entitlement to an asset/actor means that the entitlement is exclusively used by that actor/asset.
The "attachhement" of licenses to actors and assets is done within the entitlement class:

           +--rw ietf-almo-entitlements:entitlement-attachements
           |  +--rw ietf-almo-entitlements:entity
           |  |  +--rw ietf-almo-entitlements:organizations
           |  |  |  +--rw ietf-almo-entitlements:organization* [almo-class id]
           |  |  |     +--rw ietf-almo-entitlements:almo-class    -> /ietf-almo:almos/almo/almo-class
           |  |  |     +--rw ietf-almo-entitlements:id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
           |  |  +--rw ietf-almo-user:users
           |  |     +--rw ietf-almo-user:users* [almo-class id]
           |  |        +--rw ietf-almo-user:almo-class    -> /ietf-almo:almos/almo/almo-class
           |  |        +--rw ietf-almo-user:id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
           |  +--rw ietf-almo-entitlements:assets
           |     +--rw ietf-almo-entitlements:assets
           |        +--rw ietf-almo-entitlements:asset* [almo-class id]
           |           +--rw ietf-almo-entitlements:almo-class    -> /ietf-almo:almos/almo/almo-class
           |           +--rw ietf-almo-entitlements:id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id

Many licenses are inherently associated with an actor and user. For example, a software license might be directly attached to a user. Also, the use of a network device might come with a basic license provided solely to an organization.
It's important to note that the current model does not provide information on whether an entitlement can be reassigned to other devices (e.g., fixed or floating license). Such scenarios fall under the "what if" category, which is not covered by this model.
Additionally, some licenses may entitle a user to an asset without the entitlement being explicitly attached to either party. For instance, a site license may provide access to multiple users without being directly linked to them.
Note that attachment is optional. Entitlements are normally linked to an organization, but this is not mandatory by the model. Entilements might also not be linked to any asset, for instance, when they are able of covering multiple ones.
While attachment is optional, the model should be capable of expressing attachment in various scenarios. The model can be expanded to list to which actors/assets an entitlement is aimed for, when this link is more vague, such as a site license (e.g., assets located in a specific site), or more open licenses (e.g., free software for all users subscribed to a streaming platform).
Use case C: What constraints do assets in the context impose on the actors' use of the asset's features?
Assets provide various features or capabilities to actors, which may be restricted based on the availability of proper entitlements.
The use of an entitlement signifies permission to access specific features associated with an asset. However, it's essential for the model to provide information on the status of the entitlement, particularly if it is at risk of being infringed upon. This can help organizations stay informed about their entitlement usage and take necessary actions to prevent potential violations or overuse of features.
All the information related to how an asset provides a feature to actors is included under the feature container wihtin the asset class, under the entitlements-info container.

           +--rw ietf-almo-feature:features
           |  +--rw ietf-almo-feature:feature* [almo-class id]
           |     +--rw ietf-almo-feature:almo-class                -> /ietf-almo:almos/almo/almo-class
           |     +--rw ietf-almo-feature:id                        -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
           |     +--ro ietf-almo-entitlements:entitlements-info
           |        +--ro ietf-almo-entitlements:entities-entitlement-info* []
           |           +--ro ietf-almo-entitlements:entity-entitlement-info
           |           |  +--ro ietf-almo-entitlements:organizations
           |           |  |  +--ro ietf-almo-entitlements:organization* [almo-class id]
           |           |  |     +--ro ietf-almo-entitlements:almo-class    -> /ietf-almo:almos/almo/almo-class
           |           |  |     +--ro ietf-almo-entitlements:id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
           |           |  +--ro ietf-almo-user:users
           |           |     +--ro ietf-almo-user:users* [almo-class id]
           |           |        +--ro ietf-almo-user:almo-class    -> /ietf-almo:almos/almo/almo-class
           |           |        +--ro ietf-almo-user:id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
           |           +--ro ietf-almo-entitlements:entitlements
           |           |  +--ro ietf-almo-entitlements:entitlement* [almo-class id]
           |           |     +--ro ietf-almo-entitlements:almo-class    -> /ietf-almo:almos/almo/almo-class
           |           |     +--ro ietf-almo-entitlements:id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
           |           +--ro ietf-almo-entitlements:entitled?                  boolean
           |           +--ro ietf-almo-entitlements:infriges?                  boolean
           |           +--ro ietf-almo-entitlements:in-use?                    boolean

For focus, the leafs related to the use of features are hidden, but are explained in the next section.
Note that here the actor (e.g. organization or user) is linked again with the feature. This might look redundant for simple cases (see use case 1), but if it is important when the element has the ability of providing detailed information of enttilement for specific users (see other use case, TBD). This also allwos to explicitly state which users have attempted to use the feature, but did not have the correct entitlement.
Use case D: Entitlements utilization, the actors using features backed by entilements, and how close the features-usage is to the imposed limits (cases where the entitlements provide limits).

           +--rw ietf-almo-feature:features
           |  +--rw ietf-almo-feature:feature* [almo-class id]
           |     +--rw ietf-almo-feature:almo-class                -> /ietf-almo:almos/almo/almo-class
           |     +--rw ietf-almo-feature:id                        -> /ietf-almo:almos/almo/ietf-almo:almo-class =  current()/../almo-class]/inst/id
           |     +--ro ietf-almo-entitlements:entitlements-info
           |        +--ro ietf-almo-entitlements:entities-entitlement-info* []
           |           +--ro ietf-almo-entitlements:entity-entitlement-info
           |           |  +--ro ietf-almo-entitlements:organizations
           |           |  |  +--ro ietf-almo-entitlements:organization* [almo-class id]
           |           |  |     +--ro ietf-almo-entitlements:almo-class    -> /ietf-almo:almos/almo/almo-class
           |           |  |     +--ro ietf-almo-entitlements:id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
           |           |  +--ro ietf-almo-user:users
           |           |     +--ro ietf-almo-user:users* [almo-class id]
           |           |        +--ro ietf-almo-user:almo-class    -> /ietf-almo:almos/almo/almo-class
           |           |        +--ro ietf-almo-user:id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
           |           +--ro ietf-almo-entitlements:entitlements
           |           |  +--ro ietf-almo-entitlements:entitlement* [almo-class id]
           |           |     +--ro ietf-almo-entitlements:almo-class    -> /ietf-almo:almos/almo/almo-class
           |           |     +--ro ietf-almo-entitlements:id            -> /ietf-almo:almos/almo[ietf-almo:almo-class =  current()/../almo-class]/inst/id
           |           +--ro ietf-almo-entitlements:entitled?                  boolean
           |           +--ro ietf-almo-entitlements:infriges?                  boolean
           |           +--ro ietf-almo-entitlements:in-use?                    boolean
           |           +--ro ietf-almo-entitlements:entitlement-limit
           |              +--ro ietf-almo-entitlements:users
           |              |  +--ro ietf-almo-entitlements:value?     uint32
           |              |  +--ro ietf-almo-entitlements:maximum?   uint32
           |              +--ro ietf-almo-entitlements:cpus
           |              |  +--ro ietf-almo-entitlements:value?     uint32
           |              |  +--ro ietf-almo-entitlements:maximum?   uint32
           |              +--ro ietf-almo-entitlements:bandwidth
           |                 +--ro ietf-almo-entitlements:value?     decimal64
           |                 +--ro ietf-almo-entitlements:maximum?   decimal64

Use cases
Single Device with a single license allowing its general functionality

{
  "ietf-almo:almos": {
    "ietf-almo:almo": [
      {
        "ietf-almo:almo-class": "ietf-almo-assets:asset",
        "inst": [
          {
            "id": "device_one",
            "ietf-almo-feature:features": {
              "feature": [
                {
                  "almo-class": "feature",
                  "id": "general_device_operation",
                  "ietf-almo-entitlements:entitlements-info": {
                    "entities-entitlement-info": [
                      {
         "entity-entitlement-info": {
           "organizations": {
             "organization": [
               {
               "almo-class": "ietf-almo-organization:organization",
               "id": "main_organization"
               }
             ]
           }
         },
                        "entitlements": {
                          "entitlement": [
                            {
                              "almo-class": "ietf-almo-entitlements:entitlement",
                              "id": "entilement_one"
                            }
                          ]
                        },
                        "ietf-almo-entitlements:entitled": true,
                        "ietf-almo-entitlements:in-use": true,
                        "ietf-almo-entitlements:infriges": false
                      }
                    ]
                  }
                }
              ]
            }
          }
        ]
      },
      {
        "ietf-almo:almo-class": "ietf-almo-feature:feature",
        "inst": [
          {
            "id": "general_device_operation"
          }
        ]
      },
      {
        "ietf-almo:almo-class": "ietf-almo-organization:organization",
        "inst": [
          {
            "id": "main_organization"
          }
        ]
      },
      {
        "ietf-almo:almo-class": "ietf-almo-entitlements:entitlement",
        "inst": [
          {
            "id": "entilement_one",
            "ietf-almo-entitlements:uid": "uid12345",
            "ietf-almo-entitlements:state": "active",
            "ietf-almo-entitlements:renewal-profile": {
              "activation-date": "2020-10-10T00:00:01Z",
              "expiration-date": "2030-10-10T00:00:01Z"
            },
            "ietf-almo-entitlements:entitlement-attachements": {
              "entity": {
                "organizations": {
                  "organization": [
                    {
                      "almo-class": "ietf-almo-organization:organization",
                      "id": "main_organization"
                    }
                  ]
                }
              },
              "assets": {
                "assets": {
                  "asset": [
                    {
                      "almo-class": "ietf-almo-assets:asset",
                      "id": "device_one"
                    }
                  ]
                }
              }
            }
          }
        ]
      }
    ]
  }
}

A device with multiple features set on different license levels

{
  "ietf-almo:almos": {
    "ietf-almo:almo": [
      {
        "ietf-almo:almo-class": "ietf-almo-assets:asset",
        "inst": [
          {
            "id": "device_one",
            "ietf-almo-feature:features": {
              "feature": [
                {
                  "almo-class": "feature",
                  "id": "general_device_operation",
                  "ietf-almo-entitlements:entitlements-info": {
                    "entities-entitlement-info": [
                      {
                        "entity-entitlement-info": {
                          "organizations": {
                            "organization": [
                              {
                                "almo-class": "ietf-almo-organization:organization",
                                "id": "main_organization"
                              }
                            ]
                          }
                        },
                        "entitlements": {
                          "entitlement": [
                            {
                              "almo-class": "ietf-almo-entitlements:entitlement",
                              "id": "medium_entitlement"
                            }
                          ]
                        },
                        "ietf-almo-entitlements:entitled": true,
                        "ietf-almo-entitlements:in-use": true,
                        "ietf-almo-entitlements:infriges": false
                      }
                    ]
                  }
                },
                {
                  "almo-class": "feature",
                  "id": "basic_feature",
                  "ietf-almo-entitlements:entitlements-info": {
                    "entities-entitlement-info": [
                      {
                        "entity-entitlement-info": {
                          "organizations": {
                            "organization": [
                              {
                                "almo-class": "ietf-almo-organization:organization",
                                "id": "main_organization"
                              }
                            ]
                          }
                        },
                        "entitlements": {
                          "entitlement": [
                            {
                              "almo-class": "ietf-almo-entitlements:entitlement",
                              "id": "medium_entitlement"
                            }
                          ]
                        },
                        "ietf-almo-entitlements:entitled": true,
                        "ietf-almo-entitlements:in-use": true,
                        "ietf-almo-entitlements:infriges": false
                      }
                    ]
                  }
                },
                {
                  "almo-class": "feature",
                  "id": "medium_feature",
                  "ietf-almo-entitlements:entitlements-info": {
                    "entities-entitlement-info": [
                      {
                        "entity-entitlement-info": {
                          "organizations": {
                            "organization": [
                              {
                                "almo-class": "ietf-almo-organization:organization",
                                "id": "main_organization"
                              }
                            ]
                          }
                        },
                        "entitlements": {
                          "entitlement": [
                            {
                              "almo-class": "ietf-almo-entitlements:entitlement",
                              "id": "medium_entitlement"
                            }
                          ]
                        },
                        "ietf-almo-entitlements:entitled": true,
                        "ietf-almo-entitlements:in-use": true,
                        "ietf-almo-entitlements:infriges": false
                      }
                    ]
                  }
                },
                {
                  "almo-class": "feature",
                  "id": "advanced_feature",
                  "ietf-almo-entitlements:entitlements-info": {
                    "entities-entitlement-info": [
                      {
                        "entity-entitlement-info": {
                          "organizations": {
                            "organization": [
                              {
                                "almo-class": "ietf-almo-organization:organization",
                                "id": "main_organization"
                              }
                            ]
                          }
                        },
                        "ietf-almo-entitlements:entitled": false,
                        "ietf-almo-entitlements:in-use": false,
                        "ietf-almo-entitlements:infriges": false
                      }
                    ]
                  }
                }
              ]
            }
          }
        ]
      },
      {
        "ietf-almo:almo-class": "ietf-almo-feature:feature",
        "inst": [
          {
            "id": "general_device_operation"
          },
          {
            "id": "basic_feature"
          },
          {
            "id": "medium_feature"
          },
          {
            "id": "advanced_feature"
          }
        ]
      },
      {
        "ietf-almo:almo-class": "ietf-almo-organization:organization",
        "inst": [
          {
            "id": "main_organization"
          }
        ]
      },
      {
        "ietf-almo:almo-class": "ietf-almo-entitlements:entitlement",
        "inst": [
          {
            "id": "basic_entitlement",
            "ietf-almo-entitlements:uid": "uid123451",
            "ietf-almo-entitlements:state": "active",
            "ietf-almo-entitlements:renewal-profile": {
              "activation-date": "2020-10-10T00:00:01Z",
              "expiration-date": "2030-10-10T00:00:01Z"
            },
            "ietf-almo-entitlements:entitlement-attachements": {
              "entity": {
                "organizations": {
                  "organization": [
                    {
                      "almo-class": "ietf-almo-organization:organization",
                      "id": "main_organization"
                    }
                  ]
                }
              },
              "assets": {
                "assets": {
                  "asset": [
                    {
                      "almo-class": "ietf-almo-assets:asset",
                      "id": "device_one"
                    }
                  ]
                }
              }
            }
          },
          {
            "id": "medium_entitlement",
            "ietf-almo-entitlements:uid": "uid123453",
            "ietf-almo-entitlements:state": "active",
            "ietf-almo-entitlements:renewal-profile": {
              "activation-date": "2020-10-10T00:00:01Z",
              "expiration-date": "2030-10-10T00:00:01Z"
            },
            "ietf-almo-entitlements:entitlement-attachements": {
              "entity": {
                "organizations": {
                  "organization": [
                    {
                      "almo-class": "ietf-almo-organization:organization",
                      "id": "main_organization"
                    }
                  ]
                }
              },
              "assets": {
                "assets": {
                  "asset": [
                    {
                      "almo-class": "ietf-almo-assets:asset",
                      "id": "device_one"
                    }
                  ]
                }
              }
            }
          }
        ]
      }
    ]
  }
}

A DB being license, need to add limitation

{
  "ietf-almo:almos": {
    "ietf-almo:almo": [
      {
        "ietf-almo:almo-class": "ietf-almo-assets:asset",
        "inst": [
          {
            "id": "database_one",
            "parent": {
              "almo-class": "ietf-almo-assets:asset",
              "id": "server_one"
            },
            "ietf-almo-feature:features": {
              "feature": [
                {
                  "almo-class": "feature",
                  "id": "db_operation",
                  "ietf-almo-entitlements:entitlements-info": {
                    "entities-entitlement-info": [
                      {
         "entity-entitlement-info": {
           "organizations": {
             "organization": [
               {
               "almo-class": "ietf-almo-organization:organization",
               "id": "main_organization"
               }
             ]
           }
         },
                        "entitlements": {
                          "entitlement": [
                            {
                              "almo-class": "ietf-almo-entitlements:entitlement",
                              "id": "entilement_one"
                            }
                          ]
                        },
                        "ietf-almo-entitlements:entitled": true,
                        "ietf-almo-entitlements:in-use": true,
                        "ietf-almo-entitlements:infriges": false
                      }
                    ]
                  }
                }
              ]
            }
          },
          {
            "id": "server_one"
          }
        ]
      },
      {
        "ietf-almo:almo-class": "ietf-almo-feature:feature",
        "inst": [
          {
            "id": "db_operation"
          }
        ]
      },
      {
        "ietf-almo:almo-class": "ietf-almo-organization:organization",
        "inst": [
          {
            "id": "main_organization"
          }
        ]
      },
      {
        "ietf-almo:almo-class": "ietf-almo-entitlements:entitlement",
        "inst": [
          {
            "id": "entilement_one",
            "ietf-almo-entitlements:uid": "uid12345",
            "ietf-almo-entitlements:state": "active",
            "ietf-almo-entitlements:renewal-profile": {
              "activation-date": "2020-10-10T00:00:01Z",
              "expiration-date": "2030-10-10T00:00:01Z"
            },
            "ietf-almo-entitlements:entitlement-attachements": {
              "entity": {
                "organizations": {
                  "organization": [
                    {
                      "almo-class": "ietf-almo-organization:organization",
                      "id": "main_organization"
                    }
                  ]
                }
              },
              "assets": {
                "assets": {
                  "asset": [
                    {
                      "almo-class": "ietf-almo-assets:asset",
                      "id": "database_one"
                    }
                  ]
                }
              }
            }
          }
        ]
      }
    ]
  }
}