From b0e04beb61b97bf71282eb47f882846de1a79ecb Mon Sep 17 00:00:00 2001 From: Jozef Behran Date: Thu, 14 Jan 2016 12:07:40 +0100 Subject: [PATCH 1/1] Fixing confusion in "netconf connector" checking keywords The documentation of these keywords was updated to match what these keywords are actually doing but renaming these keywords was postponed and just FIXMEs were added. Trying to do these renames without an automatic keyword reference checking tool is a potential time sink. Change-Id: I0adcc32df8cd209f735e90efbece121116ead52e Signed-off-by: Jozef Behran --- csit/libraries/NetconfKeywords.robot | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/csit/libraries/NetconfKeywords.robot b/csit/libraries/NetconfKeywords.robot index 8b46af6b0b..f1418e3d98 100644 --- a/csit/libraries/NetconfKeywords.robot +++ b/csit/libraries/NetconfKeywords.robot @@ -42,16 +42,23 @@ Configure_Device_In_Netconf Collections.Set_To_Dictionary ${NetconfKeywords__mounted_device_types} ${device_name} ${device_type} Count_Netconf_Connectors_For_Device + # FIXME: This no longer counts netconf connectors, it counts "device instances in Netconf topology". + # This keyword should be renamed but without an automatic keyword naming standards checker this is + # potentially destabilizing change so right now it is as FIXME. Proposed new name: + # Count_Device_Instances_In_Netconf_Topology [Arguments] ${device_name} - [Documentation] Count all Netconf connectors referring to the specified device (usually 0 or 1). + [Documentation] Count all instances of the specified device in the Netconf topology (usually 0 or 1). ${mounts}= Utils.Get_Data_From_URI operational network-topology:network-topology/topology/topology-netconf Builtin.Log ${mounts} ${actual_count}= Builtin.Evaluate len('''${mounts}'''.split('"node-id":"${device_name}"'))-1 Builtin.Return_From_Keyword ${actual_count} Check_Device_Has_No_Netconf_Connector + # FIXME: Similarlt to "Count_Netconf_Connectors_For_Device", this does not check whether the device has + # no netconf connector but whether the device is present in the netconf topology or not. Rename, proposed + # new name: Check_Device_Not_Present_In_Netconf_Topology [Arguments] ${device_name} - [Documentation] Check that there are no Netconf connectors referring to the specified device. + [Documentation] Check that there are no instances of the specified device in the Netconf topology. ${count} Count_Netconf_Connectors_For_Device ${device_name} Builtin.Should_Be_Equal_As_Strings ${count} 0 -- 2.36.6