ietf-sd-onos-service-l3vpn.yang 8.44 KB
   module ietf-sd-onos-service-l3vpn {
     namespace "urn:ietf:params:xml:ns:yang:ietf-sd-onos-service-l3vpn";
     prefix l3vpn ;
     /*
     import ietf-inet-types{
       prefix inet;
     }
     import ietf-yang-types {
       prefix yang-types;
     }
     */
     import ietf-sd-onos-service-types {
       prefix service-types;
     }
     import ietf-sd-onos-common-types {
       prefix types;
     }
     organization "";
     contact "";

     description
       "L3vpn configuration model in ONOS.";

     revision "2015-12-16" {
       reference "";
     }

      grouping l3vpn {
       description
         "The configuration module of l3 vpn.";
       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;
         description "administration status." ;
       }
       leaf operate-status {
         type types:operate-status;
         description "operation status." ;
       }

       uses service-type-grouping;
       container acess-information {
              description "access information of the l3 vpn." ;

           uses service-types:l3-ac;        }

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

     }

     grouping service-type-grouping {
       description "Basic service type" ;
       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." ;
       }
     }

     container service {
       description
         "Root level of L3vpn service module.";
       container l3vpn-cfg {
         description
           "L3vpn configuration model in ONOS.";
         list vpn-cfg {
           key name;
           description
             "vpn configuration parameter list.";
           uses l3vpn;
         }
       }
       container service-paths {
         description
           "The service path of the l3 vpn.";
       }
     }



     rpc create-l3vpn-instance {
       description "Create l3vpn instance." ;
       input {
         container l3vpn-instance {
           description "Create l3vpn instance." ;
           uses l3vpn;
         }
       }
     }

     rpc delete-l3vpn-instance {
       description "Delete l3vpn instance." ;
       input {
         leaf l3vpn-id {
           type string;
           description "vpn id." ;
         }
       }
     }

     rpc close-l3vpn {
     description "Close l3vpn." ;
         input {
             leaf l3vpn-id {
                 type string;
           description "vpn id." ;
             }
             container ac-status {
           description "Access status of the vpn." ;
                 list acs{
                     key "id";
             description "Access information." ;
                     leaf id {
                         type string;
               description "Access id." ;
                     }
                     leaf admin-status {
                         type types:admin-status;
               description "Administration status." ;
                     }
                 }
             }
         }
     }

     rpc modify-l3vpn-instance-basic {
       description "Modify l3vpn instance basic information." ;
       input {
         leaf l3vpn-id {
           type string;
           description "vpn id." ;
         }
         leaf user-label {
           type string ;
           description "user label." ;
         }
       }
     }

     rpc modify-l3vpn-instance-ac-qos {
       description "Modify l3vpn instance ac qos information." ;
       input {
         leaf l3vpn-id {
           type string;
           description "L3vpn ID." ;
         }
         container ac-qos {
           description "ac qos information." ;
           list acs{
           key "id";
           description "acs list." ;
                 leaf id {
                   type string;
                   description "acs ID." ;
               }
               container qos-policy {
             description "qos policy." ;
                   container qos-if-cars {
               description "cars qos policy." ;
                          uses service-types:qos-if-car;

                   }
               }
           }
         }
       }
     }
     rpc modify-l3vpn-instance-connection {
       description "Modify a l3vpn connection." ;
       input {
         leaf l3vpn-id {
           type string;
           description "L3vpn ID." ;
         }
         container ac-connection {
           description "ac connection." ;
           list acs{
             key "id";
             description "acs ID." ;
             leaf id {
               type string ;
               description "acs ID." ;
             }
             container connection {
               description "CE to PE  connection." ;
               uses service-types:connection;
             }
           }
         }
       }
     }
     rpc inquire-l3vpn-instance-work-path {
       description "Inquire a L3VPN instance work path." ;
        input {
              leaf service-id {
                type string;
             description "service ID." ;
              }
               leaf ingress-ne-id {
                 type string ;
              description "ingress network element ID." ;
               }
               leaf destination-ne-id {
                 type string ;
              description "destination network element ID." ;
               }
               leaf ingress-ac-id {
                 type string ;
              description "ingress ac ID." ;
               }
               leaf destination-ac-id {
                 type string ;
              description "destination ac ID." ;
               }
               leaf path-layer {
                  type string ;
               description "path layer." ;
               }
               leaf path-role {
                  type string ;
             description "path role." ;
               }
       }
       output {
           container service-path {
            description "service path." ;
              leaf service-id {
                type string;
             description "service ID." ;
              }
               leaf ingress-ne-id {
                 type string ;
              description "ingress network element ID." ;
               }
               leaf destination-ne-id {
                 type string ;
               description "destination network element ID." ;
               }
               leaf ingress-ac-id {
                 type string ;
              description "ingress access circuit ID." ;
               }
               leaf destination-ac-id {
                 type string ;
              description "destination access circuit ID." ;
               }
               leaf path-layer {
                  type string ;
               description "path layer." ;
               }
               leaf path-role {
                  type string ;
               description "path role." ;
               }
               list path-list {
                   key "ne-id";
             description "path list." ;
                   leaf ne-id {
                      type string;
              description "network element ID." ;
                   }
                   leaf ingress-ltp-id {
                      type string;
              description "LTP ID." ;
                   }
                   leaf backward-peer-id {
                      type string;
              description "backward peer ID." ;
                   }
                   leaf egress-ltp-id {
                      type string;
              description "egress ltp ID." ;
                   }
                   leaf forward-peer-id {
                      type string;
              description "forward peer ID." ;
                   }
               }
             }
       }
     }
   }