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