Commit b69d0a5f authored by chada's avatar chada
Browse files

Delete etsi-qkd-network-connectivity.yang

parent bca900d6
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