Advertisement
Guest User

Untitled

a guest
Jun 26th, 2018
845
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.87 KB | None | 0 0
  1. module contrail-create-vni {
  2.  
  3.   namespace "http://example.com/contrail-create-vni";
  4.   prefix contrail-create-vni;
  5.  
  6.   import ietf-inet-types {
  7.     prefix inet;
  8.   }
  9.   import tailf-common {
  10.     prefix tailf;
  11.   }
  12.   import tailf-ncs {
  13.     prefix ncs;
  14.   }
  15.  
  16.   description
  17.   "Bla bla...";
  18.  
  19.   revision 2016-01-01 {
  20.     description
  21.     "Initial revision.";
  22.   }
  23.  
  24.   list contrail-create-vni {
  25.     description "This service used to create the contrail Virtual Networks through NSO";
  26.     key vn_name;
  27.  
  28.     uses ncs:service-data;
  29.     ncs:servicepoint contrail-create-vni-servicepoint;
  30.  
  31.  
  32.     leaf vn_name {
  33.       tailf:info "Please Enter the virtual network name";
  34.       tailf:cli-allow-range;
  35.       type string;
  36.     }
  37.  
  38.  
  39.     leaf vn_ipaddr {
  40.  
  41.       tailf:info "Please Enter the virtual network ip address. Note the field only accept the IP Address";
  42.       mandatory true;
  43.       type inet:ipv4-address;
  44.     }
  45.  
  46.  
  47.     leaf vn_subnet {
  48.       tailf:info "Please enter the subnet address for the VN. We added custom check that convert the subnet mask to CIDR notation";
  49.       mandatory true;
  50.       type string;
  51.     }
  52.  
  53.  
  54.     leaf vrf_name {
  55.       tailf:info "Please provide the vrf name for the VN";
  56.       type string;
  57.     }
  58.  
  59.  
  60.     leaf route_target {
  61.       tailf:info "Please provide route target";
  62.       type string;
  63.     }
  64.  
  65.     leaf gre_tunnel_number {
  66.       tailf:info "Please enter the tunnel number";
  67.               type uint32 {
  68.           range "1..199 | 1300..max" {
  69.             error-message "Link ID is out of range. Should be between 1 and 99 or from 1300.";
  70.           }
  71.         }
  72.     }
  73.  
  74.     leaf gre_tunnel_address {
  75.       tailf:info "Please enter the tunnel ip address";
  76.       type inet:ipv4-address;
  77.     }
  78.  
  79.     leaf contrail_gateway {
  80.       type leafref {
  81.         path "/ncs:devices/ncs:device/ncs:name";
  82.       }
  83.     }
  84.  
  85.  
  86.   }
  87.  
  88.  
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement