HONEYCOMB-58 - Routing Api
[honeycomb.git] / ioam / api / src / main / yang / ioam-sb-trace.yang
1 module ioam-sb-trace {
2   yang-version 1;
3   namespace "urn:cisco:params:xml:ns:yang:ioam-sb-trace";
4   prefix ioam-sb-trace;
5
6   import ietf-interfaces { prefix ietf-if; }
7
8   organization "Cisco Systems, Inc.";
9
10   contact
11     "Author: Srihari Raghavan
12      srihari@cisco.com";
13
14   description
15     "This YANG module defines a component that describing the
16     configuration of in-band OAM device configuration for
17     trace elements.
18     ";
19
20   revision 2016-05-12 {
21     description
22       "Base model for in-band OAM trace device configuration.";
23     reference
24       "";
25   }
26
27   container ioam-trace-config {
28   description
29     "Device specific configuration for in-band OAM trace.";
30
31   list trace-config {
32     key "trace-config-name";
33     ordered-by system;
34     description
35       "Set of ioam trace configurations that group parameters
36       required to enable iOAM6 tracing at a service node";
37
38     leaf trace-config-name {
39       type string {
40         length "0..255";
41       }
42       mandatory true;
43       description
44         "Unique identifier for each node tracing configuration";
45     }
46
47     leaf acl-name {
48       type string;
49       description
50         "The ACL name associated to classify and apply this
51         trace config";
52     }
53
54     leaf trace-type {
55       type uint8 {
56         range "3|7|9|17|25|31";
57       }
58
59       mandatory true;
60       description
61         "Trace type that defines the trace element variant.  Moving
62         from LSB to MSB, each bit represents node_id, ingress_if_id,
63         egress_if_id, timestamp, app_data and others are undefined.
64         Currently, the supported values are 0x03, 0x07, 0x09,
65         0x11, 0x19 and 0x1f.";
66     }
67
68     leaf trace-num-elt {
69       type uint8;
70
71       mandatory true;
72       description
73         "Number of trace elements to be inserted in the tracing
74         options.";
75     }
76
77     leaf trace-tsp {
78       type enumeration {
79         enum seconds {
80           value 0;
81           description "Timestamp in seconds.";
82         }
83         enum milliseconds {
84           value 1;
85           description "Timestamp in milli seconds.";
86         }
87         enum microseconds {
88           value 2;
89           description "Timestamp in micro seconds.";
90         }
91         enum nanoseconds {
92           value 3;
93           description "Timestamp in nano seconds.";
94         }
95       }
96
97       mandatory true;
98       description
99         "This field depicts the delay domain of the trace path,
100         whether it is in seconds, milliseconds, microseconds
101         or nanoseconds.";
102     }
103
104     leaf trace-op {
105       type enumeration {
106         enum add {
107           value 0;
108           description "Add new and fill trace information.";
109         }
110         enum update {
111           value 1;
112           description "Update existing trace information.";
113         }
114         enum remove {
115           value 2;
116           description "Decap or remove existing trace information.";
117         }
118       }
119
120       mandatory true;
121       description
122         "The type of trace element operation that the service node
123         handling this profile should do. The options are to add the
124         trace elements, update the trace elements or to remove the
125         trace elements.";
126     }
127
128     leaf trace-app-data {
129       type uint32;
130       description
131         "Application specific data to be added by the node";
132     }
133
134     leaf node-id {
135       type uint32;
136       mandatory true;
137       description
138         "iOAM Service Node id assigned to this node";
139     }
140
141     list node-interfaces {
142       key "index";
143       ordered-by system;
144       description
145         "List of node's interfaces on which the trace configuration
146         need to be applied. Typically this is to all interfaces
147         but can be filtered.";
148
149       leaf index {
150         type uint32;
151         mandatory true;
152         description
153           "Index for the interfaces list";
154       }
155
156       leaf intf-name {
157         type ietf-if:interface-ref;
158         mandatory true;
159         description
160           "Instance of ietf-interfaces:interface-ref";
161       }
162     }
163
164     /*** links to ioam-sb-data-export ***/
165     leaf data-export-profile-name {
166       type string;
167       description
168         "The data export profile name with server information to
169         send data to.";
170     }
171
172     /*** Transport encap profiles. Not used currently ***/
173     leaf transport-encap-profile-name {
174       type string;
175       description
176         "The transport encap profile name with sub configurations for
177         handling transport encap.";
178     }
179 /*** list: end ***/
180   }
181 /*** container: end ***/
182   }
183 /*** module: end ***/
184 }