From 67b5bd0889a824307e05b929d57d8910d6f791fc Mon Sep 17 00:00:00 2001 From: Sangwook Ha Date: Thu, 22 Jun 2023 00:05:11 -0700 Subject: [PATCH] Add potassium stream keywords Add new stream keywords to support potassium, current development stream. Also, add BGPCEP test variable files for potassium. Change-Id: Ie1db896a120cb899724f47d63d125e06fe4f781a Signed-off-by: Sangwook Ha --- csit/libraries/CompareStream.robot | 36 ++++++++++++++++++++++++++ csit/variables/bgpclustering/potassium | 1 + csit/variables/pcepuser/potassium | 1 + csit/variables/tcpmd5user/argon | 2 +- csit/variables/tcpmd5user/potassium | 1 + 5 files changed, 40 insertions(+), 1 deletion(-) create mode 120000 csit/variables/bgpclustering/potassium create mode 120000 csit/variables/pcepuser/potassium create mode 120000 csit/variables/tcpmd5user/potassium diff --git a/csit/libraries/CompareStream.robot b/csit/libraries/CompareStream.robot index bcb10bb13a..af8437c442 100644 --- a/csit/libraries/CompareStream.robot +++ b/csit/libraries/CompareStream.robot @@ -20,6 +20,7 @@ Library String ... sulfur=${16} ... chlorine=${17} ... argon=${18} +... potassium=${19} ... master=${999} @@ -85,6 +86,11 @@ Set_Variable_If_At_Least_Argon [Arguments] ${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_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_Least potassium ${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, ... return ${value_if_false} otherwise. @@ -139,6 +145,12 @@ Set_Variable_If_At_Most_Argon [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} + 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 @@ -322,6 +334,12 @@ Run_Keyword_If_At_Least_Argon [Arguments] ${kw_name} @{varargs} &{kwargs} BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least argon ${kw_name} @{varargs} &{kwargs} +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_Least potassium ${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, ... run ${kw_name} @{varargs} &{kwargs} and return its value. @@ -376,6 +394,12 @@ Run_Keyword_If_At_Most_Argon [Arguments] ${kw_name} @{varargs} &{kwargs} BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most argon ${kw_name} @{varargs} &{kwargs} +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_At_Most potassium ${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, ... run ${kw_name} @{varargs} &{kwargs} and return its value. @@ -430,6 +454,12 @@ Run_Keyword_If_More_Than_Argon [Arguments] ${kw_name} @{varargs} &{kwargs} BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than argon ${kw_name} @{varargs} &{kwargs} +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_More_Than potassium ${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, ... run ${kw_name} @{varargs} &{kwargs} and return its value. @@ -477,3 +507,9 @@ Run_Keyword_If_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} diff --git a/csit/variables/bgpclustering/potassium b/csit/variables/bgpclustering/potassium new file mode 120000 index 0000000000..121ca56cfd --- /dev/null +++ b/csit/variables/bgpclustering/potassium @@ -0,0 +1 @@ +aluminium \ No newline at end of file diff --git a/csit/variables/pcepuser/potassium b/csit/variables/pcepuser/potassium new file mode 120000 index 0000000000..437071b6d3 --- /dev/null +++ b/csit/variables/pcepuser/potassium @@ -0,0 +1 @@ +chlorine \ No newline at end of file diff --git a/csit/variables/tcpmd5user/argon b/csit/variables/tcpmd5user/argon index 121ca56cfd..437071b6d3 120000 --- a/csit/variables/tcpmd5user/argon +++ b/csit/variables/tcpmd5user/argon @@ -1 +1 @@ -aluminium \ No newline at end of file +chlorine \ No newline at end of file diff --git a/csit/variables/tcpmd5user/potassium b/csit/variables/tcpmd5user/potassium new file mode 120000 index 0000000000..437071b6d3 --- /dev/null +++ b/csit/variables/tcpmd5user/potassium @@ -0,0 +1 @@ +chlorine \ No newline at end of file -- 2.36.6