policy-context@2018-06-07.yang revision b77a5725
1module policy-context {
2    yang-version 1;
3    namespace "urn:honeycomb:params:xml:ns:yang:policy:context";
4    prefix "policy-ctx";
5
6    import hc2vpp-oc-srte-policy {
7       prefix "oc-srte";
8       revision-date 2017-09-18;
9    }
10
11    import ietf-inet-types {
12       prefix "inet";
13    }
14
15    import naming-context {
16       prefix "nc";
17    }
18
19    import yang-ext {
20       prefix "ext";
21    }
22
23    organization
24        "FD.io - The Fast Data Project";
25
26    contact
27        "Hc2vpp Wiki <https://wiki.fd.io/view/Hc2vpp>
28         Mailing List <hc2vpp@lists.fd.io>";
29
30    description
31        "This module provides mapping between SRV6 policy identifiers (color and endpoint)
32         defined in the hc2vpp-oc-srte-policy module and identifiers used by the VPP SRV6
33         policy plugin. VPP uses BSID as policy identifier, which is mapped to color and
34         endpoint identifiers in the model.
35
36         The mapping is managed internally by the HC SRV6 plugin.
37         It is exposed as operational state data for debugging purposes.
38
39         Copyright (c) 2018 Bell Canada, Pantheon Technologies and/or its affiliates.
40
41         Licensed under the Apache License, Version 2.0 (the 'License');
42         you may not use this file except in compliance with the License.
43         You may obtain a copy of the License at:
44
45         http://www.apache.org/licenses/LICENSE-2.0
46
47         Unless required by applicable law or agreed to in writing, software
48         distributed under the License is distributed on an 'AS IS' BASIS,
49         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
50         See the License for the specific language governing permissions and
51         limitations under the License.";
52
53    revision "2018-06-07" {
54        description "Initial revision.";
55    }
56
57    grouping srv6-policy-context-attributes {
58        container srv6-policy-mappings {
59            list srv6-policy-mapping {
60                key "bsid";
61
62                leaf name {
63                    type string;
64                    description "Srv6 policy name";
65                }
66
67                leaf color {
68                    type uint32;
69                    description "Srv6 policy color";
70                }
71
72                leaf endpoint {
73                    type inet:ipv6-address;
74                    description "Policy endpoint represented by IPv6 address";
75                }
76
77                leaf bsid {
78                    type inet:ipv6-address;
79                    description "Policy represented by IPv6 address";
80                }
81            }
82        }
83
84    }
85
86    grouping srv6-candidate-path-context-attributes {
87        container srv6-candidate-path-mappings {
88            list srv6-candidate-path-mapping {
89                key "bsid";
90
91                leaf name {
92                    type string;
93                    description "Srv6 policy candidate path name";
94                }
95
96                leaf provisioning-method {
97                    type identityref {
98                        base oc-srte:provisioning-method-type;
99                    }
100                    description "Srv6 policy candidate path provisioning-method";
101                }
102
103                leaf preference {
104                    type uint32;
105                    description "Srv6 policy candidate path preference";
106                }
107
108                leaf distinguisher {
109                    type uint32;
110                    description "Srv6 policy candidate path distinguisher";
111                }
112
113                leaf bsid {
114                    type inet:ipv6-address;
115                    description "Candidate path represented by IPv6 address";
116                }
117            }
118        }
119    }
120
121    augment /nc:contexts {
122        ext:augment-identifier "srv6-policy-context-augmentation";
123        uses srv6-policy-context-attributes;
124        uses srv6-candidate-path-context-attributes;
125    }
126}
127