netconfcentral logo

ietf-actn-vn@2018-02-27



  module ietf-actn-vn {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-actn-vn";

    prefix vn;

    import ietf-network {
      prefix nw;
    }
    import ietf-te-types {
      prefix te-types;
    }
    import ietf-te-topology {
      prefix tet;
    }

    organization
      "IETF Traffic Engineering Architecture and Signaling (TEAS)
        Working Group";

    contact
      "Editor: Young Lee <leeyoung@huawei.com>
               : Dhruv Dhody <dhruv.ietf@gmail.com>";

    description
      "This module contains a YANG module for the ACTN VN. It
        describes a VN operation module that takes place in the
        context of the CNC-MDSC Interface (CMI) of the ACTN
        architecture where the CNC is the actor of a VN
        Instantiation/modification /deletion.";

    revision "2018-02-27" {
      description "initial version.";
      reference
        "TBD";

    }


    feature multi-src-dest {
      description
        "Support for selection of one src or destination
          among multiple.";
    }

    identity vn-state-type {
      base 
      description
        "Base identity for VN state";
    }

    identity vn-state-up {
      base vn-state-type;
      description "VN state up";
    }

    identity vn-state-down {
      base vn-state-type;
      description "VN state down";
    }

    identity vn-admin-state-type {
      base 
      description
        "Base identity for VN admin states";
    }

    identity vn-admin-state-up {
      base vn-admin-state-type;
      description
        "VN administratively state up";
    }

    identity vn-admin-state-down {
      base vn-admin-state-type;
      description
        "VN administratively state down";
    }

    identity vn-compute-state-type {
      base 
      description
        "Base identity for compute states";
    }

    identity vn-compute-state-computing {
      base vn-compute-state-type;
      description
        "State path compute in progress";
    }

    identity vn-compute-state-computation-ok {
      base vn-compute-state-type;
      description
        "State path compute successful";
    }

    identity vn-compute-state-computatione-failed {
      base vn-compute-state-type;
      description
        "State path compute failed";
    }

    typedef vn-disjointness {
      type bits {
        bit node {
          position 0;
          description "node disjoint";
        }
        bit link {
          position 1;
          description "link disjoint";
        }
        bit srlg {
          position 2;
          description "srlg disjoint";
        }
      }
      description
        "type of the resource disjointness for
               VN level applied across all VN members
               in a VN";
    }

    container actn {
      description
        "actn is described by this container";
      container ap {
        description "AP configurations";
        list access-point-list {
          key "access-point-id";
          description
            "access-point identifier";
          leaf access-point-id {
            type uint32;
            description
              "unique identifier for the referred
access point";
          }

          leaf access-point-name {
            type string;
            description "ap name";
          }

          leaf max-bandwidth {
            type te-types:te-bandwidth;
            description
              "max bandwidth of the AP";
          }

          leaf avl-bandwidth {
            type te-types:te-bandwidth;
            description
              "available bandwidth of the AP";
          }

          list vn-ap {
            key "vn-ap-id";
            description
              "list of VNAP in this AP";
            leaf vn-ap-id {
              type uint32;
              description
                "unique identifier for the referred
VNAP";
            }

            leaf vn {
              type leafref {
                path "/actn/vn/vn-list/vn-id";
              }
              description
                "reference to the VN";
            }

            leaf abstract-node {
              type leafref {
                path "/nw:networks/nw:network/nw:node/tet:te-node-id";
              }
              description
                "a reference to the abstract node in TE
Topology";
            }

            leaf ltp {
              type te-types:te-tp-id;
              description
                "Reference LTP in the TE-topology";
            }
          }  // list vn-ap
        }  // list access-point-list
      }  // container ap

      container vn {
        description "VN configurations";
        list vn-list {
          key "vn-id";
          description
            "a virtual network is identified by a vn-id";
          leaf vn-id {
            type uint32;
            description
              "a unique vn identifier";
          }

          leaf vn-name {
            type string;
            description "vn name";
          }

          leaf vn-topology-id {
            type te-types:te-topology-id;
            description
              "An optional identifier to the TE Topology
                         Model where the abstract nodes and links
                         of the Topology can be found for Type 2
                         VNS";
          }

          leaf abstract-node {
            type leafref {
              path "/nw:networks/nw:network/nw:node/tet:te-node-id";
            }
            description
              "a reference to the abstract node in TE
                        Topology";
          }

          list vn-member-list {
            key "vn-member-id";
            description
              "List of VN-members in a VN";
            leaf vn-member-id {
              type uint32;
              description
                "vn-member identifier";
            }

            container src {
              description
                "the source of VN Member";
              leaf src {
                type leafref {
                  path "/actn/ap/access-point-list/access-point-id";
                }
                description
                  "reference to source AP";
              }

              leaf src-vn-ap-id {
                type leafref {
                  path "/actn/ap/access-point-list/vn-ap/vn-ap-id";
                }
                description
                  "reference to source VNAP";
              }

              leaf multi-src {
                if-feature multi-src-dest;
                type boolean;
                description
                  "Is source part of multi-source, where
only one of the source is enabled";
              }
            }  // container src

            container dest {
              description
                "the destination of VN Member";
              leaf dest {
                type leafref {
                  path "/actn/ap/access-point-list/access-point-id";
                }
                description
                  "reference to destination AP";
              }

              leaf dest-vn-ap-id {
                type leafref {
                  path "/actn/ap/access-point-list/vn-ap/vn-ap-id";
                }
                description
                  "reference to dest VNAP";
              }

              leaf multi-dest {
                if-feature multi-src-dest;
                type boolean;
                description
                  "Is destination part of multi-destination, where
only one of the destination is enabled";
              }
            }  // container dest

            leaf connetivity-matrix-id {
              type leafref {
                path "/nw:networks/nw:network/nw:node/tet:te/tet:te-node-attributes/tet:connectivity-matrices/tet:connectivity-matrix/tet:id";
              }
              description
                "reference to connetivity-matrix";
            }

            leaf oper-status {
              type identityref {
                base vn-state-type;
              }
              config false;
              description
                "VN-member operational state.";
            }
          }  // list vn-member-list

          leaf if-selected {
            if-feature multi-src-dest;
            type boolean;
            default 'false';
            config false;
            description
              "Is the vn-member is selected among the
                           multi-src/dest options";
          }

          leaf admin-status {
            type identityref {
              base vn-admin-state-type;
            }
            default 'vn-admin-state-up';
            description
              "VN administrative state.";
          }

          leaf oper-status {
            type identityref {
              base vn-state-type;
            }
            config false;
            description
              "VN operational state.";
          }

          leaf vn-level-diversity {
            type vn-disjointness;
            description
              "the type of disjointness on the VN level
(i.e., across all VN members)";
          }
        }  // list vn-list
      }  // container vn
    }  // container actn

    rpc vn-compute {
      description
        "The VN computation without actual
            instantiation";
      input {
        leaf abstract-node {
          type leafref {
            path "/nw:networks/nw:network/nw:node/tet:te-node-id";
          }
          description
            "a reference to the abstract node in TE
                        Topology";
        }

        list vn-member-list {
          key "vn-member-id";
          description
            "List of VN-members in a VN";
          leaf vn-member-id {
            type uint32;
            description
              "vn-member identifier";
          }

          container src {
            description
              "the source of VN Member";
            leaf src {
              type leafref {
                path "/actn/ap/access-point-list/access-point-id";
              }
              description
                "reference to source AP";
            }

            leaf src-vn-ap-id {
              type leafref {
                path "/actn/ap/access-point-list/vn-ap/vn-ap-id";
              }
              description
                "reference to source VNAP";
            }

            leaf multi-src {
              if-feature multi-src-dest;
              type boolean;
              description
                "Is source part of multi-source, where
only one of the source is enabled";
            }
          }  // container src

          container dest {
            description
              "the destination of VN Member";
            leaf dest {
              type leafref {
                path "/actn/ap/access-point-list/access-point-id";
              }
              description
                "reference to destination AP";
            }

            leaf dest-vn-ap-id {
              type leafref {
                path "/actn/ap/access-point-list/vn-ap/vn-ap-id";
              }
              description
                "reference to dest VNAP";
            }

            leaf multi-dest {
              if-feature multi-src-dest;
              type boolean;
              description
                "Is destination part of multi-destination, where
only one of the destination is enabled";
            }
          }  // container dest

          leaf connetivity-matrix-id {
            type leafref {
              path "/nw:networks/nw:network/nw:node/tet:te/tet:te-node-attributes/tet:connectivity-matrices/tet:connectivity-matrix/tet:id";
            }
            description
              "reference to connetivity-matrix";
          }
        }  // list vn-member-list

        leaf vn-level-diversity {
          type vn-disjointness;
          description
            "the type of disjointness on the VN level
(i.e., across all VN members)";
        }
      }

      output {
        list vn-member-list {
          key "vn-member-id";
          description
            "List of VN-members in a VN";
          leaf vn-member-id {
            type uint32;
            description
              "vn-member identifier";
          }

          container src {
            description
              "the source of VN Member";
            leaf src {
              type leafref {
                path "/actn/ap/access-point-list/access-point-id";
              }
              description
                "reference to source AP";
            }

            leaf src-vn-ap-id {
              type leafref {
                path "/actn/ap/access-point-list/vn-ap/vn-ap-id";
              }
              description
                "reference to source VNAP";
            }

            leaf multi-src {
              if-feature multi-src-dest;
              type boolean;
              description
                "Is source part of multi-source, where
only one of the source is enabled";
            }
          }  // container src

          container dest {
            description
              "the destination of VN Member";
            leaf dest {
              type leafref {
                path "/actn/ap/access-point-list/access-point-id";
              }
              description
                "reference to destination AP";
            }

            leaf dest-vn-ap-id {
              type leafref {
                path "/actn/ap/access-point-list/vn-ap/vn-ap-id";
              }
              description
                "reference to dest VNAP";
            }

            leaf multi-dest {
              if-feature multi-src-dest;
              type boolean;
              description
                "Is destination part of multi-destination, where
only one of the destination is enabled";
            }
          }  // container dest

          leaf connetivity-matrix-id {
            type leafref {
              path "/nw:networks/nw:network/nw:node/tet:te/tet:te-node-attributes/tet:connectivity-matrices/tet:connectivity-matrix/tet:id";
            }
            description
              "reference to connetivity-matrix";
          }

          leaf if-selected {
            if-feature multi-src-dest;
            type boolean;
            default 'false';
            description
              "Is the vn-member is selected among
                           the multi-src/dest options";
          }

          leaf compute-status {
            type identityref {
              base vn-compute-state-type;
            }
            description
              "VN-member compute state.";
          }
        }  // list vn-member-list
      }
    }  // rpc vn-compute
  }  // module ietf-actn-vn