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