Remove code for capwap
[integration/test.git] / csit / libraries / CompareStream.robot
1 *** Settings ***
2 Documentation       This Resource contains list of Keywords Set_Variable_If_At_Least*, Set_Variable_If_At_Most,
3 ...                 Run_Keyword_If_At_Least*, Run_Keyword_If_At_Most*,
4 ...                 Run_Keyword_If_More_Than*, Run_Keyword_If_Less_Than*,
5 ...                 for comparison ${ODL_STREAM} to the given ${lower_bound},
6 ...                 in order to replace ad-hoc conditional execution in suites.
7
8 Library             Collections
9 Library             String
10
11
12 *** Variables ***
13 &{Stream_dict}
14 ...                 neon=${10}
15 ...                 sodium=${11}
16 ...                 magnesium=${12}
17 ...                 aluminium=${13}
18 ...                 silicon=${14}
19 ...                 phosphorus=${15}
20 ...                 sulfur=${16}
21 ...                 chlorine=${17}
22 ...                 argon=${18}
23 ...                 potassium=${19}
24 ...                 master=${999}
25
26
27 *** Keywords ***
28 Set_Variable_If_At_Least
29     [Documentation]    Compare ${lower_bound} to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least ${lower_bound},
30     ...    return ${value_if_false} otherwise.
31     [Arguments]    ${lower_bound}    ${value_if_true}    ${value_if_false}
32     BuiltIn.Run_Keyword_And_Return
33     ...    BuiltIn.Set_Variable_If
34     ...    ${Stream_dict}[${ODL_STREAM}] >= ${Stream_dict}[${lower_bound}]
35     ...    ${value_if_true}
36     ...    ${value_if_false}
37
38 Set_Variable_If_At_Most
39     [Documentation]    Compare ${upper_bound} to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most ${upper_bound},
40     ...    return ${value_if_false} otherwise.
41     [Arguments]    ${upper_bound}    ${value_if_true}    ${value_if_false}
42     BuiltIn.Run_Keyword_And_Return
43     ...    BuiltIn.Set_Variable_If
44     ...    ${Stream_dict}[${ODL_STREAM}] <= ${Stream_dict}[${upper_bound}]
45     ...    ${value_if_true}
46     ...    ${value_if_false}
47
48 Set_Variable_If_At_Least_Sodium
49     [Documentation]    Compare sodium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least sodium,
50     ...    return ${value_if_false} otherwise.
51     [Arguments]    ${value_if_true}    ${value_if_false}
52     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    sodium    ${value_if_true}    ${value_if_false}
53
54 Set_Variable_If_At_Least_Magnesium
55     [Documentation]    Compare magnesium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least magnesium, return ${value_if_false} otherwise.
56     [Arguments]    ${value_if_true}    ${value_if_false}
57     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    magnesium    ${value_if_true}    ${value_if_false}
58
59 Set_Variable_If_At_Least_Aluminium
60     [Documentation]    Compare aluminium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least aluminium, return ${value_if_false} otherwise.
61     [Arguments]    ${value_if_true}    ${value_if_false}
62     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    aluminium    ${value_if_true}    ${value_if_false}
63
64 Set_Variable_If_At_Least_Silicon
65     [Documentation]    Compare silicon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least silicon, return ${value_if_false} otherwise.
66     [Arguments]    ${value_if_true}    ${value_if_false}
67     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    silicon    ${value_if_true}    ${value_if_false}
68
69 Set_Variable_If_At_Least_Phosphorus
70     [Documentation]    Compare phosphorus to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least phosphorus, return ${value_if_false} otherwise.
71     [Arguments]    ${value_if_true}    ${value_if_false}
72     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    phosphorus    ${value_if_true}    ${value_if_false}
73
74 Set_Variable_If_At_Least_Sulfur
75     [Documentation]    Compare sulfur to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least sulfur, return ${value_if_false} otherwise.
76     [Arguments]    ${value_if_true}    ${value_if_false}
77     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    sulfur    ${value_if_true}    ${value_if_false}
78
79 Set_Variable_If_At_Least_Chlorine
80     [Documentation]    Compare chlorine to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least chlorine, return ${value_if_false} otherwise.
81     [Arguments]    ${value_if_true}    ${value_if_false}
82     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    chlorine    ${value_if_true}    ${value_if_false}
83
84 Set_Variable_If_At_Least_Argon
85     [Documentation]    Compare argon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least argon, return ${value_if_false} otherwise.
86     [Arguments]    ${value_if_true}    ${value_if_false}
87     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    argon    ${value_if_true}    ${value_if_false}
88
89 Set_Variable_If_At_Least_Potassium
90     [Documentation]    Compare potassium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least potassium, return ${value_if_false} otherwise.
91     [Arguments]    ${value_if_true}    ${value_if_false}
92     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Least    potassium    ${value_if_true}    ${value_if_false}
93
94 Set_Variable_If_At_Most_Neon
95     [Documentation]    Compare neon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most neon,
96     ...    return ${value_if_false} otherwise.
97     [Arguments]    ${value_if_true}    ${value_if_false}
98     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    neon    ${value_if_true}    ${value_if_false}
99
100 Set_Variable_If_At_Most_Sodium
101     [Documentation]    Compare sodium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most sodium,
102     ...    return ${value_if_false} otherwise.
103     [Arguments]    ${value_if_true}    ${value_if_false}
104     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    sodium    ${value_if_true}    ${value_if_false}
105
106 Set_Variable_If_At_Most_Magnesium
107     [Documentation]    Compare magnesium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most magnesium,
108     ...    return ${value_if_false} otherwise.
109     [Arguments]    ${value_if_true}    ${value_if_false}
110     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    magnesium    ${value_if_true}    ${value_if_false}
111
112 Set_Variable_If_At_Most_Aluminium
113     [Documentation]    Compare aluminium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most aluminium,
114     ...    return ${value_if_false} otherwise.
115     [Arguments]    ${value_if_true}    ${value_if_false}
116     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    aluminium    ${value_if_true}    ${value_if_false}
117
118 Set_Variable_If_At_Most_Silicon
119     [Documentation]    Compare silicon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most silicon,
120     ...    return ${value_if_false} otherwise.
121     [Arguments]    ${value_if_true}    ${value_if_false}
122     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    silicon    ${value_if_true}    ${value_if_false}
123
124 Set_Variable_If_At_Most_Phosphorus
125     [Documentation]    Compare phosphorus to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most phosphorus,
126     ...    return ${value_if_false} otherwise.
127     [Arguments]    ${value_if_true}    ${value_if_false}
128     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    phosphorus    ${value_if_true}    ${value_if_false}
129
130 Set_Variable_If_At_Most_Sulfur
131     [Documentation]    Compare sulfur to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most sulfur,
132     ...    return ${value_if_false} otherwise.
133     [Arguments]    ${value_if_true}    ${value_if_false}
134     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    sulfur    ${value_if_true}    ${value_if_false}
135
136 Set_Variable_If_At_Most_Chlorine
137     [Documentation]    Compare chlorine to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most chlorine,
138     ...    return ${value_if_false} otherwise.
139     [Arguments]    ${value_if_true}    ${value_if_false}
140     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    chlorine    ${value_if_true}    ${value_if_false}
141
142 Set_Variable_If_At_Most_Argon
143     [Documentation]    Compare argon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most argon,
144     ...    return ${value_if_false} otherwise.
145     [Arguments]    ${value_if_true}    ${value_if_false}
146     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    argon    ${value_if_true}    ${value_if_false}
147
148 Set_Variable_If_At_Most_Potassium
149     [Documentation]    Compare potassium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most potassium,
150     ...    return ${value_if_false} otherwise.
151     [Arguments]    ${value_if_true}    ${value_if_false}
152     BuiltIn.Run_Keyword_And_Return    Set_Variable_If_At_Most    potassium    ${value_if_true}    ${value_if_false}
153
154 CompareStream__Convert_Input
155     [Documentation]    Splits arguments into args and kwargs is used in Run_Keyword_If_At_Least_Else and Run_Keyword_If_At_Most_Else.
156     ...    The problem is, when the string contains =, but it is not a named argument (name=value). There can be many values containing =, but
157     ...    for sure it is present in xmls. If the string starts with "<" it will be treated as it is xml and splitting for
158     ...    name and value will not be executed.
159     ...    If named argument is passed into this kw, only string data are supported e.g. name=string. Complex variables such as lists or dictionaries
160     ...    are not supported.
161     [Arguments]    @{arguments}
162     ${args}    BuiltIn.Create_List
163     ${kwargs}    BuiltIn.Create_Dictionary
164     FOR    ${arg}    IN    @{arguments}
165         ${arg}    BuiltIn.Convert_To_String    ${arg}
166         ${removed}    String.Remove_String    ${arg}    \n    ${Space}    \t
167         ...    \r
168         IF    "${removed[0]}" == "<"
169             ${splitted}    BuiltIn.Create List    ${arg}
170         ELSE
171             ${splitted}    String.Split_String    ${arg}    separator==    max_split=1
172         END
173         ${len}    BuiltIn.Get_Length    ${splitted}
174         IF    ${len}==1
175             Collections.Append_To_List    ${args}    ${splitted}[0]
176         ELSE
177             Collections.Set_To_Dictionary    ${kwargs}    @{splitted}
178         END
179     END
180     RETURN    ${args}    ${kwargs}
181
182 Run_Keyword_If_At_Least
183     [Documentation]    Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at least ${lower_bound},
184     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
185     [Arguments]    ${lower_bound}    ${kw_name}    @{varargs}    &{kwargs}
186     BuiltIn.Run_Keyword_And_Return_If
187     ...    ${Stream_dict}[${ODL_STREAM}] >= ${Stream_dict}[${lower_bound}]
188     ...    ${kw_name}
189     ...    @{varargs}
190     ...    &{kwargs}
191
192 Run_Keyword_If_At_Least_Else
193     [Documentation]    Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at least ${lower_bound},
194     ...    run keyword defined before ELSE statement otherwise run keyword defined after ELSE statement and return its value.
195     [Arguments]    ${lower_bound}    @{varargs}
196     ${position}    Collections.Get_Index_From_List    ${varargs}    \ELSE
197     IF    "${position}" == "-1"
198         BuiltIn.Fail    Missing else statement in defined expresion
199     END
200     ${varargs_if}    Collections.Get_Slice_From_List    ${varargs}    0    ${position}
201     ${varargs_else}    Collections.Get_Slice_From_List    ${varargs}    ${position+1}
202     ${args_if}    ${kwargs_if}    CompareStream__Convert_Input    @{varargs_if}
203     ${args_else}    ${kwargs_else}    CompareStream__Convert_Input    @{varargs_else}
204     IF    ${Stream_dict}[${ODL_STREAM}] >= ${Stream_dict}[${lower_bound}]
205         ${resp}    BuiltIn.Run_Keyword    @{args_if}    &{kwargs_if}
206     ELSE
207         ${resp}    BuiltIn.Run_Keyword    @{args_else}    &{kwargs_else}
208     END
209     RETURN    ${resp}
210
211 Run_Keyword_If_At_Most
212     [Documentation]    Compare ${upper_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at most ${upper_bound},
213     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
214     [Arguments]    ${upper_bound}    ${kw_name}    @{varargs}    &{kwargs}
215     BuiltIn.Run_Keyword_And_Return_If
216     ...    ${Stream_dict}[${ODL_STREAM}] <= ${Stream_dict}[${upper_bound}]
217     ...    ${kw_name}
218     ...    @{varargs}
219     ...    &{kwargs}
220
221 Run_Keyword_If_At_Most_Else
222     [Documentation]    Compare ${upper_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is at most ${upper_bound},
223     ...    run keyword defined before ELSE statement otherwise run keyword defined after ELSE statement and return its value.
224     [Arguments]    ${upper_bound}    @{varargs}
225     ${position}    Collections.Get_Index_From_List    ${varargs}    \ELSE
226     IF    "${position}" == "-1"
227         BuiltIn.Fail    Missing else statement in defined expresion
228     END
229     ${varargs_if}    Collections.Get_Slice_From_List    ${varargs}    0    ${position}
230     ${varargs_else}    Collections.Get_Slice_From_List    ${varargs}    ${position+1}
231     ${args_if}    ${kwargs_if}    CompareStream__Convert_Input    @{varargs_if}
232     ${args_else}    ${kwargs_else}    CompareStream__Convert_Input    @{varargs_else}
233     IF    ${Stream_dict}[${ODL_STREAM}] <= ${Stream_dict}[${upper_bound}]
234         ${resp}    BuiltIn.Run_Keyword    @{args_if}    &{kwargs_if}
235     ELSE
236         ${resp}    BuiltIn.Run_Keyword    @{args_else}    &{kwargs_else}
237     END
238     RETURN    ${resp}
239
240 Run_Keyword_If_More_Than
241     [Documentation]    Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is more than ${lower_bound},
242     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
243     [Arguments]    ${lower_bound}    ${kw_name}    @{varargs}    &{kwargs}
244     BuiltIn.Run_Keyword_And_Return_If
245     ...    ${Stream_dict}[${ODL_STREAM}] > ${Stream_dict}[${lower_bound}]
246     ...    ${kw_name}
247     ...    @{varargs}
248     ...    &{kwargs}
249
250 Run_Keyword_If_Equals
251     [Documentation]    Compare ${stream} to ${ODL_STREAM} and in case ${ODL_STREAM} equals ${stream},
252     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
253     [Arguments]    ${stream}    ${kw_name}    @{varargs}    &{kwargs}
254     BuiltIn.Run_Keyword_And_Return_If
255     ...    ${Stream_dict}[${ODL_STREAM}] == ${Stream_dict}[${stream}]
256     ...    ${kw_name}
257     ...    @{varargs}
258     ...    &{kwargs}
259
260 Run_Keyword_If_Equals_Else
261     [Documentation]    Compare ${stream} to ${ODL_STREAM} and in case ${ODL_STREAM} equals ${stream},
262     ...    run keyword defined before ELSE statement otherwise run keyword defined after ELSE statement and return its value.
263     [Arguments]    ${stream}    @{varargs}
264     ${position}    Collections.Get_Index_From_List    ${varargs}    \ELSE
265     IF    "${position}" == "-1"
266         BuiltIn.Fail    Missing else statement in defined expresion
267     END
268     ${varargs_if}    Collections.Get_Slice_From_List    ${varargs}    0    ${position}
269     ${varargs_else}    Collections.Get_Slice_From_List    ${varargs}    ${position+1}
270     ${args_if}    ${kwargs_if}    CompareStream__Convert_Input    @{varargs_if}
271     ${args_else}    ${kwargs_else}    CompareStream__Convert_Input    @{varargs_else}
272     IF    ${Stream_dict}[${ODL_STREAM}] == ${Stream_dict}[${stream}]
273         ${resp}    BuiltIn.Run_Keyword    @{args_if}    &{kwargs_if}
274     ELSE
275         ${resp}    BuiltIn.Run_Keyword    @{args_else}    &{kwargs_else}
276     END
277     RETURN    ${resp}
278
279 Run_Keyword_If_Less_Than
280     [Documentation]    Compare ${lower_bound} to ${ODL_STREAM} and in case ${ODL_STREAM} is less than ${lower_bound},
281     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
282     [Arguments]    ${lower_bound}    ${kw_name}    @{varargs}    &{kwargs}
283     BuiltIn.Run_Keyword_And_Return_If
284     ...    ${Stream_dict}[${ODL_STREAM}] < ${Stream_dict}[${lower_bound}]
285     ...    ${kw_name}
286     ...    @{varargs}
287     ...    &{kwargs}
288
289 Run_Keyword_If_At_Least_Sodium
290     [Documentation]    Compare sodium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least sodium,
291     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
292     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
293     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    sodium    ${kw_name}    @{varargs}    &{kwargs}
294
295 Run_Keyword_If_At_Least_Magnesium
296     [Documentation]    Compare magnesium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least magnesium,
297     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
298     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
299     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    magnesium    ${kw_name}    @{varargs}    &{kwargs}
300
301 Run_Keyword_If_At_Least_Aluminium
302     [Documentation]    Compare aluminium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least aluminium,
303     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
304     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
305     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    aluminium    ${kw_name}    @{varargs}    &{kwargs}
306
307 Run_Keyword_If_At_Least_Silicon
308     [Documentation]    Compare silicon to ${ODL_STREAM} and in case ${ODL_STREAM} is at least silicon,
309     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
310     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
311     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    silicon    ${kw_name}    @{varargs}    &{kwargs}
312
313 Run_Keyword_If_At_Least_Phosphorus
314     [Documentation]    Compare phosphorus to ${ODL_STREAM} and in case ${ODL_STREAM} is at least phosphorus,
315     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
316     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
317     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    phosphorus    ${kw_name}    @{varargs}    &{kwargs}
318
319 Run_Keyword_If_At_Least_Sulfur
320     [Documentation]    Compare sulfur to ${ODL_STREAM} and in case ${ODL_STREAM} is at least sulfur,
321     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
322     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
323     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    sulfur    ${kw_name}    @{varargs}    &{kwargs}
324
325 Run_Keyword_If_At_Least_Chlorine
326     [Documentation]    Compare chlorine to ${ODL_STREAM} and in case ${ODL_STREAM} is at least chlorine,
327     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
328     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
329     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    chlorine    ${kw_name}    @{varargs}    &{kwargs}
330
331 Run_Keyword_If_At_Least_Argon
332     [Documentation]    Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is at least argon,
333     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
334     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
335     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    argon    ${kw_name}    @{varargs}    &{kwargs}
336
337 Run_Keyword_If_At_Least_Potassium
338     [Documentation]    Compare potassium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least potassium,
339     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
340     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
341     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Least    potassium    ${kw_name}    @{varargs}    &{kwargs}
342
343 Run_Keyword_If_At_Most_Neon
344     [Documentation]    Compare neon to ${ODL_STREAM} and in case ${ODL_STREAM} is at most neon,
345     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
346     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
347     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    neon    ${kw_name}    @{varargs}    &{kwargs}
348
349 Run_Keyword_If_At_Most_Sodium
350     [Documentation]    Compare sodium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most sodium,
351     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
352     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
353     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    sodium    ${kw_name}    @{varargs}    &{kwargs}
354
355 Run_Keyword_If_At_Most_Magnesium
356     [Documentation]    Compare magnesium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most magnesium,
357     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
358     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
359     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    magnesium    ${kw_name}    @{varargs}    &{kwargs}
360
361 Run_Keyword_If_At_Most_Aluminium
362     [Documentation]    Compare aluminium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most aluminium,
363     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
364     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
365     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    aluminium    ${kw_name}    @{varargs}    &{kwargs}
366
367 Run_Keyword_If_At_Most_Silicon
368     [Documentation]    Compare silicon to ${ODL_STREAM} and in case ${ODL_STREAM} is at most silicon,
369     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
370     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
371     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    silicon    ${kw_name}    @{varargs}    &{kwargs}
372
373 Run_Keyword_If_At_Most_Phosphorus
374     [Documentation]    Compare phosphorus to ${ODL_STREAM} and in case ${ODL_STREAM} is at most phosphorus,
375     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
376     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
377     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    phosphorus    ${kw_name}    @{varargs}    &{kwargs}
378
379 Run_Keyword_If_At_Most_Sulfur
380     [Documentation]    Compare sulfur to ${ODL_STREAM} and in case ${ODL_STREAM} is at most sulfur,
381     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
382     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
383     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    sulfur    ${kw_name}    @{varargs}    &{kwargs}
384
385 Run_Keyword_If_At_Most_Chlorine
386     [Documentation]    Compare chlorine to ${ODL_STREAM} and in case ${ODL_STREAM} is at most chlorine,
387     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
388     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
389     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    chlorine    ${kw_name}    @{varargs}    &{kwargs}
390
391 Run_Keyword_If_At_Most_Argon
392     [Documentation]    Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is at most argon,
393     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
394     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
395     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    argon    ${kw_name}    @{varargs}    &{kwargs}
396
397 Run_Keyword_If_At_Most_Potassium
398     [Documentation]    Compare potassium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most potassium,
399     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
400     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
401     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_At_Most    potassium    ${kw_name}    @{varargs}    &{kwargs}
402
403 Run_Keyword_If_More_Than_Neon
404     [Documentation]    Compare neon to ${ODL_STREAM} and in case ${ODL_STREAM} is more than neon,
405     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
406     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
407     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    neon    ${kw_name}    @{varargs}    &{kwargs}
408
409 Run_Keyword_If_More_Than_Sodium
410     [Documentation]    Compare sodium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than sodium,
411     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
412     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
413     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    sodium    ${kw_name}    @{varargs}    &{kwargs}
414
415 Run_Keyword_If_More_Than_Magnesium
416     [Documentation]    Compare magnesium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than magnesium,
417     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
418     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
419     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    magnesium    ${kw_name}    @{varargs}    &{kwargs}
420
421 Run_Keyword_If_More_Than_Aluminium
422     [Documentation]    Compare aluminium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than aluminium,
423     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
424     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
425     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    aluminium    ${kw_name}    @{varargs}    &{kwargs}
426
427 Run_Keyword_If_More_Than_Silicon
428     [Documentation]    Compare silicon to ${ODL_STREAM} and in case ${ODL_STREAM} is more than silicon,
429     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
430     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
431     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    silicon    ${kw_name}    @{varargs}    &{kwargs}
432
433 Run_Keyword_If_More_Than_Phosphorus
434     [Documentation]    Compare phosphorus to ${ODL_STREAM} and in case ${ODL_STREAM} is more than phosphorus,
435     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
436     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
437     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    phosphorus    ${kw_name}    @{varargs}    &{kwargs}
438
439 Run_Keyword_If_More_Than_Sulfur
440     [Documentation]    Compare sulfur to ${ODL_STREAM} and in case ${ODL_STREAM} is more than sulfur,
441     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
442     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
443     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    sulfur    ${kw_name}    @{varargs}    &{kwargs}
444
445 Run_Keyword_If_More_Than_Chlorine
446     [Documentation]    Compare chlorine to ${ODL_STREAM} and in case ${ODL_STREAM} is more than chlorine,
447     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
448     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
449     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    chlorine    ${kw_name}    @{varargs}    &{kwargs}
450
451 Run_Keyword_If_More_Than_Argon
452     [Documentation]    Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is more than argon,
453     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
454     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
455     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    argon    ${kw_name}    @{varargs}    &{kwargs}
456
457 Run_Keyword_If_More_Than_Potassium
458     [Documentation]    Compare potassium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than potassium,
459     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
460     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
461     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_More_Than    potassium    ${kw_name}    @{varargs}    &{kwargs}
462
463 Run_Keyword_If_Less_Than_Sodium
464     [Documentation]    Compare sodium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than sodium,
465     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
466     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
467     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    sodium    ${kw_name}    @{varargs}    &{kwargs}
468
469 Run_Keyword_If_Less_Than_Magnesium
470     [Documentation]    Compare magnesium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than magnesium,
471     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
472     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
473     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    magnesium    ${kw_name}    @{varargs}    &{kwargs}
474
475 Run_Keyword_If_Less_Than_Aluminium
476     [Documentation]    Compare aluminium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than aluminium,
477     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
478     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
479     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    aluminium    ${kw_name}    @{varargs}    &{kwargs}
480
481 Run_Keyword_If_Less_Than_Silicon
482     [Documentation]    Compare silicon to ${ODL_STREAM} and in case ${ODL_STREAM} is less than silicon,
483     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
484     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
485     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    silicon    ${kw_name}    @{varargs}    &{kwargs}
486
487 Run_Keyword_If_Less_Than_Phosphorus
488     [Documentation]    Compare phosphorus to ${ODL_STREAM} and in case ${ODL_STREAM} is less than phosphorus,
489     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
490     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
491     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    phosphorus    ${kw_name}    @{varargs}    &{kwargs}
492
493 Run_Keyword_If_Less_Than_Sulfur
494     [Documentation]    Compare sulfur to ${ODL_STREAM} and in case ${ODL_STREAM} is less than sulfur,
495     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
496     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
497     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    sulfur    ${kw_name}    @{varargs}    &{kwargs}
498
499 Run_Keyword_If_Less_Than_Chlorine
500     [Documentation]    Compare chlorine to ${ODL_STREAM} and in case ${ODL_STREAM} is less than chlorine,
501     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
502     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
503     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    chlorine    ${kw_name}    @{varargs}    &{kwargs}
504
505 Run_Keyword_If_Less_Than_Argon
506     [Documentation]    Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is less than argon,
507     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
508     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
509     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    argon    ${kw_name}    @{varargs}    &{kwargs}
510
511 Run_Keyword_If_Less_Than_Potassium
512     [Documentation]    Compare potassium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than potassium,
513     ...    run ${kw_name} @{varargs} &{kwargs} and return its value.
514     [Arguments]    ${kw_name}    @{varargs}    &{kwargs}
515     BuiltIn.Run_Keyword_And_Return    Run_Keyword_If_Less_Than    potassium    ${kw_name}    @{varargs}    &{kwargs}