Topoprocessing - tests correction
[integration/test.git] / csit / variables / topoprocessing / TopologyRequests.py
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>
3                         <correlations>
4                             <output-model>{output-model}</output-model>
5                             <correlation>
6                                 <correlation-id>1</correlation-id>
7                                 <type>{type}</type>
8                                 <correlation-item>{correlation-item}</correlation-item>
9                                 <aggregation>
10                                     <aggregation-type>{aggregation-type}</aggregation-type>
11                                     <mapping>
12                                         <input-model>{input-model}</input-model>
13                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
14                                         <!-- target field -->
15                                         <aggregate-inside>false</aggregate-inside>
16                                     </mapping>
17                                     <mapping>
18                                         <input-model>{input-model}</input-model>
19                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
20                                         <!-- target field -->
21                                         <aggregate-inside>false</aggregate-inside>
22                                     </mapping>
23                                 </aggregation>
24                             </correlation>
25                         </correlations>
26                     </topology>'''
27
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>
30                         <correlations>
31                             <output-model>{output-model}</output-model>
32                             <correlation>
33                                 <correlation-id>1</correlation-id>
34                                 <type>{type}</type>
35                                 <correlation-item>{correlation-item}</correlation-item>
36                                 <aggregation>
37                                     <aggregation-type>{aggregation-type}</aggregation-type>
38                                     <mapping>
39                                         <input-model>{input-model}</input-model>
40                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
41                                         <!-- target field -->
42                                         <aggregate-inside>true</aggregate-inside>
43                                     </mapping>
44                                 </aggregation>
45                             </correlation>
46                         </correlations>
47                     </topology>'''
48
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>
51                         <correlations>
52                             <output-model>{output-model}</output-model>
53                             <correlation>
54                                 <correlation-id>1</correlation-id>
55                                 <type>{type}</type>
56                                 <correlation-item>{correlation-item}</correlation-item>
57                                 <aggregation>
58                                     <aggregation-type>{aggregation-type}</aggregation-type>
59                                     <mapping>
60                                         <input-model>{input-model}</input-model>
61                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
62                                         <aggregate-inside>true</aggregate-inside>
63                                         <!-- target field -->
64                                         <!-- apply filters -->
65                                     </mapping>
66                                 </aggregation>
67                                 <filtration>
68                                     <underlay-topology>{underlay-topology-id}</underlay-topology>
69                                     <!-- Filter -->
70                                 </filtration>
71                             </correlation>
72                         </correlations>
73                     </topology>'''
74
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>
77                         <correlations>
78                             <output-model>{output-model}</output-model>
79                             <correlation>
80                                 <correlation-id>1</correlation-id>
81                                 <type>{type}</type>
82                                 <correlation-item>{correlation-item}</correlation-item>
83                                 <aggregation>
84                                     <aggregation-type>{aggregation-type}</aggregation-type>
85                                     <mapping>
86                                         <input-model>{input-model}</input-model>
87                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
88                                         <aggregate-inside>false</aggregate-inside>
89                                         <!-- target field -->
90                                         <!-- apply filters -->
91                                     </mapping>
92                                     <mapping>
93                                         <input-model>{input-model}</input-model>
94                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
95                                         <aggregate-inside>false</aggregate-inside>
96                                         <!-- target field -->
97                                         <!-- apply filters -->
98                                     </mapping>
99                                 </aggregation>
100                                 <filtration>
101                                     <underlay-topology>{underlay-topology-id}</underlay-topology>
102                                     <!-- Filter -->
103                                 </filtration>
104                             </correlation>
105                         </correlations>
106                     </topology>'''
107
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>
110                     <correlations>
111                         <output-model>{output-model}</output-model>
112                         <correlation>
113                             <correlation-id>1</correlation-id>
114                             <type>filtration-only</type>
115                             <correlation-item>{correlation-item}</correlation-item>
116                             <filtration>
117                                 <underlay-topology>{underlay-topology-id}</underlay-topology>
118                                 <!-- Filter -->
119                             </filtration>
120                         </correlation>
121                     </correlations>
122                 </topology>'''
123
124 APPLY_FILTERS = '''
125 <apply-filters>{filter-id}</apply-filters>
126 '''
127
128 TARGET_FIELD = '''
129 <target-field>
130     <target-field-path>{target-field-path}</target-field-path>
131     <matching-key>{matching-key}</matching-key>
132 </target-field>
133 '''
134
135 SCRIPTING = '''
136 <scripting>
137     <language>{language}</language>
138     <script>
139         {script}
140     </script>
141 </scripting>
142 '''
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>
148                         <script-filter>
149                             <scripting>
150                                 <language>{language}</language>
151                                 <script>
152                                   {script}
153                                 </script>
154                             </scripting>
155                         </script-filter>
156                  </filter>'''
157
158
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>
167                  </filter>'''
168
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>
177                  </filter>'''
178
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>
188                  </filter>'''
189
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>
199                  </filter>'''
200
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>
209                  </filter>'''
210
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>
219                  </filter>'''
220
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>
223             <node-info>
224                 <node-topology>topo:1</node-topology>
225                 <input-model>{input-model}</input-model>
226             </node-info>
227             <link-info>
228                 <link-topology>{underlay-topology-id}</link-topology>
229                 <input-model>{input-model}</input-model>
230             </link-info>
231         </link-computation>'''
232
233 LINK_COMPUTATION = '''<link-computation xmlns="urn:opendaylight:topology:link:computation" xmlns:n="urn:opendaylight:topology:correlation">
234             <output-model>{output-model}</output-model>
235             <node-info>
236                 <node-topology>topo:1</node-topology>
237                 <input-model>{input-model}</input-model>
238             </node-info>
239             <link-info>
240                 <link-topology>{underlay-topology-1-id}</link-topology>
241                 <input-model>{input-model}</input-model>
242             </link-info>
243             <link-info>
244                 <link-topology>{underlay-topology-2-id}</link-topology>
245                 <input-model>{input-model}</input-model>
246             </link-info>
247         </link-computation>'''