blob: 0fa3ba17804220c286cd690ccfcddb617919c8be [file] [log] [blame]
Bharat saraswal72991282016-06-16 13:24:06 +05301module flow-classifier {
2
3 yang-version 1;
4
5 namespace "sfc.flowclassifier";
6
7 prefix "flow-classifier";
8
9 import "port-pair" {
10 prefix "port-pair";
11 }
12
13 organization "ON-LAB";
14
15 description "This submodule defines for flow classifier.";
16
17 revision "2016-05-24" {
18 description "Initial revision.";
19 }
20
21 typedef flow-classifier-id {
22 type port-pair:uuid;
23 }
24
25 typedef IpPrefix {
26 type string;
27 }
28
29 typedef VirtualPortId {
30 type string;
31 }
32
33 grouping flow-classifier {
34 container flow-classifier {
35 leaf id {
36 type flow-classifier-id;
37 }
38
39 leaf tenant-id {
40 type port-pair:tenant-id;
41 }
42
43 leaf name {
44 type string;
45 }
46
47 leaf description {
48 type string;
49 }
50
51 leaf etherType {
52 type string;
53 }
54
55 leaf protocol {
56 type string;
57 }
58
59 leaf priority {
60 type int32;
61 }
62
63 leaf minSrcPortRange {
64 type int32;
65 }
66
67 leaf maxSrcPortRange {
68 type int32;
69 }
70
71 leaf minDstPortRange {
72 type int32;
73 }
74
75 leaf maxDstPortRange {
76 type int32;
77 }
78
79 leaf srcIpPrefix {
80 type IpPrefix;
81 }
82
83 leaf dstIpPrefix {
84 type IpPrefix;
85 }
86
87 leaf srcPort {
88 type VirtualPortId;
89 }
90
91 leaf dstPort {
92 type VirtualPortId;
93 }
94 }
95 }
96 rpc exists {
97 input {
98 leaf id {
99 type flow-classifier-id;
100 }
101 }
102 output {
103 leaf is-present {
104 type boolean;
105 }
106 }
107 }
108
109 rpc get-flow-classifier-count {
110
111 output {
112 leaf count {
113 type int32;
114 }
115 }
116 }
117
118 rpc get-flow-classifier {
119 input {
120 leaf id {
121 type flow-classifier-id;
122 }
123 }
124 output {
125 uses flow-classifier;
126 }
127 }
128
129 rpc create-flow-classifier {
130 input {
131 uses flow-classifier;
132 }
133 output {
134 leaf is-created {
135 type boolean;
136 }
137 }
138 }
139
140 rpc update-flow-classifier {
141 input {
142 uses flow-classifier;
143 }
144 output {
145 leaf is-updated {
146 type boolean;
147 }
148 }
149 }
150
151 rpc remove-flow-classifier {
152 input {
153 leaf id {
154 type flow-classifier-id;
155 }
156 }
157 output {
158 leaf is-removed {
159 type boolean;
160 }
161 }
162 }
163
164 notification Flow-Classifier-Put {
165 uses flow-classifier;
166 }
167
168 notification Flow-Classifier-Delete {
169 uses flow-classifier;
170 }
171
172 notification Flow-Classifier-Update {
173 uses flow-classifier;
174 }
175}