netconfcentral logo

sd-onos-service-l3vpn@2015-10-14



  module sd-onos-service-l3vpn {

    yang-version 1;

    namespace "urn:onos:l3vpn";

    prefix l3vpn;

    import ietf-inet-types {
      prefix inet;
    }
    import ietf-yang-types {
      prefix yang-types;
    }
    import sd-onos-service-types {
      prefix service-types;
    }
    import sd-onos-common-types {
      prefix types;
    }

    organization "";

    contact "";

    revision "2015-10-14" {
      description "revised revision.";
    }


    container service {
      container l3vpn-cfg {
        list vpn-cfg {
          key "name";
          uses l3vpn;
        }  // list vpn-cfg
      }  // container l3vpn-cfg

      container service-paths {
        list service-path {
          key "service-id source-ne-id source-ac-id destination-ne-id destination-ac-id";
          uses service-types:service-path;
        }  // list service-path
      }  // container service-paths
    }  // container service

    grouping l3vpn {
      leaf name {
        type string;
        mandatory true;
        description "name of snc eline.";
      }

      leaf id {
        type uint32;
        mandatory true;
        description "ID of snc eline.";
      }

      leaf user-label {
        type string;
        description
          "user label of snc eline.";
      }

      leaf parent-ncd-id {
        type string;
        description "parent ncd id.";
      }

      leaf admin-status {
        type types:admin-status;
      }

      leaf operate-status {
        type types:operate-status;
      }

      uses service-type-grouping;

      container acess-information {
        list access-circuit {
          key "id";
          uses service-types:l3-ac;
        }  // list access-circuit
      }  // container acess-information

      container protect-policy {
        description
          "L3VPN Service protect policy.";
        uses service-types:protect-policy;
      }  // container protect-policy

      container tunnel-service {
        description "tunnel service.";
        uses service-types:tunnel-service;
      }  // container tunnel-service
    }  // grouping l3vpn

    grouping service-type-grouping {
      leaf service-topology {
        type enumeration {
          enum "full-mesh" {
            value 1;
            description "full-mesh.";
          }
          enum "hub-spoke" {
            value 2;
            description "hub-spoke.";
          }
        }
        default 'full-mesh';
        description "service topology type.";
      }
    }  // grouping service-type-grouping

    rpc create-l3vpn-instance {
      input {
        container l3vpn-instance {
          uses l3vpn;
        }  // container l3vpn-instance
      }
    }  // rpc create-l3vpn-instance

    rpc delete-l3vpn-instance {
      input {
        leaf l3vpn-id {
          type string;
        }
      }
    }  // rpc delete-l3vpn-instance

    rpc close-l3vpn {
      input {
        leaf l3vpn-id {
          type string;
        }

        container ac-status {
          list acs {
            key "id";
            leaf id {
              type string;
            }

            leaf admin-status {
              type types:admin-status;
            }
          }  // list acs
        }  // container ac-status
      }
    }  // rpc close-l3vpn

    rpc modify-l3vpn-instance-basic {
      input {
        leaf l3vpn-id {
          type string;
        }

        leaf user-label {
          type string;
        }
      }
    }  // rpc modify-l3vpn-instance-basic

    rpc modify-l3vpn-instance-ac-qos {
      input {
        leaf l3vpn-id {
          type string;
        }

        container ac-qos {
          list acs {
            key "id";
            leaf id {
              type string;
            }

            container qos-policy {
              container qos-if-cars {
                list qos-if-car {
                  key "direction";
                  uses service-types:qos-if-car;
                }  // list qos-if-car
              }  // container qos-if-cars
            }  // container qos-policy
          }  // list acs
        }  // container ac-qos
      }
    }  // rpc modify-l3vpn-instance-ac-qos

    rpc modify-l3vpn-instance-connection {
      input {
        leaf l3vpn-id {
          type string;
        }

        container ac-connection {
          list acs {
            leaf id {
              type string;
              description "ac id.";
            }

            container connection {
              description
                "CE to PE  connection.";
              uses service-types:connection;
            }  // container connection
          }  // list acs
        }  // container ac-connection
      }
    }  // rpc modify-l3vpn-instance-connection

    rpc inquire-l3vpn-instance-work-path {
      input {
        leaf service-id {
          type string;
        }

        leaf ingress-ne-id {
          type string;
        }

        leaf destination-ne-id {
          type string;
        }

        leaf ingress-ac-id {
          type string;
        }

        leaf destination-ac-id {
          type string;
        }

        leaf path-layer {
          type string;
        }

        leaf path-role {
          type string;
        }
      }

      output {
        container service-path {
          leaf service-id {
            type string;
          }

          leaf ingress-ne-id {
            type string;
          }

          leaf destination-ne-id {
            type string;
          }

          leaf ingress-ac-id {
            type string;
          }

          leaf destination-ac-id {
            type string;
          }

          leaf path-layer {
            type string;
          }

          leaf path-role {
            type string;
          }

          list path-list {
            key "ne-id";
            leaf ne-id {
              type string;
            }

            leaf ingress-ltp-id {
              type string;
            }

            leaf backward-peer-id {
              type string;
            }

            leaf egress-ltp-id {
              type string;
            }

            leaf forward-peer-id {
              type string;
            }
          }  // list path-list
        }  // container service-path
      }
    }  // rpc inquire-l3vpn-instance-work-path
  }  // module sd-onos-service-l3vpn