summaryrefslogtreecommitdiffstats
path: root/ioam/api/src/main/yang/ioam-sb-trace.yang
blob: 731fda96dd436ce74e5d37d523c8cda513bec8b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
module ioam-sb-trace {
  yang-version 1;
  namespace "urn:cisco:params:xml:ns:yang:ioam-sb-trace";
  prefix ioam-sb-trace;

  import ietf-interfaces { prefix ietf-if; }

  organization "Cisco Systems, Inc.";

  contact
    "Author: Srihari Raghavan
     srihari@cisco.com";

  description
    "This YANG module defines a component that describing the
    configuration of in-band OAM device configuration for
    trace elements.
    ";

  revision 2016-05-12 {
    description
      "Base model for in-band OAM trace device configuration.";
    reference
      "";
  }

  container ioam-trace-config {
  description
    "Device specific configuration for in-band OAM trace.";

  list trace-config {
    key "trace-config-name";
    ordered-by system;
    description
      "Set of ioam trace configurations that group parameters
      required to enable iOAM6 tracing at a service node";

    leaf trace-config-name {
      type string {
        length "0..255";
      }
      mandatory true;
      description
        "Unique identifier for each node tracing configuration";
    }

    leaf acl-name {
      type string;
      description
        "The ACL name associated to classify and apply this
        trace config";
    }

    leaf trace-type {
      type uint8 {
        range "3|7|9|17|25|31";
      }

      mandatory true;
      description
        "Trace type that defines the trace element variant.  Moving
        from LSB to MSB, each bit represents node_id, ingress_if_id,
        egress_if_id, timestamp, app_data and others are undefined.
        Currently, the supported values are 0x03, 0x07, 0x09,
        0x11, 0x19 and 0x1f.";
    }

    leaf trace-num-elt {
      type uint8;

      mandatory true;
      description
        "Number of trace elements to be inserted in the tracing
        options.";
    }

    leaf trace-tsp {
      type enumeration {
        enum seconds {
          value 0;
          description "Timestamp in seconds.";
        }
        enum milliseconds {
          value 1;
          description "Timestamp in milli seconds.";
        }
        enum microseconds {
          value 2;
          description "Timestamp in micro seconds.";
        }
        enum nanoseconds {
          value 3;
          description "Timestamp in nano seconds.";
        }
      }

      mandatory true;
      description
        "This field depicts the delay domain of the trace path,
        whether it is in seconds, milliseconds, microseconds
        or nanoseconds.";
    }

    leaf trace-op {
      type enumeration {
        enum add {
          value 0;
          description "Add new and fill trace information.";
        }
        enum update {
          value 1;
          description "Update existing trace information.";
        }
        enum remove {
          value 2;
          description "Decap or remove existing trace information.";
        }
      }

      mandatory true;
      description
        "The type of trace element operation that the service node
        handling this profile should do. The options are to add the
        trace elements, update the trace elements or to remove the
        trace elements.";
    }

    leaf trace-app-data {
      type uint32;
      description
        "Application specific data to be added by the node";
    }

    leaf node-id {
      type uint32;
      mandatory true;
      description
        "iOAM Service Node id assigned to this node";
    }

    list node-interfaces {
      key "index";
      ordered-by system;
      description
        "List of node's interfaces on which the trace configuration
        need to be applied. Typically this is to all interfaces
        but can be filtered.";

      leaf index {
        type uint32;
        mandatory true;
        description
          "Index for the interfaces list";
      }

      leaf intf-name {
        type ietf-if:interface-ref;
        mandatory true;
        description
          "Instance of ietf-interfaces:interface-ref";
      }
    }

    /*** links to ioam-sb-data-export ***/
    leaf data-export-profile-name {
      type string;
      description
        "The data export profile name with server information to
        send data to.";
    }

    /*** Transport encap profiles. Not used currently ***/
    leaf transport-encap-profile-name {
      type string;
      description
        "The transport encap profile name with sub configurations for
        handling transport encap.";
    }
/*** list: end ***/
  }
/*** container: end ***/
  }
/*** module: end ***/
}