Commit 0e0482f7 authored by djcha's avatar djcha
Browse files

Revised YANG modules with new name and namespace

parent f8c5b1a8
Loading
Loading
Loading
Loading
+0 −474
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-network-connectivity {

  yang-version "1.1";

  namespace "urn:etsi:qkd:yang:etsi-qkd-network-connectivity"; //TBD. Replaced when assigned.

  prefix "nw-con";
  
  import ietf-yang-types { prefix "yang"; }
  import etsi-qkd-node-types { prefix "etsi-qkdn-types"; }
  import etsi-qkd-network-topology { prefix "nw-top";}

  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 
    connectivity service information models specified in ETSI GS QKD 018 V0.0.6";

  revision 2021-06-04 {
    description "Initial revision";    
  }

  identity ACTION-RESULT {
    description "Base identity from which specific action results are derived.";
  }
  identity SUCCESS {
    base ACTION-RESULT;
    description "Action was successful.";
  }
  identity FAIL {
    base ACTION-RESULT;
    description "Action failed.";
  }
  typedef action-result {
    type identityref {
      base ACTION-RESULT;
    }
  }

  grouping qkdn_id_ref {
    leaf qkdn_id_ref {
      type leafref {
        path "/nw-top:qkd_network/nw-top:sdqkd_nodes/nw-top:qkdn/nw-top:qkdn_id";
      }
      description "Used to reference a SD-QKD node.";
    }
  }
  
  grouping virt_link_id_ref {
    leaf virt_link_id_ref {
      type leafref {
        path "/nw-top:qkd_network/nw-top:qkd_links/nw-top:qkd_virt_links/nw-top:virt_link/nw-top:virt_link_id";
      }
      description "A reference to the QKD virtual link in QKD network topology.";
    }
  }

  grouping virt_link_local_qkdn_ref {
    leaf local_qkdn_id_ref {
      type leafref {
        path "/nw-top:qkd_network/nw-top:qkd_links/nw-top:qkd_virt_links/nw-top:virt_link[nw-top:virt_link_id=current()/../virt_link_id_ref]/nw-top:virt_link_local_qkdn/nw-top:qkdn_id_ref";
      }
      description "A reference to the local SD-QKD node of the QKD virtual link in QKD network topology.";
    }

    leaf local_qkdi_id_ref {
      type leafref {
        path "/nw-top:qkd_network/nw-top:qkd_links/nw-top:qkd_virt_links/nw-top:virt_link[nw-top:virt_link_id=current()/../virt_link_id_ref]/nw-top:virt_link_local_qkdn/nw-top:qkdi_id_ref";
  
      }
      description "A reference to the local SD-QKD node interface of the QKD virtual link.";
    }
  }

  grouping virt_link_remote_qkdn_ref {
    leaf remote_qkdn_id_ref {
      type leafref {
        path "/nw-top:qkd_network/nw-top:qkd_links/nw-top:qkd_virt_links/nw-top:virt_link[nw-top:virt_link_id=current()/../virt_link_id_ref]/nw-top:virt_link_remote_qkdn/nw-top:qkdn_id_ref";
      }
      description "A reference to the remote SD-QKD node of the QKD virtual link in QKD network topology.";
    }
    
    leaf remote_qkdi_id_ref {
      type leafref {
        path "/nw-top:qkd_network/nw-top:qkd_links/nw-top:qkd_virt_links/nw-top:virt_link[nw-top:virt_link_id=current()/../virt_link_id_ref]/nw-top:virt_link_remote_qkdn/nw-top:qkdi_id_ref";
      }
      description "A reference to the remote SD-QKD node interface of the QKD virtual link.";
    }

  }

  grouping qkdn_qkdi_id_ref {
    leaf qkdn_id_ref {
      type leafref {
        path "/nw-top:qkd_network/nw-top:sdqkd_nodes/nw-top:qkdn/nw-top:qkdn_id";
      }
      description "Unique ID of the SD-QKD node.";
    }

    leaf qkdi_id_ref {
      type leafref {
        path "/nw-top:qkd_network/nw-top:sdqkd_nodes/nw-top:qkdn[nw-top:qkdn_id=current()/../qkdn_id_ref]"+
          "/nw-top:qkd_interfaces/nw-top:qkdi/nw-top:qkdi_id";
      }
      description "Interface ID of the SD-QKD node interface.";
    }
  }

  grouping phys_links_per_path {
    leaf-list phys_links {
      type leafref {
        path "/nw-top:qkd_network/nw-top:qkd_links/nw-top:qkd_phys_links/nw-top:phys_link/nw-top:phys_link_id";
      }
      min-elements 1;
      ordered-by system;
      description "A sequence of QKD physical links which constitute the specific key relay path.";
    }
  }

  grouping app_id_ref {
    leaf app_id_ref {
      type leafref {
        path "/nw-con:connectivity_service/nw-con:qkd_service/nw-con:qkd_app/nw-con:app_id";
      }
      description "Used to reference a SD-QKD node.";
    }
  }

  grouping app_mapped_virt_link_id_ref {
    leaf app_mapped_virt_link_id_ref {
      type leafref {
        path "/nw-con:connectivity_service/nw-con:qkd_service/nw-con:qkd_app[nw-con:app_id=current()/../app_id_ref]"+
          "/nw-con:app_mapped_virt_link/nw-con:virt_link_and_qkdn_ids/nw-con:virt_link_id_ref";
      }
    }
  }

  grouping app_list {
    list qkd_app {
      key "app_id";
      description "List of external applications requesting QKD-derived keys.";

      leaf app_id {
        type yang:uuid;
        description "This value uniquely identifies a pair of applications extracting keys from a QKD key association link.";
      }
    }
  }

  grouping app_details {
    leaf app_type {
      type identityref {
        base etsi-qkdn-types:QKD-APP-TYPES;
      } 
      description "Application working as client (external applications requesting keys). The identity is CLIENT.";
    }

    leaf app_priority {
      type uint32;
      default 0;
      description "Priority of the association/application. High value indicate high priority. 
        This will be assigned by a network administrator.";
    }
  }

  grouping app_status {
    leaf app_status {
      config false;
      type identityref {
        base etsi-qkdn-types:APP-STATUS-TYPES;
      }
      description "Status of the application";
    }
  }

  grouping app_service_time {
    leaf service_creation_time {
      config false;
      type yang:date-and-time;
      description "Date and time of the service creation.";
    }

    leaf service_expiration_time {
      type yang:date-and-time;
      description "Date and time of the service expiration.";
    }
  }

  grouping app_qos {
    container app_qos {
          
      leaf max_bandwidth {
        type uint32;
        description "Maximum bandwidth (bps) allowed for this specific application. Exceeding this value will 
          raise an error from the local key store to the application and to SDN orchestrator via SDN controller. 
          This value might be internally configured by an network administrator.";
      }

      leaf min_bandwidth {
        type uint32;
        description "This value is an optional QoS parameter indicating the minimum key rate 
          that the application is expected to request (in bits per second).";
      }

      leaf jitter {
        type uint32;
        description "This value allows a maximum time jitter (msec) of keys provided by the key delivery API 
          to be specified, for applications requiring fast rekeying.";
      }

      leaf ttl {
        type uint32;
        description "Time To Live (sec) specifies the maximum time a key can have been stored before delivery to 
          an application.";
      }
    }
  }

  grouping app_statistics {
    container app_statistics {
      description "Statistical information relating to a specific statistic period of time.";

      list statistics {
        key "end_time";
        config false;

        leaf end_time {
          type yang:date-and-time;
          config false;
          description "End time for the statistics collection period.";
        }

        leaf start_time {
          type yang:date-and-time;
          config false;
          description "Start time for the statistics collection period.";
        }

        leaf consumed_bits {
          type uint32;
          config false;
          description "Consumed secret key amount (bits) for a statistics collection period of time.";
        }
      }
    }
  }

  grouping path_constraints {
    container path_constraints {
      description "Container for contraints when requesting candidate paths calculation.";

      list include_nodes {
        key "qkdn_id_ref qkdi_id_ref";
        description "List of SD-QKD nodes and their interfaces which should be included in candidate paths list 
          when SDQNC calculates candidate paths list.";
        
        uses qkdn_qkdi_id_ref {
          refine qkdn_id_ref {
            description "Unique ID of the SD-QKD node which should be included in candidate paths list.";
          }
          refine qkdi_id_ref {
            description "Interface ID of the SD-QKD node which should be included in candidate paths list.";
          }
        }
      }

      list exclude_nodes {
        key "qkdn_id_ref qkdi_id_ref";
        description "List of SD-QKD nodes and their interfaces which should be excluded in candidate paths list 
          when SDQNC calculates candidate paths list.";
        
        uses qkdn_qkdi_id_ref {
          refine qkdn_id_ref {
            description "Unique ID of the SD-QKD node which should be excluded in candidate paths list.";
          }
          refine qkdi_id_ref {
            description "Interface ID of the SD-QKD node which should be excluded in candidate paths list.";
          }
        }
      }
    }
  }

  grouping candidate_paths {
    container candidate_paths {
      description "Container for key relay paths per QKD virtual link.";

      leaf num_of_candidate_paths {
        type uint32;
        description "The number of candidate paths which SDQNC calculates and provides.";
      }

      list candidate_path {
        key "path_id";
        description "List of end-to-end key relay paths. 
          Each path consists of QKD physical links from the local SD-QKD node to the remote SD-QKD node";

        leaf path_id {
          type uint32;
          description "Priority of the specific path among candidate paths. This value is defined by SDQNC.";
        }

        uses phys_links_per_path;
      }
    }
  }

  grouping deploy_path {
    container deploy_path {
      description "Container for a path deployed among condidate paths.";

      leaf path_id {
        type uint32;
        description "Identifier of a path deployed for QKD virtual link. This value is chosen by SDNO from the path ids 
          of candidate paths list after SDNO has received candidate paths list from SDQNC";
      }

      uses phys_links_per_path;
    }
  }


  container connectivity_service {
    description "Container for external applications requesting QKD-derived keys and paths supporting QKD virtual link.";

    container qkd_service {
      description "Container for external applications requesting QKD-derived keys.";

      list qkd_app {
        key "app_id";
        description "List of external applications requesting QKD-derived keys.";

        leaf app_id {
          type yang:uuid;
          description "This value uniquely identifies a pair of applications extracting keys from a QKD key association link.";
        }

        uses app_details;
        uses app_status;
        uses app_qos;
        uses app_service_time;    
        uses app_statistics;
        
        container app_mapped_virt_link {
          description "Container for paths per QKD virtual link for app.";
          
          container virt_link_and_qkdn_ids {
            uses virt_link_id_ref;
            uses virt_link_local_qkdn_ref;
            uses virt_link_remote_qkdn_ref;
          }

          uses path_constraints;
          uses candidate_paths; 
          uses deploy_path;     
        }
      }
    }
  }

  rpc app-registration {
    description "Request app registration to SDQNC.";
    input {
      uses app_id_ref;
      uses app_details;
    }
    output {
      leaf response {
        type action-result;
      }
    }
  }

  rpc get-app-list {
    description "Get app list in QKD connectivity service.";
    output {      
      uses app_list;
    }
  }

  rpc create-virtual-link-id-for-app {
    description "When an app requests service, SDNO or SDQNC assigns virtual link id for the app.";
    input {
      uses app_id_ref;
      container local_qkdn {
        uses qkdn_id_ref;
      } 
      container remote_qkdn {
        uses qkdn_id_ref;
      }
    }
    output {
      uses virt_link_id_ref;
    }
  }

  rpc create-candidate-paths-per-virtual-link-for-app {
    description "Create candidate paths per the QKD virtual link for app.";
    input {
      uses app_id_ref;
      uses app_qos;
      uses app_mapped_virt_link_id_ref;
      uses path_constraints;
    }
    output {
      uses candidate_paths;
    }
  }

  rpc update-candidate-paths-per-virtual-link-for-app {
    description "SDNO can request this rpc repeately until it finally selects a path among candidate paths.";
    input {
      uses app_id_ref;
      uses app_qos;
      uses app_mapped_virt_link_id_ref;
      uses path_constraints;
    }
    output {
      uses candidate_paths;
    }
  }

  rpc deploy-a-candidate-path-per-virtual-link-for-app {
    description "Deploy a SDNO-selected path per QKD virtual link for app.";
    input {
      uses app_id_ref;
      uses app_mapped_virt_link_id_ref;
      leaf path_id {
        type uint32;
      }
    }
    output {
      leaf response {
        type action-result;
      }
      uses deploy_path;      
    }
  }

  rpc delete-deployed-path-per-virtual-link-for-app {
    description "Delete the deployed path per QKD virtual link for app in order to reserve key resources.";
    input {
      uses app_id_ref;
      uses app_mapped_virt_link_id_ref;
      leaf path_id {
        type uint32;
      }
    }
    output {
      leaf response {
        type action-result;
      }
      uses app_service_time;
    }
  }

  rpc get-app-status-and-statistics {
    description "Get app status and app statistics.";
    input {
      uses app_id_ref;
    }
    output {
      uses app_status;
      uses app_statistics;
    }
  }
}
 No newline at end of file

etsi-qkd-network-inventory.yang

deleted100644 → 0
+0 −412
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-network-inventory {

  yang-version "1.1";

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

  prefix "nw-inv";
  
  import etsi-qkd-node-types { prefix "etsi-qkdn-types"; }
  import etsi-qkd-network-topology { prefix "nw-top";}

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

  revision 2021-06-04 {
    description "Initial revision";    
  }
  
  identity QKDN-STATUS-TYPES {
    description "Base identity used to identify the SD-QKD node status.";
  }
  identity OPERATING {
    base QKDN-STATUS-TYPES;
    description "The QKD node is up.";
  }
  identity IDLE {
    base QKDN-STATUS-TYPES;
    description "The QKD node is down.";
  }
  identity DORMANT {
    base QKDN-STATUS-TYPES;
    description "The QKD node has failed.";
  }
  identity FAILURE {
    base QKDN-STATUS-TYPES;
    description "The QKD node has failed.";
  }
  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 "/nw-top:qkd_network/nw-top:sdqkd_nodes/nw-top:qkdn/nw-top:qkdn_id";
      }
      description "Used to reference a SD-QKD node.";
    }
  }

  grouping qkdi_id_ref {
    leaf qkdi_id_ref {
      type leafref {
        path "/nw-top:qkd_network/nw-top:sdqkd_nodes/nw-top:qkdn[nw-top:qkdn_id=current()/../qkdn_id_ref]"+
          "/nw-top:qkd_interfaces/nw-top:qkdi/nw-top: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 "/nw-top:qkd_network/nw-top:qkd_links/nw-top:qkd_phys_links/nw-top:phys_link/nw-top:phys_link_id";
      }
    }
    description "Used to reference a QKD physical link.";
  }

  grouping virt_link_id_ref {
    leaf virt_link_id_ref {
      type leafref {
        path "/nw-top:qkd_network/nw-top:qkd_links/nw-top:qkd_virt_links/nw-top:virt_link/nw-top: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 key_rate_perf_common {
    leaf expected_consumption {
        type uint32;
        units "bps";
        description "Sum of the bandwidths (bps) of the application's that are consuming keys from the key association link.";
    }
    
    leaf skr {
        type uint32;
        units "bps";
        description "Total secret key rate (bps) generation of the key association link.";
    }

    leaf eskr {
        type uint32;
        units "bps";
        description "Effective secret key rate (bps) generated by the key association
           link. i.e. the available rate to the applications after internal 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.";
    }
  }

  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 key_rate_perf_common;
      uses phys_link_perf {
        when "/nw-top:qkd_network/nw-top:qkd_links/nw-top:qkd_phys_links/nw-top:phys_link/nw-top: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 a 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 key_rate_perf_common; 
    }
    
    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 "milli-seconds";
        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 a QKD virtual link.";
    }
  }


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

    uses qkdn_details;
    uses qkdn_status;    
  }

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

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

    uses phys_link_details;
    uses phys_link_status;    
  }

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

    uses virt_link_details;
    uses virt_link_status;

  }
  
  rpc get-QKD-node-details-and-status {
    description "Get the information of the SD-QKD node in QKD network.";

    input {
      uses qkdn_id_ref;
    }

    output {
      uses qkdn_details;
      uses qkdn_status;
    }
  }

  rpc get-QKD-interface-details {
    description "Get the information of the SD-QKD node interface in QKD network.";

    input {
      uses qkdn_id_ref;
      uses qkdi_id_ref;
    }

    output {
      uses qkdi_details;
      uses qkdi_status;
    }
  }

  rpc get-QKD-phys-link-details {
    description "Get the information of the QKD physical link in QKD network ";

    input {
      uses phys_link_id_ref;
    }

    output {
      uses phys_link_details;
      uses phys_link_status;
    }
  }

  rpc get-QKD-virt-link-details {
    description "Get the information of the QKD virtual link in QKD network ";

    input {
      uses virt_link_id_ref;
    }

    output {
      uses virt_link_details;
      uses virt_link_status;
    }
  }

  notification qkdn_alarm {
    container qkdn {
      uses qkdn_id_ref;
      leaf qkdn_status {
        type qkdn-status-types;
      }
      leaf reason {
        type string;
      }      
    }
  }
}
 No newline at end of file

etsi-qkd-network-topology.yang

deleted100644 → 0
+0 −262

File deleted.

Preview size limit exceeded, changes collapsed.