1 UNIFICATION_NT = '''<topology xmlns="urn:opendaylight:topology:correlation" xmlns:n="urn:TBD:params:xml:ns:yang:network-topology">
2 <n:topology-id>topo:1</n:topology-id>
4 <output-model>{output-model}</output-model>
6 <correlation-id>1</correlation-id>
8 <correlation-item>{correlation-item}</correlation-item>
10 <aggregation-type>{aggregation-type}</aggregation-type>
12 <input-model>{input-model}</input-model>
13 <underlay-topology>{underlay-topology-id}</underlay-topology>
15 <aggregate-inside>false</aggregate-inside>
18 <input-model>{input-model}</input-model>
19 <underlay-topology>{underlay-topology-id}</underlay-topology>
21 <aggregate-inside>false</aggregate-inside>
28 UNIFICATION_NT_AGGREGATE_INSIDE = '''<topology xmlns="urn:opendaylight:topology:correlation" xmlns:n="urn:TBD:params:xml:ns:yang:network-topology">
29 <n:topology-id>topo:1</n:topology-id>
31 <output-model>{output-model}</output-model>
33 <correlation-id>1</correlation-id>
35 <correlation-item>{correlation-item}</correlation-item>
37 <aggregation-type>{aggregation-type}</aggregation-type>
39 <input-model>{input-model}</input-model>
40 <underlay-topology>{underlay-topology-id}</underlay-topology>
42 <aggregate-inside>true</aggregate-inside>
49 UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE = '''<topology xmlns="urn:opendaylight:topology:correlation" xmlns:n="urn:TBD:params:xml:ns:yang:network-topology">
50 <n:topology-id>topo:1</n:topology-id>
52 <output-model>{output-model}</output-model>
54 <correlation-id>1</correlation-id>
56 <correlation-item>{correlation-item}</correlation-item>
58 <aggregation-type>{aggregation-type}</aggregation-type>
60 <input-model>{input-model}</input-model>
61 <underlay-topology>{underlay-topology-id}</underlay-topology>
62 <aggregate-inside>true</aggregate-inside>
64 <!-- apply filters -->
68 <underlay-topology>{underlay-topology-id}</underlay-topology>
75 UNIFICATION_FILTRATION_NT = '''<topology xmlns="urn:opendaylight:topology:correlation" xmlns:n="urn:TBD:params:xml:ns:yang:network-topology">
76 <n:topology-id>topo:1</n:topology-id>
78 <output-model>{output-model}</output-model>
80 <correlation-id>1</correlation-id>
82 <correlation-item>{correlation-item}</correlation-item>
84 <aggregation-type>{aggregation-type}</aggregation-type>
86 <input-model>{input-model}</input-model>
87 <underlay-topology>{underlay-topology-id}</underlay-topology>
88 <aggregate-inside>false</aggregate-inside>
90 <!-- apply filters -->
93 <input-model>{input-model}</input-model>
94 <underlay-topology>{underlay-topology-id}</underlay-topology>
95 <aggregate-inside>false</aggregate-inside>
97 <!-- apply filters -->
101 <underlay-topology>{underlay-topology-id}</underlay-topology>
108 FILTRATION_NT = '''<topology xmlns="urn:opendaylight:topology:correlation" xmlns:n="urn:TBD:params:xml:ns:yang:network-topology">
109 <n:topology-id>topo:1</n:topology-id>
111 <output-model>{output-model}</output-model>
113 <correlation-id>1</correlation-id>
114 <type>filtration-only</type>
115 <correlation-item>{correlation-item}</correlation-item>
117 <underlay-topology>{underlay-topology-id}</underlay-topology>
125 <apply-filters>{filter-id}</apply-filters>
130 <target-field-path>{target-field-path}</target-field-path>
131 <matching-key>{matching-key}</matching-key>
137 <language>{language}</language>
143 FILTER_SCRIPT = '''<filter>
144 <input-model>{input-model}</input-model>
145 <filter-id>1</filter-id>
146 <target-field>{target-field}</target-field>
147 <filter-type>script</filter-type>
150 <language>{language}</language>
159 FILTER_IPV4 = '''<filter>
160 <input-model>{input-model}</input-model>
161 <filter-id>1</filter-id>
162 <target-field>{target-field}</target-field>
163 <filter-type>ipv4-address</filter-type>
164 <ipv4-address-filter>
165 <ipv4-address>{ipv4}</ipv4-address>
166 </ipv4-address-filter>
169 FILTER_IPV6 = '''<filter>
170 <input-model>{input-model}</input-model>
171 <filter-id>1</filter-id>
172 <target-field>{target-field}</target-field>
173 <filter-type>ipv6-address</filter-type>
174 <ipv6-address-filter>
175 <ipv6-address>{ipv6}</ipv6-address>
176 </ipv6-address-filter>
179 FILTER_RANGE_NUMBER = '''<filter>
180 <input-model>{input-model}</input-model>
181 <filter-id>1</filter-id>
182 <target-field>{target-field}</target-field>
183 <filter-type>range-number</filter-type>
184 <range-number-filter>
185 <min-number-value>{min}</min-number-value>
186 <max-number-value>{max}</max-number-value>
187 </range-number-filter>
190 FILTER_RANGE_STRING = '''<filter>
191 <input-model>{input-model}</input-model>
192 <filter-id>1</filter-id>
193 <target-field>{target-field}</target-field>
194 <filter-type>range-string</filter-type>
195 <range-string-filter>
196 <min-string-value>{min}</min-string-value>
197 <max-string-value>{max}</max-string-value>
198 </range-string-filter>
201 FILTER_SPECIFIC_NUMBER = '''<filter>
202 <input-model>{input-model}</input-model>
203 <filter-id>1</filter-id>
204 <target-field>{target-field}</target-field>
205 <filter-type>specific-number</filter-type>
206 <specific-number-filter>
207 <specific-number>{number}</specific-number>
208 </specific-number-filter>
211 FILTER_SPECIFIC_STRING = '''<filter>
212 <input-model>{input-model}</input-model>
213 <filter-id>1</filter-id>
214 <target-field>{target-field}</target-field>
215 <filter-type>specific-string</filter-type>
216 <specific-string-filter>
217 <specific-string>{string}</specific-string>
218 </specific-string-filter>
221 LINK_COMPUTATION_INSIDE = '''<link-computation xmlns="urn:opendaylight:topology:link:computation" xmlns:n="urn:opendaylight:topology:correlation">
222 <output-model>{output-model}</output-model>
224 <node-topology>topo:1</node-topology>
225 <input-model>{input-model}</input-model>
228 <link-topology>{underlay-topology-id}</link-topology>
229 <input-model>{input-model}</input-model>
231 </link-computation>'''
233 LINK_COMPUTATION = '''<link-computation xmlns="urn:opendaylight:topology:link:computation" xmlns:n="urn:opendaylight:topology:correlation">
234 <output-model>{output-model}</output-model>
236 <node-topology>topo:1</node-topology>
237 <input-model>{input-model}</input-model>
240 <link-topology>{underlay-topology-1-id}</link-topology>
241 <input-model>{input-model}</input-model>
244 <link-topology>{underlay-topology-2-id}</link-topology>
245 <input-model>{input-model}</input-model>
247 </link-computation>'''