96531d2994465935cad2c7f33b48a474906a5667
[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                                         <apply-filters>1</apply-filters>
61                                         <input-model>{input-model}</input-model>
62                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
63                                         <!-- target field -->
64                                         <aggregate-inside>true</aggregate-inside>
65                                     </mapping>
66                                 </aggregation>
67                                 <filtration>
68                                     <underlay-topology>{underlay-topology-id}</underlay-topology>
69                                 </filtration>
70                             </correlation>
71                         </correlations>
72                     </topology>'''
73
74 UNIFICATION_FILTRATION_NT = '''<topology xmlns="urn:opendaylight:topology:correlation" xmlns:n="urn:TBD:params:xml:ns:yang:network-topology">
75                         <n:topology-id>topo:1</n:topology-id>
76                         <correlations>
77                             <output-model>{output-model}</output-model>
78                             <correlation>
79                                 <correlation-id>1</correlation-id>
80                                 <type>{type}</type>
81                                 <correlation-item>{correlation-item}</correlation-item>
82                                 <aggregation>
83                                     <aggregation-type>{aggregation-type}</aggregation-type>
84                                    <mapping>
85                                         <apply-filters>1</apply-filters>
86                                         <input-model>{input-model}</input-model>
87                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
88                                         <!-- target field -->
89                                         <aggregate-inside>false</aggregate-inside>
90                                     </mapping>
91                                     <mapping>
92                                         <input-model>{input-model}</input-model>
93                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
94                                         <!-- target field -->
95                                         <aggregate-inside>false</aggregate-inside>
96                                     </mapping>
97                                 </aggregation>
98                                 <filtration>
99                                     <underlay-topology>{underlay-topology-id}</underlay-topology>
100                                 </filtration>
101                             </correlation>
102                         </correlations>
103                     </topology>'''
104
105 FILTRATION_NT = '''<topology xmlns="urn:opendaylight:topology:correlation" xmlns:n="urn:TBD:params:xml:ns:yang:network-topology">
106                     <n:topology-id>topo:1</n:topology-id>
107                     <correlations>
108                         <output-model>{output-model}</output-model>
109                         <correlation>
110                             <correlation-id>1</correlation-id>
111                             <type>filtration-only</type>
112                             <correlation-item>{correlation-item}</correlation-item>
113                             <filtration>
114                                 <underlay-topology>{underlay-topology-id}</underlay-topology>
115                                 <!-- Filter -->
116                             </filtration>
117                         </correlation>
118                     </correlations>
119                 </topology>'''
120
121 TARGET_FIELD = '''
122 <target-field>
123     <target-field-path>{target-field-path}</target-field-path>
124     <matching-key>{matching-key}</matching-key>
125 </target-field>
126 '''
127
128 SCRIPTING = '''
129 <scripting>
130     <language>{language}</language>
131     <script>
132         {script}
133     </script>
134 </scripting>
135 '''
136 FILTER_SCRIPT = '''<filter>
137                         <input-model>{input-model}</input-model>
138                         <filter-id>1</filter-id>
139                         <target-field>{target-field}</target-field>
140                         <filter-type>script</filter-type>
141                         <script-filter>
142                             <scripting>
143                                 <language>{language}</language>
144                                 <script>
145                                   {script}
146                                 </script>
147                             </scripting>
148                         </script-filter>
149                  </filter>'''
150
151
152 FILTER_IPV4 = '''<filter>
153                         <input-model>{input-model}</input-model>
154                         <filter-id>1</filter-id>
155                         <target-field>{target-field}</target-field>
156                         <filter-type>ipv4-address</filter-type>
157                         <ipv4-address-filter>
158                              <ipv4-address>{ipv4}</ipv4-address>
159                         </ipv4-address-filter>
160                  </filter>'''
161
162 FILTER_IPV6 = '''<filter>
163                         <input-model>{input-model}</input-model>
164                         <filter-id>1</filter-id>
165                         <target-field>{target-field}</target-field>
166                         <filter-type>ipv6-address</filter-type>
167                         <ipv6-address-filter>
168                              <ipv6-address>{ipv6}</ipv6-address>
169                         </ipv6-address-filter>
170                  </filter>'''
171
172 FILTER_RANGE_NUMBER = '''<filter>
173                         <input-model>{input-model}</input-model>
174                         <filter-id>1</filter-id>
175                         <target-field>{target-field}</target-field>
176                         <filter-type>range-number</filter-type>
177                         <range-number-filter>
178                              <min-number-value>{min}</min-number-value>
179                              <max-number-value>{max}</max-number-value>
180                         </range-number-filter>
181                  </filter>'''
182
183 FILTER_RANGE_STRING = '''<filter>
184                         <input-model>{input-model}</input-model>
185                         <filter-id>1</filter-id>
186                         <target-field>{target-field}</target-field>
187                         <filter-type>range-string</filter-type>
188                         <range-string-filter>
189                              <min-string-value>{min}</min-string-value>
190                              <max-string-value>{max}</max-string-value>
191                         </range-string-filter>
192                  </filter>'''
193
194 FILTER_SPECIFIC_NUMBER = '''<filter>
195                         <input-model>{input-model}</input-model>
196                         <filter-id>1</filter-id>
197                         <target-field>{target-field}</target-field>
198                         <filter-type>specific-number</filter-type>
199                         <specific-number-filter>
200                              <specific-number>{number}</specific-number>
201                         </specific-number-filter>
202                  </filter>'''
203
204 FILTER_SPECIFIC_STRING = '''<filter>
205                         <input-model>{input-model}</input-model>
206                         <filter-id>1</filter-id>
207                         <target-field>{target-field}</target-field>
208                         <filter-type>specific-string</filter-type>
209                         <specific-string-filter>
210                              <specific-string>{string}</specific-string>
211                         </specific-string-filter>
212                  </filter>'''
213
214 LINK_COMPUTATION_INSIDE = '''<link-computation xmlns="urn:opendaylight:topology:link:computation" xmlns:n="urn:opendaylight:topology:correlation">
215             <output-model>{output-model}</output-model>
216             <node-info>
217                 <node-topology>topo:1</node-topology>
218                 <input-model>{input-model}</input-model>
219             </node-info>
220             <link-info>
221                 <link-topology>{underlay-topology-id}</link-topology>
222                 <input-model>{input-model}</input-model>
223             </link-info>
224         </link-computation>'''
225
226 LINK_COMPUTATION = '''<link-computation xmlns="urn:opendaylight:topology:link:computation" xmlns:n="urn:opendaylight:topology:correlation">
227             <output-model>{output-model}</output-model>
228             <node-info>
229                 <node-topology>topo:1</node-topology>
230                 <input-model>{input-model}</input-model>
231             </node-info>
232             <link-info>
233                 <link-topology>{underlay-topology-1-id}</link-topology>
234                 <input-model>{input-model}</input-model>
235             </link-info>
236             <link-info>
237                 <link-topology>{underlay-topology-2-id}</link-topology>
238                 <input-model>{input-model}</input-model>
239             </link-info>
240         </link-computation>'''