blob: acb17d02b52d51955d000e20912997ed62e719e4 [file] [log] [blame]
Thomas Vachuska6655bee2017-08-24 16:12:59 -07001module openconfig-network-instance-policy {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/network-instance/policy";
7
8 prefix "oc-ni-pol";
9
10 // import some basic types
11 import openconfig-extensions { prefix oc-ext; }
12 import openconfig-routing-policy { prefix oc-rpol; }
13 import openconfig-policy-types { prefix oc-pol-types; }
14
15
16 // meta
17 organization "OpenConfig working group";
18
19 contact
20 "OpenConfig working group
21 www.openconfig.net";
22
23 description
24 "This module defines routing policy statements (conditions and
25 actions) for the network instance model. These statements are
26 generally added to the routing policy model.";
27
28 oc-ext:openconfig-version "0.1.0";
29
30 revision "2017-02-15" {
31 description
32 "Initial revision";
33 reference "0.1.0";
34 }
35
36
37 // grouping statements
38
39 grouping protocol-instance-policy-config {
40 description
41 "Configuration data for policy matching on protocol instance";
42
43 leaf protocol-identifier {
44 type identityref {
45 base oc-pol-types:INSTALL_PROTOCOL_TYPE;
46 }
47 description
48 "The identifier (protocol type) of the
49 protocol instance to match on in the local network
50 instance.";
51 }
52
53 leaf protocol-name {
54 type string;
55 description
56 "The name of the protocol instance to match
57 on in the local network instance";
58 }
59 }
60
61 grouping protocol-instance-policy-state {
62 description
63 "Operational state data for policy matching on protocol
64 instance";
65 }
66
67 grouping protocol-instance-policy-top {
68 description
69 "Top-level grouping for policy matching on protocol instance";
70
71 container match-protocol-instance {
72 description
73 "Top-level container for protocol instance match condition
74 in policy statements. The protocol instance is referenced
75 by an identifier and name";
76
77 container config {
78 description
79 "Configuration data for policy matching on protocol
80 instance";
81
82 uses protocol-instance-policy-config;
83 }
84
85 container state {
86
87 config false;
88
89 description
90 "Operational state data for policy matching on protocol instance";
91
92 uses protocol-instance-policy-config;
93 uses protocol-instance-policy-state;
94 }
95 }
96 }
97
98 // data definition statements
99
100 // augment statements
101
102 augment "/oc-rpol:routing-policy/oc-rpol:policy-definitions/" +
103 "oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/" +
104 "oc-rpol:conditions" {
105 description
106 "Add match conditions for protocol instances to the routing
107 policy model.";
108
109 uses protocol-instance-policy-top;
110 }
111
112 // rpc statements
113
114 // notification statements
115
116}