From f795bf114ce2586061e284ebbaac1510f1da816b Mon Sep 17 00:00:00 2001 From: Jozef Behran Date: Fri, 26 Feb 2016 11:38:26 +0100 Subject: [PATCH] Fix variable naming for some immutable variables A bunch of immutable but not user configurable variables now need to use snake_case instead of ALL_CAPS due to new variable naming guidelines [1]. [1] https://wiki.opendaylight.org/view/Integration/Test/Test_Code_Guidelines#Variable_naming Change-Id: I45f4e3c684c2b2f1905a9ad91afe2cf2fbbb6569 Signed-off-by: Jozef Behran --- csit/suites/netconf/CRUD/CRUD.robot | 18 ++++----- csit/suites/netconf/clustering/CRUD.robot | 38 +++++++++---------- .../netconf/restperfclient/performance.robot | 5 +-- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/csit/suites/netconf/CRUD/CRUD.robot b/csit/suites/netconf/CRUD/CRUD.robot index 1c8fb137a6..5a9b851567 100644 --- a/csit/suites/netconf/CRUD/CRUD.robot +++ b/csit/suites/netconf/CRUD/CRUD.robot @@ -33,7 +33,7 @@ Resource ${CURDIR}/../../../libraries/Utils.robot Variables ${CURDIR}/../../../variables/Variables.py *** Variables *** -${DIRECTORY_WITH_TEMPLATE_FOLDERS} ${CURDIR}/../../../variables/netconf/CRUD +${directory_with_template_folders} ${CURDIR}/../../../variables/netconf/CRUD ${device_name} netconf-test-device *** Test Cases *** @@ -68,7 +68,7 @@ Check_Device_Data_Is_Empty Create_Device_Data_Label_Via_Xml [Documentation] Send a sample test data label into the device and check that the request went OK. ${template_as_string}= BuiltIn.Set_Variable {'DEVICE_NAME': '${device_name}'} - NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}dataorig ${template_as_string} + NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf ${directory_with_template_folders}${/}dataorig ${template_as_string} Check_Device_Data_Label_Is_Created [Documentation] Get the device data label and make sure it contains the created content. @@ -77,7 +77,7 @@ Check_Device_Data_Label_Is_Created Modify_Device_Data_Label_Via_Xml [Documentation] Send a request to change the sample test data label and check that the request went OK. ${template_as_string}= BuiltIn.Set_Variable {'DEVICE_NAME': '${device_name}'} - NetconfViaRestconf.Put_Xml_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}datamod1 ${template_as_string} + NetconfViaRestconf.Put_Xml_Template_Folder_Via_Restconf ${directory_with_template_folders}${/}datamod1 ${template_as_string} Check_Device_Data_Label_Is_Modified [Documentation] Get the device data label and make sure it contains the modified content. @@ -86,7 +86,7 @@ Check_Device_Data_Label_Is_Modified Modify_Device_Data_Label_Via_Json [Documentation] Send a JSON request to change the sample test data label and check that the request went OK. ${template_as_string}= BuiltIn.Set_Variable {'DEVICE_NAME': '${device_name}'} - NetconfViaRestconf.Put_Json_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}datamodjson ${template_as_string} + NetconfViaRestconf.Put_Json_Template_Folder_Via_Restconf ${directory_with_template_folders}${/}datamodjson ${template_as_string} Check_Device_Data_Label_Is_Modified_Via_Json [Documentation] Get the device data label as XML and make sure it matches the content posted as JSON in the previous case. @@ -95,7 +95,7 @@ Check_Device_Data_Label_Is_Modified_Via_Json Create_Car_List [Documentation] Send a request to create a list of cars in the sample test data label and check that the request went OK. ${template_as_string}= BuiltIn.Set_Variable {'DEVICE_NAME': '${device_name}'} - NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}cars ${template_as_string} + NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf ${directory_with_template_folders}${/}cars ${template_as_string} Check_Car_List_Created [Documentation] Get the device data label as XML and make sure it matches the content posted as JSON in the previous case. @@ -115,7 +115,7 @@ Check_Car_List_Created Add_Device_Data_Item_1_Via_XML_Post [Documentation] Send a request to create a data item in the test list and check that the request went OK. ${template_as_string}= BuiltIn.Set_Variable {'DEVICE_NAME': '${device_name}'} - NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}item1 ${template_as_string} + NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf ${directory_with_template_folders}${/}item1 ${template_as_string} Check_Item1_Is_Created [Documentation] Get the device data as XML and make sure it matches the content posted as JSON in the previous case. @@ -134,7 +134,7 @@ Check_Item1_Is_Created Add_Device_Data_Item_2_Via_JSON_Post [Documentation] Send a JSON request to change the sample test data and check that the request went OK. ${template_as_string}= BuiltIn.Set_Variable {'DEVICE_NAME': '${device_name}'} - NetconfViaRestconf.Post_Json_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}item2 ${template_as_string} + NetconfViaRestconf.Post_Json_Template_Folder_Via_Restconf ${directory_with_template_folders}${/}item2 ${template_as_string} Check_Item2_Is_Created [Documentation] Get the device data as XML and make sure it matches the content posted as JSON in the previous case. @@ -153,8 +153,8 @@ Check_Item2_Is_Created Delete_Device_Data [Documentation] Send a request to delete the sample test data on the device and check that the request went OK. ${template_as_string}= BuiltIn.Set_Variable {'DEVICE_NAME': '${device_name}'} - NetconfViaRestconf.Delete_Xml_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}datamod1 ${template_as_string} - NetconfViaRestconf.Delete_Xml_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}item1 ${template_as_string} + NetconfViaRestconf.Delete_Xml_Template_Folder_Via_Restconf ${directory_with_template_folders}${/}datamod1 ${template_as_string} + NetconfViaRestconf.Delete_Xml_Template_Folder_Via_Restconf ${directory_with_template_folders}${/}item1 ${template_as_string} Check_Device_Data_Is_Deleted [Documentation] Get the device data and make sure it is empty again. diff --git a/csit/suites/netconf/clustering/CRUD.robot b/csit/suites/netconf/clustering/CRUD.robot index f29e6f2f84..347ff48538 100644 --- a/csit/suites/netconf/clustering/CRUD.robot +++ b/csit/suites/netconf/clustering/CRUD.robot @@ -53,11 +53,11 @@ ${NODE_CONFIGURER} node1 ${NODE_SETTER} node2 ${NODE_CHECKER} node3 ${DEVICE_CHECK_TIMEOUT} 60s -${DIRECTORY_WITH_TEMPLATE_FOLDERS} ${CURDIR}/../../../variables/netconf/CRUD ${DEVICE_NAME} netconf-test-device -${EMPTY_DATA} -${ORIGINAL_DATA} Content -${MODIFIED_DATA} Modified Content +${directory_with_template_folders} ${CURDIR}/../../../variables/netconf/CRUD +${empty_data} +${original_data} Content +${modified_data} Modified Content *** Test Cases *** Start_Testtool @@ -100,76 +100,76 @@ Wait_For_Device_To_Become_Visible_For_Setter Check_Device_Data_Is_Seen_As_Empty_On_Configurer [Documentation] Get the device data as seen by configurer and make sure it is empty. - BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_CONFIGURER} ${EMPTY_DATA} + BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_CONFIGURER} ${empty_data} Check_Device_Data_Is_Seen_As_Empty_On_Checker [Documentation] Get the device data as seen by checker and make sure it is empty. - BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_CHECKER} ${EMPTY_DATA} + BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_CHECKER} ${empty_data} Check_Device_Data_Is_Seen_As_Empty_On_Setter [Documentation] Get the device data as seen by setter and make sure it is empty. - BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_SETTER} ${EMPTY_DATA} + BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_SETTER} ${empty_data} Create_Device_Data [Documentation] Send some sample test data into the device and check that the request went OK. NetconfViaRestconf.Activate_NVR_Session ${NODE_SETTER} ${template_as_string}= BuiltIn.Set_Variable {'DEVICE_NAME': '${DEVICE_NAME}'} - NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}dataorig ${template_as_string} + NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf ${directory_with_template_folders}${/}dataorig ${template_as_string} Check_New_Device_Data_Is_Visible_On_Setter [Documentation] Get the device data and make sure it contains the created content. - BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_SETTER} ${ORIGINAL_DATA} + BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_SETTER} ${original_data} Check_New_Device_Data_Is_Visible_On_Checker [Documentation] Check that the created device data make their way into the checker node. - BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_CHECKER} ${ORIGINAL_DATA} + BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_CHECKER} ${original_data} Check_New_Device_Data_Is_Visible_On_Configurer [Documentation] Check that the created device data make their way into the configurer node. - BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_CONFIGURER} ${ORIGINAL_DATA} + BuiltIn.Wait_Until_Keyword_Succeeds ${DEVICE_CHECK_TIMEOUT} 1s Check_Config_Data ${NODE_CONFIGURER} ${original_data} Modify_Device_Data [Documentation] Send a request to change the sample test data and check that the request went OK. NetconfViaRestconf.Activate_NVR_Session ${NODE_SETTER} ${template_as_string}= BuiltIn.Set_Variable {'DEVICE_NAME': '${DEVICE_NAME}'} - NetconfViaRestconf.Put_Xml_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}datamod1 ${template_as_string} + NetconfViaRestconf.Put_Xml_Template_Folder_Via_Restconf ${directory_with_template_folders}${/}datamod1 ${template_as_string} [Teardown] Utils.Report_Failure_Due_To_Bug 4968 Check_Device_Data_Is_Modified [Documentation] Get the device data and make sure it contains the modified content. - Check_Config_Data ${NODE_SETTER} ${MODIFIED_DATA} + Check_Config_Data ${NODE_SETTER} ${modified_data} [Teardown] Utils.Report_Failure_Due_To_Bug 4968 Check_Modified_Device_Data_Is_Visible_On_Checker [Documentation] Check that the modified device data make their way into the checker node. - BuiltIn.Wait_Until_Keyword_Succeeds 60s 1s Check_Config_Data ${NODE_CHECKER} ${MODIFIED_DATA} + BuiltIn.Wait_Until_Keyword_Succeeds 60s 1s Check_Config_Data ${NODE_CHECKER} ${modified_data} [Teardown] Utils.Report_Failure_Due_To_Bug 4968 Check_Modified_Device_Data_Is_Visible_On_Configurer [Documentation] Check that the modified device data make their way into the configurer node. - BuiltIn.Wait_Until_Keyword_Succeeds 60s 1s Check_Config_Data ${NODE_CONFIGURER} ${MODIFIED_DATA} + BuiltIn.Wait_Until_Keyword_Succeeds 60s 1s Check_Config_Data ${NODE_CONFIGURER} ${modified_data} [Teardown] Utils.Report_Failure_Due_To_Bug 4968 Delete_Device_Data [Documentation] Send a request to delete the sample test data on the device and check that the request went OK. NetconfViaRestconf.Activate_NVR_Session ${NODE_SETTER} ${template_as_string}= BuiltIn.Set_Variable {'DEVICE_NAME': '${DEVICE_NAME}'} - NetconfViaRestconf.Delete_Xml_Template_Folder_Via_Restconf ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}datamod1 ${template_as_string} + NetconfViaRestconf.Delete_Xml_Template_Folder_Via_Restconf ${directory_with_template_folders}${/}datamod1 ${template_as_string} [Teardown] Utils.Report_Failure_Due_To_Bug 4968 Check_Device_Data_Is_Deleted [Documentation] Get the device data and make sure it is empty again. - Check_Config_Data ${NODE_SETTER} ${EMPTY_DATA} + Check_Config_Data ${NODE_SETTER} ${empty_data} [Teardown] Utils.Report_Failure_Due_To_Bug 4968 Check_Device_Data_Deletion_Is_Visible_On_Checker [Documentation] Check that the device data deletion makes its way into the checker node. - BuiltIn.Wait_Until_Keyword_Succeeds 60s 1s Check_Config_Data ${NODE_CHECKER} ${EMPTY_DATA} + BuiltIn.Wait_Until_Keyword_Succeeds 60s 1s Check_Config_Data ${NODE_CHECKER} ${empty_data} [Teardown] Utils.Report_Failure_Due_To_Bug 4968 Check_Device_Data_Deletion_Is_Visible_On_Configurer [Documentation] Check that the device data deletion makes its way into the checker node. - BuiltIn.Wait_Until_Keyword_Succeeds 60s 1s Check_Config_Data ${NODE_CONFIGURER} ${EMPTY_DATA} + BuiltIn.Wait_Until_Keyword_Succeeds 60s 1s Check_Config_Data ${NODE_CONFIGURER} ${empty_data} [Teardown] Utils.Report_Failure_Due_To_Bug 4968 Deconfigure_Device_In_Netconf diff --git a/csit/suites/netconf/restperfclient/performance.robot b/csit/suites/netconf/restperfclient/performance.robot index 411321a23e..1c7847e86f 100644 --- a/csit/suites/netconf/restperfclient/performance.robot +++ b/csit/suites/netconf/restperfclient/performance.robot @@ -33,10 +33,9 @@ Resource ${CURDIR}/../../../libraries/Utils.robot Variables ${CURDIR}/../../../variables/Variables.py *** Variables *** -${DIRECTORY_WITH_CRUD_TEMPLATES} ${CURDIR}/../../../variables/netconf/CRUD -${DIRECTORY_WITH_TEMPLATE_FOLDERS} ${CURDIR}/../../../variables/netconf/RestPerfClient ${DEVICE_NAME} ${FIRST_TESTTOOL_PORT}-sim-device ${REQUEST_COUNT} 65536 +${directory_with_crud_templates} ${CURDIR}/../../../variables/netconf/CRUD *** Test Cases *** Start_Testtool @@ -56,7 +55,7 @@ Wait_For_Device_To_Become_Connected Create_Device_Data [Documentation] Send some sample test data into the device and check that the request went OK. ${template_as_string}= BuiltIn.Set_Variable {'DEVICE_NAME': '${DEVICE_NAME}'} - NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf ${DIRECTORY_WITH_CRUD_TEMPLATES}${/}cars ${template_as_string} + NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf ${directory_with_crud_templates}${/}cars ${template_as_string} Deploy_And_Run_RestPerfClient [Documentation] Deploy and execute restperfclient, asking it to send the specified amount of requests to the netconf connector of the device. -- 2.36.6