Enforced robotframework standards.

- The standards are enforced using the rflint static anylysis tool.
- More standards will be added in future commits but this is a base
  starting point.

Change-Id: I7dd8a2b0b42a51327b748cb730609d7ee2538de3
Signed-off-by: Joy Onyerikwu <onyekachukwu.joy.onyerikwu@ibm.com>
diff --git a/lib/connection_client.robot b/lib/connection_client.robot
index 527cea1..4cd2088 100755
--- a/lib/connection_client.robot
+++ b/lib/connection_client.robot
@@ -54,6 +54,7 @@
     SSHLibrary.Login  ${username}  ${password}
 
 Open Connection for SCP
+    [Documentation]  Open a connection for SCP.
     Import Library      SCPLibrary      WITH NAME       scp
     Run Keyword If  '${SSH_PORT}' == '${EMPTY}'  scp.Open connection  ${OPENBMC_HOST}
     ...  username=${OPENBMC_USERNAME}  password=${OPENBMC_PASSWORD}
diff --git a/lib/ipmi_client.robot b/lib/ipmi_client.robot
index 591919c..9d8a93c 100755
--- a/lib/ipmi_client.robot
+++ b/lib/ipmi_client.robot
@@ -24,6 +24,7 @@
 *** Keywords ***
 
 Run IPMI Command
+    [Documentation]  Run the given IPMI command.
     [Arguments]  ${args}
     ${resp}=  Run Keyword If  '${IPMI_COMMAND}' == 'External'
     ...  Run External IPMI RAW Command  ${args}
@@ -35,6 +36,7 @@
     [Return]  ${resp}
 
 Run IPMI Standard Command
+    [Documentation]  Run the standard IPMI command.
     [Arguments]  ${args}
     ${resp}=  Run Keyword If  '${IPMI_COMMAND}' == 'External'
     ...  Run External IPMI Standard Command  ${args}
@@ -47,6 +49,7 @@
     [Return]  ${resp}
 
 Run Dbus IPMI RAW Command
+    [Documentation]  Run the raw IPMI command through dbus.
     [Arguments]    ${args}
     ${valueinBytes}=   Byte Conversion  ${args}
     ${cmd}=   Catenate   ${dbushostipmicmd1} ${dbusHostIpmiCmdReceivedMsg}
@@ -56,6 +59,7 @@
     set test variable    ${OUTPUT}     "${output}"
 
 Run Dbus IPMI Standard Command
+    [Documentation]  Run the standard IPMI command through dbus.
     [Arguments]    ${args}
     Copy ipmitool
     ${stdout}    ${stderr}    ${output}=  Execute Command
@@ -65,7 +69,7 @@
     [Return]    ${stdout}
 
 Run Inband IPMI Raw Command
-    [Documentation]  Run Inband IPMI raw command.
+    [Documentation]  Run the raw IPMI command in-band.
     [Arguments]  ${args}  ${os_host}=${OS_HOST}  ${os_username}=${OS_USERNAME}
     ...          ${os_password}=${OS_PASSWORD}
 
@@ -84,7 +88,7 @@
     [Return]  ${stdout}
 
 Run Inband IPMI Standard Command
-    [Documentation]  Run Inband IPMI standard command.
+    [Documentation]  Run the standard IPMI command in-band.
     [Arguments]  ${args}  ${os_host}=${OS_HOST}  ${os_username}=${OS_USERNAME}
     ...          ${os_password}=${OS_PASSWORD}
 
@@ -103,6 +107,7 @@
     [Return]  ${stdout}
 
 Run External IPMI RAW Command
+    [Documentation]  Run the raw IPMI command externally.
     [Arguments]    ${args}
     ${ipmi_raw_cmd}=   Catenate  SEPARATOR=
     ...    ${IPMI_EXT_CMD} -P${SPACE}${IPMI_PASSWORD}${SPACE}
@@ -112,6 +117,7 @@
     [Return]    ${output}
 
 Run External IPMI Standard Command
+    [Documentation]  Run the standard IPMI command in-band.
     [Arguments]  ${args}  ${fail_on_err}=${1}
 
     # Description of argument(s):
@@ -220,23 +226,31 @@
 
 
 Set NetFn Byte
-   [Arguments]    ${word}
-   ${netfnByteLocal}=  Catenate   byte:${word}
-   Set Global Variable  ${netfnByte}  ${netfnByteLocal}
+    [Documentation]  Set the network function byte.
+    [Arguments]    ${word}
+    ${netfnByteLocal}=  Catenate   byte:${word}
+    Set Global Variable  ${netfnByte}  ${netfnByteLocal}
 
 Set Cmd Byte
-   [Arguments]    ${word}
-   ${cmdByteLocal}=  Catenate   byte:${word}
-   Set Global Variable  ${cmdByte}  ${cmdByteLocal}
+    [Documentation]  Set the command byte.
+    [Arguments]    ${word}
+    ${cmdByteLocal}=  Catenate   byte:${word}
+    Set Global Variable  ${cmdByte}  ${cmdByteLocal}
 
 Set Array Byte
-   [Arguments]    ${word}
-   ${arrayByteLocal}=   Catenate   SEPARATOR=  ${arrayByte}  ${word}
-   ${arrayByteLocal}=   Catenate   SEPARATOR=  ${arrayByteLocal}   ,
-   Set Global Variable  ${arrayByte}   ${arrayByteLocal}
+    [Documentation]  Set the array byte.
+    [Arguments]    ${word}
+    ${arrayByteLocal}=   Catenate   SEPARATOR=  ${arrayByte}  ${word}
+    ${arrayByteLocal}=   Catenate   SEPARATOR=  ${arrayByteLocal}   ,
+    Set Global Variable  ${arrayByte}   ${arrayByteLocal}
 
 Copy ipmitool
-    OperatingSystem.File Should Exist   tools/ipmitool      msg=The ipmitool program could not be found in the tools directory. It is not part of the automation code by default. You must manually copy or link the correct openbmc version of the tool in to the tools directory in order to run this test suite.
+    [Documentation]  Copy the ipmitool to the BMC.
+    ${ipmitool_error}=  Catenate  The ipmitool program could not be found in the tools directory.
+    ...  It is not part of the automation code by default. You must manually copy or link the correct openbmc
+    ...  version of the tool in to the tools directory in order to run this test suite.
+
+    OperatingSystem.File Should Exist  tools/ipmitool  msg=${ipmitool_error}
 
     Import Library      SCPLibrary      WITH NAME       scp
     scp.Open connection     ${OPENBMC_HOST}     username=${OPENBMC_USERNAME}      password=${OPENBMC_PASSWORD}
diff --git a/lib/pdu/pdu.robot b/lib/pdu/pdu.robot
index 111952e..aa1b216 100644
--- a/lib/pdu/pdu.robot
+++ b/lib/pdu/pdu.robot
@@ -1,15 +1,17 @@
 *** Settings ***
-Documentation           Generic PDU library
+Documentation           Generic Protocol Distribution Unit (PDU) library
 
 Resource        ../../lib/resource.txt
 
 *** Keywords ***
 Validate Prereq
+    [Documentation]  Validate prerequisites for PDU.
     ${PDU_VAR_LIST} =    Create List    PDU_TYPE    PDU_IP  PDU_USERNAME    PDU_PASSWORD    PDU_SLOT_NO
     : FOR    ${PDU_VAR}    IN    @{PDU_VAR_LIST}
     \    Should Not Be Empty    ${${PDU_VAR}}   msg=Unable to find variable ${PDU_VAR}
 
 PDU Power Cycle
+    [Documentation]  Perform PDU power cycle.
     Validate Prereq
     Import Resource  ${CURDIR}/../../lib/pdu/${PDU_TYPE}.robot
     Power Cycle
diff --git a/lib/pdu/synaccess.robot b/lib/pdu/synaccess.robot
index ff71089..d9d5a21 100644
--- a/lib/pdu/synaccess.robot
+++ b/lib/pdu/synaccess.robot
@@ -1,17 +1,19 @@
 *** Settings ***
-Documentation           synaccess PDU library
+Documentation           Synaccess Protocol Distribution Unit (PDU) library
 
 Resource        ../../lib/pdu/pdu.robot
 Library         RequestsLibrary.RequestsKeywords
 
 *** Keywords ***
 Connect and Login
+    [Documentation]  Open PDU connection and login.
     Validate Prereq
     SSHLibrary.Open Connection  ${PDU_IP}
     ${auth}=    Create List     ${PDU_USERNAME}    ${PDU_PASSWORD}
     Create Session    pdu    http://${PDU_IP}   auth=${auth}
 
 Power Cycle
+    [Documentation]  Perform PDU power cycle.
     Connect and Login
     ${ret}=    Get Request    pdu    /cmd.cgi?$A4 ${PDU_SLOT_NO}
     ${error_message}=  Catenate  Power cycle of slot ${PDU_SLOT_NO} failed.
diff --git a/lib/resource.txt b/lib/resource.txt
index 48ab60e..9e2f430 100755
--- a/lib/resource.txt
+++ b/lib/resource.txt
@@ -82,13 +82,16 @@
 
 *** Keywords ***
 Get Inventory Schema
+    [Documentation]  Get inventory schema.
     [Arguments]    ${machine}
     [Return]    &{INVENTORY}[${machine}]
 
 Get Inventory Items Schema
+    [Documentation]  Get inventory items schema.
     [Arguments]    ${machine}
     [Return]    &{INVENTORY_ITEMS}[${machine}]
 
 Get Sensor Schema
+    [Documentation]  Get sensors schema.
     [Arguments]    ${machine}
     [Return]    &{SENSORS}[${machine}]
diff --git a/lib/state_manager.robot b/lib/state_manager.robot
index e54cbb3..75b1048 100755
--- a/lib/state_manager.robot
+++ b/lib/state_manager.robot
@@ -304,6 +304,4 @@
 
 Wait For BMC Ready
     [Documentation]  Check BMC state and wait for BMC Ready.
-    Wait Until Keyword Succeeds  10 min  10 sec  Is BMC Ready
-
-
+    Wait Until Keyword Succeeds  10 min  10 sec  Is BMC Ready
\ No newline at end of file
diff --git a/lib/utils.robot b/lib/utils.robot
index b333aea..b782ec1 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -111,6 +111,7 @@
 
 
 Wait For Host To Ping
+    [Documentation]  Wait for the given host to ping.
     [Arguments]  ${host}  ${timeout}=${OPENBMC_REBOOT_TIMEOUT}min
     ...          ${interval}=5 sec
 
@@ -127,6 +128,7 @@
 
 
 Ping Host
+    [Documentation]  Ping the given host.
     [Arguments]     ${host}
 
     # Description of argument(s):
@@ -216,11 +218,13 @@
 
 
 Is Power On
+    [Documentation]  Verify that the BMC chassis state is on.
     ${state}=  Get Power State
     Should be equal  ${state}  ${1}
 
 
 Is Power Off
+    [Documentation]  Verify that the BMC chassis state is off.
     ${state}=  Get Power State
     Should be equal  ${state}  ${0}
 
@@ -440,6 +444,7 @@
 
 
 Copy PNOR to BMC
+    [Documentation]  Copy the PNOR image to the BMC.
     Import Library      SCPLibrary      WITH NAME       scp
     Open Connection for SCP
     Log    Copying ${PNOR_IMAGE_PATH} to /tmp
@@ -508,6 +513,7 @@
 
 
 Verify Ping and REST Authentication
+    [Documentation]  Verify ping and rest authentication.
     ${l_ping}=   Run Keyword And Return Status
     ...    Ping Host  ${OPENBMC_HOST}
     Run Keyword If  '${l_ping}' == '${False}'
@@ -1498,6 +1504,7 @@
 
 
 Verify The Attribute
+    [Documentation]  Verify the given attribute.
     [Arguments]  ${uri}  ${attribute_name}  ${attribute_value}
 
     # Description of argument(s):