summaryrefslogtreecommitdiffstats
path: root/ioam/api/src/main/yang/sfc-ioam-sb-pot.yang
blob: dc4ecedf29fccd94ddb07af24a5d4fedbe93ef79 (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
module sfc-ioam-sb-pot {

  yang-version 1;

  namespace "urn:cisco:params:xml:ns:yang:sfc-ioam-sb-pot";

  prefix sfc-ioam-sb-pot;

  organization "Cisco Systems, Inc.";
  contact
    "Shwetha Bhandari <shwethab@cisco.com>
     Srihari Raghavan <srihari@cisco.com>";

  description
    "This module contains a collection of YANG definitions for
     managing in-band OAM based proof of transit configuration
     parameters.  (https://github.com/ciscodevnet/ioam).

     The model is meant for proof of transit
     and is targetted for south-bound deployment nodes.";

  revision 2017-01-12 {
    description
      "Changes to field names and parameter ranges.";
    reference
      "";
  }

  typedef profile-index-range {
    type int32 {
      range "-1 .. 1";
    }
    description
      "Range used for the profile index. Currently restricted to
       -1 to 1 to identify profiles.";
  }

  identity path-identifier-identity {
    description
      "Base identity for path identifier type.";
  }

  identity path-identifier-type-acl {
    base "path-identifier-identity";
    description
      "ACL path identifier type.";
  }

  typedef path-identifier-type {
    type identityref {
      base path-identifier-identity;
    }
    description
      "Path Identifier Identity type.";
  }

  grouping pot-profile {
    description "A grouping for proof of transit profiles.";
    list pot-profile-list {
      key "index";
      ordered-by user;
      description "A set of pot profiles.";

      leaf index {
        type profile-index-range;
        mandatory true;
        description
          "Proof of transit profile index.";
      }

      leaf prime-number {
        type uint64;
        mandatory true;
        description
          "Prime number used for module math computation";
      }

      leaf secret-share {
        type uint64;
        mandatory true;
        description
          "Share of the secret of polynomial 1 used in computation";
      }

      leaf public-polynomial {
        type uint64;
        mandatory true;
        description
          "Public polynomial";
      }

      leaf lpc {
        type uint64;
        mandatory true;
        description
          "Lagrange Polynomial Coefficient";
      }

      leaf validator {
        type boolean;
        default "false";
        description
          "True if the node is a verifier node";
      }

      leaf validator-key {
        type uint64;
        description
          "Secret key for validating the path, constant of poly 1";
      }

      leaf number-of-bits {
        type uint8;
        default 32;
        description
          "Number of bits as mask used in random value generation.
           32-bits of mask is default.";
      }
    }
  }

  container pot-profiles {
    description "A group of proof of transit profiles.";

    list pot-profile-set {
      key "name";
      ordered-by user;
      description
        "Set of proof of transit profiles that group parameters
         required to classify and compute proof of transit
         metadata at a node";

      leaf name {
        type string;
        mandatory true;
        description
          "Unique identifier for each proof of transit profile";
      }

      leaf path-identifier {
        type string;
        description
           "The path identifier could be an ACL or others associated
            to classify and apply this profile";
      }

      leaf path-identifier-type-value {
        type path-identifier-type;
        default path-identifier-type-acl;
        description
          "Defines how to interpret the path-identifier.";
      }

      leaf active-profile-index {
        type profile-index-range;
        description
          "Proof of transit profile index that is currently active.
           Will be set in the first hop of the path or chain.
           Other nodes will not use this field.";
      }

      uses pot-profile;

    /*** list: end ***/
    }
  /*** Container: end ***/
  }
/*** module: end ***/
}