8c3aad41acf5bf430d773864f8a8f6f22d89743b
[honeycomb.git] / v3po / api / src / main / yang / pbb-types.yang
1 module pbb-types {
2   yang-version 1;
3   namespace "urn:opendaylight:params:xml:ns:yang:pbb-types";
4   prefix "pbb-types";
5
6   description "Common types used for defining Pbb based subinterfaces";
7
8   revision "2016-12-14" {
9           description
10               "Initial revision.";
11   }
12
13   import ietf-yang-types {
14       prefix yang;
15   }
16
17   import ietf-interfaces {
18       prefix if;
19   }
20
21   import yang-ext {
22       prefix "ext";
23   }
24
25   typedef operation {
26       type enumeration {
27         // NOTE - Does not specify disabled enum value(0), because its used internally to delete/disable rewrite
28         enum "push-2" {
29             value 2;
30         }
31
32         enum "pop-2" {
33             value 4;
34             description "Encapsulate/Decapsulate pbb packet according to incoming/outcoming direction";
35         }
36         enum "translate-2-1" {
37             value 7;
38         }
39       }
40   }
41
42   grouping pbb-rewrite-attributes {
43     description "Provider Backbone Bridge attributes";
44
45     leaf destination-address {
46       type yang:mac-address;
47       description "backbone destination address";
48     }
49
50     leaf source-address {
51       type yang:mac-address;
52       description "backbone source address";
53     }
54
55     leaf outer-tag {
56         type uint16;
57     }
58
59     leaf b-vlan-tag-vlan-id {
60         type uint16 {
61             //12 bit range
62             range "1..4095";
63         }
64         description "backbone vlan id";
65     }
66
67     leaf i-tag-isid {
68         type uint32 {
69           //24 bit range
70           range "1..16777215";
71         }
72         description "identifier of the backbone service instance ";
73     }
74
75     leaf interface-operation {
76         type operation;
77         default pop-2;
78         description "Define operation that will pbb interface perform while processing packets";
79     }
80   }
81 }