Commit 8bd54c9e authored by chada's avatar chada
Browse files

Delete etsi-qkd-sdn-inventory@2021-07-31.yang

parent f5786dbe
Loading
Loading
Loading
Loading
+0 −645
Original line number Diff line number Diff line
/* Copyright 2021 ETSI
Licensed under the BSD-3 Clause (https://forge.etsi.org/legal-matters) */

module etsi-qkd-sdn-inventory {

  yang-version "1.1";

  namespace "urn:etsi:qkd:yang:etsi-qkd-sdn-inventory"; //TBD. Replaced when assigned.

  prefix "qkdnw-invt";
  
  import ietf-inet-types { prefix "inet"; }
  import etsi-qkd-node-types { prefix "etsi-qkdn-types"; }
  import etsi-qkd-sdn-topology { prefix "qkdnw-tplg"; }

  organization "ETSI ISG QKD";

  contact
    "https://www.etsi.org/committee/qkd
    djcha@sk.com";

  description
    "This module contains the groupings and containers composing the software-defined QKD network 
    inventory information models specified in ETSI GS QKD 018 V0.0.7";

  revision 2021-07-31 {
    description "This revision changes the naming of YANG module and its namespace. Prefix is not changed.";
  }

  revision 2021-06-17 {
    description "This revision adds ip and port of Key Management Entity(KME) in the SD-QKD node.
      This revision extends the notifications based on ETSI GS QKD 015";
  }

  revision 2021-06-04 {
    description "Initial revision";    
  }
  
  identity QKDN-STATUS-TYPES {
    description "Base identity used to identify the SD-QKD node status.";
  }
  identity NEW {
    base QKDN-STATUS-TYPES;
    description "The QKD node is installed.";
  }
  identity OPERATING {
    base QKDN-STATUS-TYPES;
    description "The QKD node is up.";
  }
  identity DOWN {
    base QKDN-STATUS-TYPES;
    description "The QKD node is not working as expected.";
  }
  identity FAILURE {
    base QKDN-STATUS-TYPES;
    description "The QKD node cannot be accessed by SDN controller with communication failure.";
  }
  identity OUT {
    base QKDN-STATUS-TYPES;
    description "The QKD node is switched off and uninstalled.";
  }
  typedef qkdn-status-types {
    type identityref {
      base QKDN-STATUS-TYPES;
    }
    description "This type represents the status of the SD-QKD node.";
  }
 
  identity PATH-RESTORATION-TYPE {
    description "Base identity from which path restoration types are derived.";
  }
  identity AUTOMATIC {
    base PATH-RESTORATION-TYPE;
    description "The path restoration starts automatically.";
  }
  identity MANUAL {
    base PATH-RESTORATION-TYPE;
    description "The path restoration starts manually.";
  }
  typedef path-restoration-type {
    type identityref {
      base PATH-RESTORATION-TYPE;
    }
    description "This type represents path restoration types of QKD virtual link.";
  }

  grouping qkdn_id_ref {
    leaf qkdn_id_ref {
      type leafref {
        path "/qkdnw-tplg:qkd_network/qkdnw-tplg:sdqkd_nodes/qkdnw-tplg:qkdn/qkdnw-tplg:qkdn_id";
      }
      description "Used to reference a SD-QKD node.";
    }
  }

  grouping qkdi_id_ref {
    leaf qkdi_id_ref {
      type leafref {
        path "/qkdnw-tplg:qkd_network/qkdnw-tplg:sdqkd_nodes/qkdnw-tplg:qkdn[qkdnw-tplg:qkdn_id=current()/../qkdn_id_ref]"+
          "/qkdnw-tplg:qkd_interfaces/qkdnw-tplg:qkdi/qkdnw-tplg:qkdi_id";
      }
      description "Used to reference an interface of the SD-QKD node. Interfaces are identified to the SD-QKD node that contains them.";
    }
  }

  grouping phys_link_id_ref {
    leaf phys_link_id_ref {
      type leafref {
        path "/qkdnw-tplg:qkd_network/qkdnw-tplg:qkd_links/qkdnw-tplg:qkd_phys_links/qkdnw-tplg:phys_link/qkdnw-tplg:phys_link_id";
      }
    }
    description "Used to reference a QKD physical link.";
  }

  grouping virt_link_id_ref {
    leaf virt_link_id_ref {
      type leafref {
        path "/qkdnw-tplg:qkd_network/qkdnw-tplg:qkd_links/qkdnw-tplg:qkd_virt_links/qkdnw-tplg:virt_link/qkdnw-tplg:virt_link_id";
      }
    }
    description "Used to reference a QKD virtual link.";    
  }
  
  grouping qkdn_capabilities_supported {      
    leaf link_stats_support {
      type boolean;
      default true;
      description "If true, the SD-QKD node exposes link-related statistics (key generation rate, link consumption, status).";
    }

    leaf application_stats_support {
      type boolean;
      default true;
      description "If true, the SD-QKD node exposes application related statistics (application consumption, alerts).";
    }

    leaf key_relay_mode_enable {
      type boolean;
      default true;
      description "If true, the SD-QKD node supports key relay (multi-hop) mode services.";
    }
  }

  grouping phys_link_key_rate_perf {
    leaf expected_consumption {
        type uint32;
        units "bps";
        description "Sum of all the applications’ bandwidths (in bits per second) that are on this particular QKD physical link.";
    }
    
    leaf skr {
        type uint32;
        units "bps";
        description "Secret key generation rate (in bits per second) of each QKD physical link.";
    }

    leaf eskr {
        type uint32;
        units "bps";
        description "Effective secret key generation rate (in bits per second) of each QKD physical link available after all the applications’ consumption.";
    }
  }

  grouping virt_link_key_rate_perf {
    leaf expected_consumption {
        type uint32;
        units "bps";
        description "The bandwidth (in bits per second) of the external application that is consuming keys from QKD virtual link.";
    }
    
    leaf skr {
        type uint32;
        units "bps";
        description "Secret key generation rate (in bits per second) of QKD virtual link.";
    }

    leaf eskr {
        type uint32;
        units "bps";
        description "Effective secret key generation rate (in bits per second) of QKD virtual link after the external application’s consumption.";
    }
  }

  grouping phys_link_perf {
    list phys_link_perf {
      config false;
      key "type";

      leaf type {
        type identityref {
            base etsi-qkdn-types:PHYS-PERF-TYPES;
        }
        description "Type of the physical performance value to be exposed to the controller.";
      }

      leaf value {
        type uint32;
        description "Numerical value for the performance parameter.";
      }
    }
  }

  grouping qkdn_details {
    leaf qkdn_version {
      type string;
      description "Hardware or software version of the SD-QKD node.";
    }

    container qkdn_capabilities {
      uses qkdn_capabilities_supported;
      description "Capabilities of the SD-QKD node.";
    }

    leaf location_id {
      type string;
      description "The location of the secure area that contains the SD-QKD node to be specified.";
    }
    
    container KME_ip_port {
      description "The ip address and port number of the key management entity in SD-QKD node which provides QKD keys to external application.";

      leaf KME_ip {
        type inet:ip-address;
      }

      leaf KME_port {
        type inet:port-number;
      }
    }
  }

  grouping qkdn_status {
    leaf qkdn_status {
      config false;
      type qkdn-status-types;
      description "Status of the SD-QKD node.";
    }
  }

  grouping att_point {
    container att_point {
      description "Interface attachment point to an optical switch.";

      leaf device {
        type string;
        description "Unique ID of the optical switch (or passive component) to which the interface is connected.";
      }

      leaf port {
        type uint32;
        description "Port ID of the device to which the interface is connected.";
      }
    }
  }

  grouping qkdi_details {
    leaf role_support {
        type identityref {
          base etsi-qkdn-types:QKD-ROLE-TYPES;
        }
        description "Support for transmit, receive or both.";
    }

    leaf model {
      type string;
      description "Device model (vendor/device).";
    }

    leaf type {
      type identityref {
        base etsi-qkdn-types:QKD-TECHNOLOGY-TYPES;
      }
      description "Interface type (QKD technology).";
    }

    uses att_point;
  }

  grouping qkdi_status {
    leaf qkdi_status {
      config false;
      type identityref {
        base etsi-qkdn-types:IFACE-STATUS-TYPES;
      }
      description "Status of a QKD interface of the SD-QKD node.";
    }
  }

  grouping phys_link_details {
    leaf enable {
      type boolean;
      default true;
      description "This value allows the key generation process for a given link to be enabled or disabled. 
        If true, the key generation process is enabled.";
    }    
    
    leaf wavelength {
        type etsi-qkdn-types:wavelength; 
        units "nm";   
        description "Wavelength (nm) to be used for the quantum channel. 
          If the interface is not tunable, this parameter can by bypassed.";
    }

    container performance {
      uses phys_link_key_rate_perf;
      uses phys_link_perf {
        when "/qkdnw-tplg:qkd_network/qkdnw-tplg:qkd_links/qkdnw-tplg:qkd_phys_links/qkdnw-tplg:phys_link/qkdnw-tplg:link_type = 'PHYS'";
        description "Performance of the specific physical link.";
      }
    }
  }

  grouping phys_link_status {
    leaf phys_link_status {
      config false;
      type identityref {
        base etsi-qkdn-types:LINK-STATUS-TYPES;
      }
      description "Status of the QKD physical link.";
    }
  }

  grouping virt_link_details {
    leaf bandwidth {
      type uint32;
      units "bps";
      description "Required bandwidth (bps) for the key association link. Used to reserve bandwidth 
        from the physical link to support the virtual link as an internal application.";
    }

    container performance {
      uses virt_link_key_rate_perf; 
    }
    
    container path_restoration {
      description "Container for path restoration conditions when any failure happens in the end-to-end key relay path.";

      leaf type {
        type path-restoration-type;
        description "path restoration type of QKD virtual link.";
      }

      leaf hold_off_time {
        type uint32;
        units "milliseconds";
        description "Time to wait before attempting restoration.";
      }
    }
  }

  grouping virt_link_status {
    leaf virt_link_status {
      config false;
      type identityref {
        base etsi-qkdn-types:LINK-STATUS-TYPES;
      }
      description "Status of the QKD virtual link.";
    }
  }


  augment "/qkdnw-tplg:qkd_network/qkdnw-tplg:sdqkd_nodes/qkdnw-tplg:qkdn" {
    description "The inventory of a SD-QKD node.";

    uses qkdn_details;
    uses qkdn_status;    
  }

  augment "/qkdnw-tplg:qkd_network/qkdnw-tplg:sdqkd_nodes/qkdnw-tplg:qkdn/qkdnw-tplg:qkd_interfaces/qkdnw-tplg:qkdi" {
    description "The inventory of an interface (QKD module) of the SD-QKD node.";
    
    uses qkdi_details;
    uses qkdi_status;
  }

  augment "/qkdnw-tplg:qkd_network/qkdnw-tplg:qkd_links/qkdnw-tplg:qkd_phys_links/qkdnw-tplg:phys_link" {
    description "The inventory of a QKD physical link.";

    uses phys_link_details;
    uses phys_link_status;    
  }

  augment "/qkdnw-tplg:qkd_network/qkdnw-tplg:qkd_links/qkdnw-tplg:qkd_virt_links/qkdnw-tplg:virt_link" {
    description "The inventory of a QKD virtual link.";

    uses virt_link_details;
    uses virt_link_status;

  }

  notification sdqkdn_new {
    container qkdn {
      uses qkdn_id_ref;
      uses qkdn_details;
      leaf qkdn_status {
        type qkdn-status-types;
      }
      leaf reason {
        type string;
        description "This notification includes the information about the new SD-QKD node installed in the QKD network.";
      }
    }
  }

  notification sdqkdn_interface_new {
    container qkd_interface {
      uses qkdn_id_ref;
      uses qkdi_id_ref;
      uses qkdi_status;
      leaf reason {
        type string;
        description "This notification includes the information about the new interface of SD-QKD node installed in the QKD network.";
      }
    }
  }

  notification sdqkdn_phys_link_new {
    container qkd_phys_link {
      uses phys_link_id_ref;
      uses phys_link_status;
      container phys_link_local_qkdn {
        uses qkdn_id_ref;
        uses qkdi_id_ref;
      }
      container phys_link_remote_qkdn {
        uses qkdn_id_ref;
        uses qkdi_id_ref;
      }
      leaf reason {
        type string;
        description "This notification includes the information about the new QKD physical link installed in the QKD network.";
      }
    }
  }
 
  notification sdqkdn_virt_link_new {
    container qkd_virt_link {
      uses virt_link_id_ref;
      uses virt_link_status;
      container virt_link_local_qkdn {
        uses qkdn_id_ref;
        uses qkdi_id_ref;
      }
      container virt_link_remote_qkdn {
        uses qkdn_id_ref;
        uses qkdi_id_ref;
      }
      leaf reason {
        type string;
        description "This notification includes the information about the new QKD virtual link deployed in the QKD network.";
      }
    }
  }

  notification sqdkdn_phys_link_perf_update {
    container qkd_phys_link {
      uses phys_link_id_ref;
      uses phys_link_key_rate_perf;
      uses phys_link_perf;
    }
  }

  notification sqdkdn_virt_link_perf_update {
    container qkd_virt_link {
      uses virt_link_id_ref;
      uses virt_link_key_rate_perf;
    }
  }

  notification sqdkdn_phys_link_overloaded {
    container qkd_phys_link {
      uses phys_link_id_ref;
      uses phys_link_key_rate_perf;
    }
  }

  notification sqdkdn_virt_link_overloaded {
    container qkd_virt_link {
      uses virt_link_id_ref;
      uses virt_link_key_rate_perf;
    }
  }

  notification alarm {
    container qkdn {
      uses qkdn_id_ref;
      leaf qkdn_status {
        type qkdn-status-types;
        description "Status of a SD-QKD node.";
      }
      leaf message {
        type string;
        description "Message of an alarm.";
      }
      leaf severity {
        type identityref {
          base "etsi-qkdn-types:SEVERITY-TYPES";
        }
        description "Severity of an alarm.";
      }
    }

    container interface {
      uses qkdn_id_ref;
      uses qkdi_id_ref;
      leaf status {
        type identityref {
          base "etsi-qkdn-types:IFACE-STATUS-TYPES";
        }
        description "Status of a QKD interface of the SD-QKD node.";
      }
      leaf message {
        type string;
        description "Message of an alarm.";
      }
      leaf severity {
        type identityref {
          base "etsi-qkdn-types:SEVERITY-TYPES";
        }
        description "Severity of an alarm.";
      }
    }

    container phys_link {
      uses phys_link_id_ref;
      leaf status {
        type identityref {
          base "etsi-qkdn-types:LINK-STATUS-TYPES";
        }
        description "Status of a QKD physical link.";
      }
      leaf message {
        type string;
        description "Message of an alarm.";
      }
      leaf severity {
        type identityref {
          base "etsi-qkdn-types:SEVERITY-TYPES";
        }
        description "Severity of an alarm.";
      }
    }

    container virt_link {
      uses virt_link_id_ref;
      leaf status {
        type identityref {
          base "etsi-qkdn-types:LINK-STATUS-TYPES";
        }
        description "Status of a QKD virtual link.";
      }
      leaf message {
        type string;
        description "Message of an alarm.";
      }
      leaf severity {
        type identityref {
          base "etsi-qkdn-types:SEVERITY-TYPES";
        }
        description "Severity of an alarm.";
      }
    }
  }

  notification event {
    container qkdn {
      uses qkdn_id_ref;
      leaf qkdn_status {
        type qkdn-status-types;
        description "Status of a SD-QKD node.";
      }
      leaf message {
        type string;
        description "Message of an alarm.";
      }
      leaf severity {
        type identityref {
          base "etsi-qkdn-types:SEVERITY-TYPES";
        }
        description "Severity of an alarm.";
      }
    }

    container interface {
      uses qkdn_id_ref;
      uses qkdi_id_ref;
      leaf status {
        type identityref {
          base "etsi-qkdn-types:IFACE-STATUS-TYPES";
        }
        description "Status of a QKD interface of the SD-QKD node.";
      }
      leaf message {
        type string;
        description "Message of an alarm.";
      }
      leaf severity {
        type identityref {
          base "etsi-qkdn-types:SEVERITY-TYPES";
        }
        description "Severity of an alarm.";
      }
    }

    container phys_link {
      uses phys_link_id_ref;
      leaf status {
        type identityref {
          base "etsi-qkdn-types:LINK-STATUS-TYPES";
        }
        description "Status of a QKD physical link.";
      }
      leaf message {
        type string;
        description "Message of an alarm.";
      }
      leaf severity {
        type identityref {
          base "etsi-qkdn-types:SEVERITY-TYPES";
        }
        description "Severity of an alarm.";
      }
    }

    container virt_link {
      uses virt_link_id_ref;
      leaf status {
        type identityref {
          base "etsi-qkdn-types:LINK-STATUS-TYPES";
        }
        description "Status of a QKD virtual link.";
      }
      leaf message {
        type string;
        description "Message of an alarm.";
      }
      leaf severity {
        type identityref {
          base "etsi-qkdn-types:SEVERITY-TYPES";
        }
        description "Severity of an alarm.";
      }
    }
  }
}
 No newline at end of file