X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FCompareStream.robot;h=a248b20f2672e0af748d3016572a60f23cbbd5e6;hb=a2f6aa23e240c9a70eef3d44b76c42147acbb2ca;hp=deccc6ee6a138654f38c8bd20546ac9a2b3bdeef;hpb=c6a7772a471f6f8c822bf0ea3eb95fefd5754830;p=integration%2Ftest.git diff --git a/csit/libraries/CompareStream.robot b/csit/libraries/CompareStream.robot index deccc6ee6a..a248b20f26 100644 --- a/csit/libraries/CompareStream.robot +++ b/csit/libraries/CompareStream.robot @@ -11,9 +11,6 @@ Library String *** Variables *** &{Stream_dict} -... nitrogen=${7} -... oxygen=${8} -... fluorine=${9} ... neon=${10} ... sodium=${11} ... magnesium=${12} @@ -23,6 +20,8 @@ Library String ... sulfur=${16} ... chlorine=${17} ... argon=${18} +... potassium=${19} +... calcium=${20} ... master=${999} @@ -47,26 +46,8 @@ Set_Variable_If_At_Most ... ${value_if_true} ... ${value_if_false} -Set_Variable_If_At_Least_Oxygen - [Documentation] Compare oxygen to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least oxygen, - ... return ${value_if_false} otherwise. - [Arguments] ${value_if_true} ${value_if_false} - BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least oxygen ${value_if_true} ${value_if_false} - -Set_Variable_If_At_Least_Fluorine - [Documentation] Compare fluorine to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least fluorine, - ... return ${value_if_false} otherwise. - [Arguments] ${value_if_true} ${value_if_false} - BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least fluorine ${value_if_true} ${value_if_false} - -Set_Variable_If_At_Least_Neon - [Documentation] Compare neon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least neon, - ... return ${value_if_false} otherwise. - [Arguments] ${value_if_true} ${value_if_false} - BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least neon ${value_if_true} ${value_if_false} - Set_Variable_If_At_Least_Sodium - [Documentation] Compare neon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least sodium, + [Documentation] Compare sodium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least sodium, ... return ${value_if_false} otherwise. [Arguments] ${value_if_true} ${value_if_false} BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least sodium ${value_if_true} ${value_if_false} @@ -101,23 +82,20 @@ Set_Variable_If_At_Least_Chlorine [Arguments] ${value_if_true} ${value_if_false} BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least chlorine ${value_if_true} ${value_if_false} -Set_Variable_If_At_Most_Nitrogen - [Documentation] Compare nitrogen to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most nitrogen, - ... return ${value_if_false} otherwise. +Set_Variable_If_At_Least_Argon + [Documentation] Compare argon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least argon, return ${value_if_false} otherwise. [Arguments] ${value_if_true} ${value_if_false} - BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most nitrogen ${value_if_true} ${value_if_false} + BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least argon ${value_if_true} ${value_if_false} -Set_Variable_If_At_Most_Oxygen - [Documentation] Compare oxygen to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most oxygen, - ... return ${value_if_false} otherwise. +Set_Variable_If_At_Least_Potassium + [Documentation] Compare potassium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least potassium, return ${value_if_false} otherwise. [Arguments] ${value_if_true} ${value_if_false} - BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most oxygen ${value_if_true} ${value_if_false} + BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least potassium ${value_if_true} ${value_if_false} -Set_Variable_If_At_Most_Fluorine - [Documentation] Compare fluorine to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most fluorine, - ... return ${value_if_false} otherwise. +Set_Variable_If_At_Least_Calcium + [Documentation] Compare calcium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least calcium, return ${value_if_false} otherwise. [Arguments] ${value_if_true} ${value_if_false} - BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most fluorine ${value_if_true} ${value_if_false} + BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least calcium ${value_if_true} ${value_if_false} Set_Variable_If_At_Most_Neon [Documentation] Compare neon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most neon, @@ -126,7 +104,7 @@ Set_Variable_If_At_Most_Neon BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most neon ${value_if_true} ${value_if_false} Set_Variable_If_At_Most_Sodium - [Documentation] Compare neon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most sodium, + [Documentation] Compare sodium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most sodium, ... return ${value_if_false} otherwise. [Arguments] ${value_if_true} ${value_if_false} BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most sodium ${value_if_true} ${value_if_false} @@ -167,6 +145,24 @@ Set_Variable_If_At_Most_Chlorine [Arguments] ${value_if_true} ${value_if_false} BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most chlorine ${value_if_true} ${value_if_false} +Set_Variable_If_At_Most_Argon + [Documentation] Compare argon to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most argon, + ... return ${value_if_false} otherwise. + [Arguments] ${value_if_true} ${value_if_false} + BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most argon ${value_if_true} ${value_if_false} + +Set_Variable_If_At_Most_Potassium + [Documentation] Compare potassium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most potassium, + ... return ${value_if_false} otherwise. + [Arguments] ${value_if_true} ${value_if_false} + BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most potassium ${value_if_true} ${value_if_false} + +Set_Variable_If_At_Most_Calcium + [Documentation] Compare calcium to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most calcium, + ... return ${value_if_false} otherwise. + [Arguments] ${value_if_true} ${value_if_false} + BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most calcium ${value_if_true} ${value_if_false} + CompareStream__Convert_Input [Documentation] Splits arguments into args and kwargs is used in Run_Keyword_If_At_Least_Else and Run_Keyword_If_At_Most_Else. ... The problem is, when the string contains =, but it is not a named argument (name=value). There can be many values containing =, but @@ -302,24 +298,6 @@ Run_Keyword_If_Less_Than ... @{varargs} ... &{kwargs} -Run_Keyword_If_At_Least_Oxygen - [Documentation] Compare oxygen to ${ODL_STREAM} and in case ${ODL_STREAM} is at least oxygen, - ... run ${kw_name} @{varargs} &{kwargs} and return its value. - [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least oxygen ${kw_name} @{varargs} &{kwargs} - -Run_Keyword_If_At_Least_Fluorine - [Documentation] Compare fluorine to ${ODL_STREAM} and in case ${ODL_STREAM} is at least fluorine, - ... run ${kw_name} @{varargs} &{kwargs} and return its value. - [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least fluorine ${kw_name} @{varargs} &{kwargs} - -Run_Keyword_If_At_Least_Neon - [Documentation] Compare neon to ${ODL_STREAM} and in case ${ODL_STREAM} is at least neon, - ... run ${kw_name} @{varargs} &{kwargs} and return its value. - [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least neon ${kw_name} @{varargs} &{kwargs} - Run_Keyword_If_At_Least_Sodium [Documentation] Compare sodium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least sodium, ... run ${kw_name} @{varargs} &{kwargs} and return its value. @@ -362,23 +340,23 @@ Run_Keyword_If_At_Least_Chlorine [Arguments] ${kw_name} @{varargs} &{kwargs} BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least chlorine ${kw_name} @{varargs} &{kwargs} -Run_Keyword_If_At_Most_Nitrogen - [Documentation] Compare nitrogen to ${ODL_STREAM} and in case ${ODL_STREAM} is at most nitrogen, +Run_Keyword_If_At_Least_Argon + [Documentation] Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is at least argon, ... run ${kw_name} @{varargs} &{kwargs} and return its value. [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most nitrogen ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least argon ${kw_name} @{varargs} &{kwargs} -Run_Keyword_If_At_Most_Oxygen - [Documentation] Compare oxygen to ${ODL_STREAM} and in case ${ODL_STREAM} is at most oxygen, +Run_Keyword_If_At_Least_Potassium + [Documentation] Compare potassium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least potassium, ... run ${kw_name} @{varargs} &{kwargs} and return its value. [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most oxygen ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least potassium ${kw_name} @{varargs} &{kwargs} -Run_Keyword_If_At_Most_Fluorine - [Documentation] Compare fluorine to ${ODL_STREAM} and in case ${ODL_STREAM} is at most fluroine, +Run_Keyword_If_At_Least_Calcium + [Documentation] Compare calcium to ${ODL_STREAM} and in case ${ODL_STREAM} is at least calcium, ... run ${kw_name} @{varargs} &{kwargs} and return its value. [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most fluorine ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least calcium ${kw_name} @{varargs} &{kwargs} Run_Keyword_If_At_Most_Neon [Documentation] Compare neon to ${ODL_STREAM} and in case ${ODL_STREAM} is at most neon, @@ -428,23 +406,23 @@ Run_Keyword_If_At_Most_Chlorine [Arguments] ${kw_name} @{varargs} &{kwargs} BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most chlorine ${kw_name} @{varargs} &{kwargs} -Run_Keyword_If_More_Than_Nitrogen - [Documentation] Compare nitrogen to ${ODL_STREAM} and in case ${ODL_STREAM} is more than nitrogen, +Run_Keyword_If_At_Most_Argon + [Documentation] Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is at most argon, ... run ${kw_name} @{varargs} &{kwargs} and return its value. [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than nitrogen ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most argon ${kw_name} @{varargs} &{kwargs} -Run_Keyword_If_More_Than_Oxygen - [Documentation] Compare oxygen to ${ODL_STREAM} and in case ${ODL_STREAM} is more than oxygen, +Run_Keyword_If_At_Most_Potassium + [Documentation] Compare potassium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most potassium, ... run ${kw_name} @{varargs} &{kwargs} and return its value. [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than oxygen ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most potassium ${kw_name} @{varargs} &{kwargs} -Run_Keyword_If_More_Than_Fluorine - [Documentation] Compare fluorine to ${ODL_STREAM} and in case ${ODL_STREAM} is more than fluorine, +Run_Keyword_If_At_Most_Calcium + [Documentation] Compare calcium to ${ODL_STREAM} and in case ${ODL_STREAM} is at most calcium, ... run ${kw_name} @{varargs} &{kwargs} and return its value. [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than fluorine ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most calcium ${kw_name} @{varargs} &{kwargs} Run_Keyword_If_More_Than_Neon [Documentation] Compare neon to ${ODL_STREAM} and in case ${ODL_STREAM} is more than neon, @@ -494,29 +472,23 @@ Run_Keyword_If_More_Than_Chlorine [Arguments] ${kw_name} @{varargs} &{kwargs} BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than chlorine ${kw_name} @{varargs} &{kwargs} -Run_Keyword_If_Less_Than_Nitrogen - [Documentation] Compare nitrogen to ${ODL_STREAM} and in case ${ODL_STREAM} is less than nitrogen, +Run_Keyword_If_More_Than_Argon + [Documentation] Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is more than argon, ... run ${kw_name} @{varargs} &{kwargs} and return its value. [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than nitrogen ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than argon ${kw_name} @{varargs} &{kwargs} -Run_Keyword_If_Less_Than_Oxygen - [Documentation] Compare oxygen to ${ODL_STREAM} and in case ${ODL_STREAM} is less than oxygen, +Run_Keyword_If_More_Than_Potassium + [Documentation] Compare potassium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than potassium, ... run ${kw_name} @{varargs} &{kwargs} and return its value. [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than oxygen ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than potassium ${kw_name} @{varargs} &{kwargs} -Run_Keyword_If_Less_Than_Fluorine - [Documentation] Compare fluorine to ${ODL_STREAM} and in case ${ODL_STREAM} is less than fluorine, +Run_Keyword_If_More_Than_Calcium + [Documentation] Compare calcium to ${ODL_STREAM} and in case ${ODL_STREAM} is more than calcium, ... run ${kw_name} @{varargs} &{kwargs} and return its value. [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than fluorine ${kw_name} @{varargs} &{kwargs} - -Run_Keyword_If_Less_Than_Neon - [Documentation] Compare neon to ${ODL_STREAM} and in case ${ODL_STREAM} is less than neon, - ... run ${kw_name} @{varargs} &{kwargs} and return its value. - [Arguments] ${kw_name} @{varargs} &{kwargs} - BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than neon ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than calcium ${kw_name} @{varargs} &{kwargs} Run_Keyword_If_Less_Than_Sodium [Documentation] Compare sodium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than sodium, @@ -559,3 +531,21 @@ Run_Keyword_If_Less_Than_Chlorine ... run ${kw_name} @{varargs} &{kwargs} and return its value. [Arguments] ${kw_name} @{varargs} &{kwargs} BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than chlorine ${kw_name} @{varargs} &{kwargs} + +Run_Keyword_If_Less_Than_Argon + [Documentation] Compare argon to ${ODL_STREAM} and in case ${ODL_STREAM} is less than argon, + ... run ${kw_name} @{varargs} &{kwargs} and return its value. + [Arguments] ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than argon ${kw_name} @{varargs} &{kwargs} + +Run_Keyword_If_Less_Than_Potassium + [Documentation] Compare potassium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than potassium, + ... run ${kw_name} @{varargs} &{kwargs} and return its value. + [Arguments] ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than potassium ${kw_name} @{varargs} &{kwargs} + +Run_Keyword_If_Less_Than_Calcium + [Documentation] Compare calcium to ${ODL_STREAM} and in case ${ODL_STREAM} is less than calcium, + ... run ${kw_name} @{varargs} &{kwargs} and return its value. + [Arguments] ${kw_name} @{varargs} &{kwargs} + BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than calcium ${kw_name} @{varargs} &{kwargs}