module ietf-sd-onos-service-types { | |
namespace "urn:ietf:params:xml:ns:yang:ietf-sd-onos-service-types"; | |
prefix service-types ; | |
import ietf-inet-types {prefix inet; } | |
import ietf-sd-onos-common-types {prefix types;} | |
organization ""; | |
contact ""; | |
description | |
"Defines basic service types for L3VPN service."; | |
revision "2015-12-16" { | |
reference ""; | |
} | |
typedef exp { | |
type enumeration { | |
enum BE { | |
value 0 ; | |
description "BE." ; | |
} | |
enum AF1 { | |
value 1 ; | |
description "AF1." ; | |
} | |
enum AF2 { | |
value 2 ; | |
description "AF2." ; | |
} | |
enum AF3 { | |
value 3 ; | |
description "AF3." ; | |
} | |
enum AF4 { | |
value 4 ; | |
description "AF4." ; | |
} | |
enum EF { | |
value 5 ; | |
description "EF." ; | |
} | |
enum CS6 { | |
value 6 ; | |
description "CS6." ; | |
} | |
enum CS7 { | |
value 7 ; | |
description "CS7." ; | |
} | |
} | |
default CS7; | |
description | |
"exp parameter."; | |
} | |
typedef pw-role{ | |
type enumeration { | |
enum normal{ | |
value 0 ; | |
description "normal." ; | |
} | |
enum master { | |
value 1 ; | |
description "master." ; | |
} | |
enum slave { | |
value 2 ; | |
description "slave." ; | |
} | |
enum DNI-PW { | |
value 3 ; | |
description "DNI PW." ; | |
} | |
} | |
default normal; | |
description | |
"The role of the PW."; | |
} | |
grouping qos-if-car { | |
description "qos parameter." ; | |
list qos-if-car { | |
key "direction"; | |
description "cars qos policy." ; | |
leaf direction { | |
type enumeration { | |
enum inbound{ | |
value 0 ; | |
description "inbound." ; | |
} | |
enum outbound { | |
value 1 ; | |
description "outbound." ; | |
} | |
} | |
description "qos for interface car" ; | |
} | |
leaf cir { | |
type int32; | |
description "forward CIR. unit:Kbps" ; | |
} | |
leaf pir { | |
type int32; | |
description "forward PIR. unit:Kbps" ; | |
} | |
leaf cbs { | |
type int32; | |
description "forward CBS. unit:Kbps" ; | |
} | |
leaf pbs { | |
type int32; | |
description "forward PBS. unit:Kbps" ; | |
} | |
} | |
} | |
grouping protect-policy { | |
description "The protect policy of the VPN" ; | |
leaf protect-type { | |
type enumeration { | |
enum unprotected { | |
value 0 ; | |
description "unprotected." ; | |
} | |
enum protected { | |
value 1 ; | |
description "protection." ; | |
} | |
} | |
default unprotected ; | |
description "protection type" ; | |
} | |
leaf revertive-type { | |
type enumeration { | |
enum no-revertive { | |
value 0 ; | |
description "unprotected." ; | |
} | |
enum revertive { | |
value 1 ; | |
description "protection." ; | |
} | |
} | |
description "revertive mode" ; | |
} | |
leaf wtr { | |
type uint32; | |
default 300; | |
description "WTR.unit:s" ; | |
} | |
} | |
grouping oam-policy { | |
description "The oam policy of the vpn service." ; | |
leaf detect-type { | |
type enumeration { | |
enum undetect { | |
value 0 ; | |
description "unprotected." ; | |
} | |
enum APS { | |
value 1 ; | |
description "protection." ; | |
} | |
enum BFD { | |
value 2 ; | |
description "unprotected." ; | |
} | |
} | |
description "detect type" ; | |
} | |
container bfd-detect-para { | |
description "bfd detect parameters." ; | |
leaf ingress-discriminator { | |
type int32; | |
description "ingress-discriminator" ; | |
} | |
leaf egress-discriminator { | |
type int32; | |
description "egress-discriminator" ; | |
} | |
leaf tx-interval { | |
type int32; | |
description "tx-interval" ; | |
} | |
leaf rx-interval { | |
type int32; | |
description "rx-interval" ; | |
} | |
leaf detect-interval { | |
type int32; | |
description "detect-interval" ; | |
} | |
} | |
} | |
grouping ac { | |
description "Access information." ; | |
leaf id{ | |
type string; | |
mandatory true; | |
description "ac id." ; | |
} | |
leaf name{ | |
type string; | |
config false; | |
description "ac name." ; | |
} | |
leaf ne-id { | |
type string ; | |
mandatory true; | |
description "ne id." ; | |
} | |
leaf ltp-id { | |
type string ; | |
mandatory true; | |
description "ltp id." ; | |
} | |
leaf admin-status { | |
type types:admin-status; | |
description "Administration status." ; | |
} | |
leaf operate-status { | |
type types:operate-status; | |
description "Operation status." ; | |
} | |
container l2-access { | |
description "link layer access information of ac." ; | |
uses l2-access; | |
} | |
leaf role { | |
type enumeration { | |
enum master { | |
value 0 ; | |
description "master." ; | |
} | |
enum slave { | |
value 1 ; | |
description "slave." ; | |
} | |
enum hub { | |
value 2 ; | |
description "slave." ; | |
} | |
enum spoke { | |
value 3 ; | |
description "slave." ; | |
} | |
} | |
default master; | |
description "role of snc lsp." ; | |
} | |
container qos-policy { | |
description "The qos policy of the vpn service." ; | |
container qos-if-cars { | |
description "qos policy if car." ; | |
list qos-if-car { | |
//key "direction"; | |
uses qos-if-car; | |
description "List of qos parameters." ; | |
} | |
} | |
} | |
} | |
grouping l3-ac { | |
description "Access information of l3vpn." ; | |
list access-circuit { | |
key "id"; | |
description "list of access circuit." ; | |
uses ac; | |
container connection { | |
description "connection information of ac." ; | |
uses connection; | |
} | |
} | |
} | |
grouping l2-access { | |
description "Access information of l2vpn." ; | |
leaf access-type{ | |
type enumeration { | |
enum Port { | |
value 0 ; | |
description "master." ; | |
} | |
enum Dot1Q { | |
value 1 ; | |
description "slave." ; | |
} | |
enum QinQ { | |
value 2 ; | |
description "master." ; | |
} | |
} | |
mandatory true; | |
description "The access type of the vpn service." ; | |
} | |
leaf dot1q-vlan-bitmap { | |
type string; | |
mandatory true; | |
description "Dot1Q Vlan Bitmap." ; | |
} | |
leaf qinq-svlan-bitmap { | |
type string; | |
mandatory true; | |
description "QinQ svlan Bitmap." ; | |
} | |
leaf qinq-cvlan-bitmap { | |
type string; | |
mandatory true; | |
description "QinQ cvlan Bitmap." ; | |
} | |
leaf access-action { | |
type enumeration { | |
enum Keep { | |
value 0 ; | |
description "keep." ; | |
} | |
enum Push { | |
value 1 ; | |
description "push." ; | |
} | |
enum Pop { | |
value 2 ; | |
description "pop." ; | |
} | |
enum Swap { | |
value 3 ; | |
description "swap." ; | |
} | |
} | |
mandatory true; | |
description "access type." ; | |
} | |
leaf action-vlan-id { | |
type int32 { | |
range "1..4094"; | |
} | |
description "action vlan id." ; | |
} | |
} | |
grouping connection { | |
description "Describe the connection of the vpn service." ; | |
leaf ip-address { | |
type inet:ip-address ; | |
description "ip address of access circuit's connection." ; | |
} | |
leaf mask-length { | |
type int32 { | |
range "1..32"; | |
} | |
description "mask length of ip address." ; | |
} | |
leaf protocols { | |
type enumeration { | |
enum static { | |
value 0 ; | |
description "static." ; | |
} | |
enum ospf { | |
value 1 ; | |
description "ospf." ; | |
} | |
enum isis { | |
value 2 ; | |
description "bgp" ; | |
} | |
enum bgp { | |
value 3 ; | |
description "bgp" ; | |
} | |
} | |
description "protocols between PE and CE." ; | |
} | |
container static-routes { | |
description "Defines the static routes." ; | |
list static-route { | |
key "ip-prefix mask-length"; | |
description "List of static route." ; | |
leaf ip-prefix { | |
type inet:ipv4-address; | |
description "ip prefix" ; | |
} | |
leaf mask-length { | |
type uint32 { | |
range "1..32"; | |
} | |
description "mast length" ; | |
} | |
leaf next-hop { | |
type inet:ipv4-address ; | |
description "next hop" ; | |
} | |
leaf preference { | |
type uint32 { | |
range "1..65535"; | |
} | |
description "preference of the route." ; | |
} | |
} | |
} | |
} | |
grouping pw{ | |
description "PW definition "; | |
leaf id { | |
type string ; | |
description "ID of pw." ; | |
} | |
uses encaplate-type-grouping; | |
leaf ingress-ne-id { | |
type string ; | |
description "ingress ne id." ; | |
} | |
leaf egress-ne-id { | |
type string ; | |
description "egress ne id." ; | |
} | |
leaf ctrl-word-support { | |
type enumeration { | |
enum not-support { | |
value 0 ; | |
description "pw doesn't support control word" ; | |
} | |
enum support { | |
value 1 ; | |
description "pw supports control word" ; | |
} | |
} | |
default support; | |
description "ctrl word support. 0 : not support, 1 : support" ; | |
} | |
leaf sn-support { | |
type enumeration { | |
enum not-support { | |
value 0 ; | |
description "pw doesn't support control word" ; | |
} | |
enum support { | |
value 1 ; | |
description "pw supports control word" ; | |
} | |
} | |
default not-support; | |
description "serial number support. 0 : not support, 1 : support" ; | |
} | |
leaf vccv-type { | |
type enumeration { | |
enum not-support { | |
value 0 ; | |
description "pw doesn't support vccv" ; | |
} | |
enum CWD { | |
value 1 ; | |
description "pw supports vccv" ; | |
} | |
enum Label-alert { | |
value 2 ; | |
description "pw supports vccv" ; | |
} | |
enum TTL { | |
value 3 ; | |
description "pw supports vccv" ; | |
} | |
enum CWD&Label-alert { | |
value 4 ; | |
description "pw supports vccv" ; | |
} | |
enum CWD&TTL { | |
value 5 ; | |
description "pw supports vccv" ; | |
} | |
enum Label-alert&TTL { | |
value 6 ; | |
description "pw supports vccv" ; | |
} | |
enum CWD&Label-alert&TTL { | |
value 7 ; | |
description "pw supports vccv" ; | |
} | |
} | |
default not-support; | |
description "vccv type" ; | |
} | |
leaf conn-ack-type { | |
type enumeration { | |
enum not-support { | |
value 0 ; | |
description "pw doesn't support connection ack" ; | |
} | |
enum support { | |
value 1 ; | |
description "pw supports connection ack" ; | |
} | |
} | |
default not-support; | |
description "Connectivity test type" ; | |
} | |
container tunnels { | |
description "Define tunnels." ; | |
list tunnel{ | |
key "tunnel-id"; | |
description "The list of tunnel id." ; | |
uses tunnel; | |
} | |
} | |
} | |
grouping tunnel { | |
description "Reusable entity of tunnel." ; | |
leaf tunnel-id { | |
type string ; | |
description "ID of tunnel." ; | |
} | |
} | |
grouping encaplate-type-grouping { | |
description "encaplate type" ; | |
leaf encaplate-type { | |
type enumeration { | |
enum NONE { | |
value 0 ; | |
description "none." ; | |
} | |
enum fr-dlci-martini { | |
value 1 ; | |
description "fr-dlci-martini." ; | |
} | |
enum atm-aal5-sdu { | |
value 2 ; | |
description "atm-aal5-sdu." ; | |
} | |
enum atm-transparent { | |
value 3 ; | |
description "atm-transparent." ; | |
} | |
enum ethernet-vlan { | |
value 4 ; | |
description "ethernet-vlan." ; | |
} | |
enum ethernet { | |
value 5 ; | |
description "ethernet ." ; | |
} | |
enum hdlc { | |
value 6 ; | |
description " hdlc." ; | |
} | |
enum ppp { | |
value 7 ; | |
description "ppp." ; | |
} | |
enum cep-mpls { | |
value 8 ; | |
description " cep-mpls." ; | |
} | |
enum atm-ntol { | |
value 9 ; | |
description "atm-ntol." ; | |
} | |
enum atm-nto1-vpc { | |
value 10 ; | |
description "atm-nto1-vpc." ; | |
} | |
enum ip-layer2 { | |
value 11 ; | |
description " ip-layer2." ; | |
} | |
enum atm-1to1-vcc { | |
value 12 ; | |
description "atm-1to1-vcc." ; | |
} | |
enum atm-1to1-vpc { | |
value 13 ; | |
description "atm-1to1-vpc." ; | |
} | |
enum atm-aal5-pdu { | |
value 14 ; | |
description "atm-aal5-pdu." ; | |
} | |
enum fr-port { | |
value 15 ; | |
description "fr-port." ; | |
} | |
enum cep-packet { | |
value 16 ; | |
description "cep-packet." ; | |
} | |
enum e1 { | |
value 17 ; | |
description "e1." ; | |
} | |
enum t1 { | |
value 18 ; | |
description "t1." ; | |
} | |
enum e3 { | |
value 19 ; | |
description "e3." ; | |
} | |
enum t3 { | |
value 20 ; | |
description " t3." ; | |
} | |
enum cesopsn-basic { | |
value 21 ; | |
description "cesopsn-basic." ; | |
} | |
enum tdmoip-aal1 { | |
value 22 ; | |
description "tdmoip-aal1." ; | |
} | |
enum cesopsn-tdm { | |
value 23 ; | |
description "cesopsn-tdm." ; | |
} | |
enum tdmoip-aal2 { | |
value 24 ; | |
description "tdmoip-aal2." ; | |
} | |
enum fr-dlci { | |
value 25 ; | |
description "fr-dlci." ; | |
} | |
} | |
description "encaplate type." ; | |
} | |
} | |
grouping pw-trail{ | |
description "pw trail information." ; | |
leaf id { | |
type string ; | |
description "ID of pw-trail." ; | |
} | |
leaf role { | |
type pw-role; | |
description "role of pw-trail." ; | |
} | |
container pw-lists { | |
description "List of pw information." ; | |
list pw-list { | |
key id; | |
description "List of pw information." ; | |
uses pw ; | |
} | |
} | |
} | |
grouping tunnel-service { | |
description "Reusable entity of tunnel service." ; | |
leaf signaling-type { | |
type enumeration { | |
enum RSVP-TE { | |
value 0 ; | |
description "RSVP-TE" ; | |
} | |
enum LDP { | |
value 1 ; | |
description "LDP" ; | |
} | |
enum GRE { | |
value 2 ; | |
description "GRE" ; | |
} | |
enum SR-BE { | |
value 3 ; | |
description "SR-BE" ; | |
} | |
enum SR-TE { | |
value 4 ; | |
description "SR-TE" ; | |
} | |
} | |
default RSVP-TE; | |
description "signaling type." ; | |
} | |
leaf tunnel-mode { | |
type enumeration { | |
enum Nto1 { | |
value 0 ; | |
description "multi service one tunnel" ; | |
} | |
enum 1to1 { | |
value 1 ; | |
description "oner service one tunnel" ; | |
} | |
} | |
default Nto1; | |
description "service to tunnel mode." ; | |
} | |
container protect-policy { | |
description "Protect policy." ; | |
uses protect-policy; | |
} | |
container oam-policy { | |
description "oam policy." ; | |
uses oam-policy; | |
} | |
leaf latency { | |
type int32; | |
description "tunnel latency requirement." ; | |
} | |
} | |
grouping service-path { | |
description "Service path of l3vpn." ; | |
list service-path{ | |
key "service-id source-ne-id source-ac-id destination-ne-id destination-ac-id"; | |
description | |
"The list of service path."; | |
leaf service-id { | |
type string ; | |
description "l2vpn or l3vpn service id." ; | |
} | |
leaf source-ne-id { | |
type string ; | |
description "source ne id." ; | |
} | |
leaf source-ac-id { | |
type string ; | |
description "source ltp id." ; | |
} | |
leaf destination-ne-id { | |
type string ; | |
description "destination ne id." ; | |
} | |
leaf destination-ac-id { | |
type string ; | |
description "destination ltp id." ; | |
} | |
container path-lists{ | |
description "The path list of service path." ; | |
list path-list { | |
key "path-layer path-role"; | |
description "The path list of service path." ; | |
leaf path-layer { | |
type enumeration { | |
enum PW { | |
value 0 ; | |
description "pw path." ; | |
} | |
enum BGP-LSP { | |
value 1 ; | |
description "BGP-LSP Path." ; | |
} | |
enum LSP { | |
value 2 ; | |
description "LSP Path." ; | |
} | |
} | |
description "path type. 0 : PW, 1 : BGP-LSP, 2 : PW" ; | |
} | |
leaf path-role { | |
type enumeration { | |
enum Primary { | |
value 0 ; | |
description "master path." ; | |
} | |
enum Backup { | |
value 1 ; | |
description "backup path." ; | |
} | |
enum Active { | |
value 2 ; | |
description "active path." ; | |
} | |
} | |
description "path role.. 0 : master, 1 : backup, 2 : | |
Bypass." ; | |
} | |
container paths { | |
description "path definition." ; | |
list path { | |
key "ne-id"; | |
description "Network element id list." ; | |
leaf ne-id { | |
type string; | |
description "Network element id." ; | |
} | |
leaf ingress-ltp-id { | |
type string; | |
description "ingress ltd id." ; | |
} | |
leaf backward-peer-id { | |
type string; | |
description "backward peer id." ; | |
} | |
leaf egress-ltp-id { | |
type string; | |
description "egress ltd id." ; | |
} | |
leaf forward-peer-id { | |
type string; | |
description "forward peer id." ; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |