Port suite from mkumatag personal repo w/o history

All these files came from https://github.com/mkumatag/openbmc-automation
The decision to remove the commit history was because most of the 122
commits did not follow commit comment AND content best practices.
The ability to remove the commit history was possible because all
contributors where from the same company (IBM) making the coordination /
notification/acceptence easy.  See all the gory details about the
first try to commit with history here...
https://github.com/openbmc/openbmc-test-automation/pull/1

This suite of tests will run against an OpenBMC based server.  It will
run good/bad path testing against the REST interface.  There are tests
that will also run ipmitool on the victim BMC too.

If you want to support a new system in to the suite you should only
have to edit two files...
    data/<system>.py
    tox.ini

The README.md contains details on how to setup for the first time along
with how to execute the test suite

NOTE: some test cases require tools that do not exist on the system.
Currently the ipmitool is needed and if you do not manually copy / link
it in to the tools directory some suites will fail.
diff --git a/tests/test_syslog.robot b/tests/test_syslog.robot
new file mode 100755
index 0000000..92a5260
--- /dev/null
+++ b/tests/test_syslog.robot
@@ -0,0 +1,145 @@
+*** Settings ***
+
+Documentation       This suite is for testing syslog function of Open BMC.
+
+Resource            ../lib/rest_client.robot
+Resource            ../lib/utils.robot
+Resource            ../lib/ipmi_client.robot
+
+Library             OperatingSystem
+Library             SSHLibrary
+
+*** Variables ***
+${INVALID_SYSLOG_IP_ADDRESS}      a.ab.c.d
+${INVALID_SYSLOG_PORT}            abc
+${SYSTEM_SHUTDOWN_TIME}           1min
+${WAIT_FOR_SERVICES_UP}           3min
+
+*** Test Cases ***
+
+Get all Syslog settings
+    [Documentation]     ***GOOD PATH***
+    ...                 This testcase is to get all syslog settings from
+    ...                 open bmc system.\n
+
+    ${ip_address} =    Read Attribute    /org/openbmc/LogManager/rsyslog   ipaddr
+    Should Not Be Empty     ${ip_address}
+
+    ${port} =    Read Attribute    /org/openbmc/LogManager/rsyslog   port
+    Should Not Be Empty     ${port}
+
+    ${status} =    Read Attribute    /org/openbmc/LogManager/rsyslog   status
+    Should Not Be Empty     ${status}
+
+Enable syslog with port number and IP address
+    [Documentation]     ***GOOD PATH***
+    ...                 This testcase is to enable syslog with both ip address
+    ...                 and port number of remote system.\n
+
+    ${resp} =    Enable Syslog Setting    ${SYSLOG_IP_ADDRESS}    ${SYSLOG_PORT}
+    Should Be Equal    ${resp}    ok
+    ${ip}=   Read Attribute   /org/openbmc/LogManager/rsyslog   ipaddr
+    Should Be Equal    ${ip}    ${SYSLOG_IP_ADDRESS}
+    ${port}=   Read Attribute   /org/openbmc/LogManager/rsyslog   port
+    Should Be Equal    ${port}    ${SYSLOG_PORT}
+
+Enable syslog without IP address and port number
+    [Documentation]     ***GOOD PATH***
+    ...                 This testcase is to enable syslog without changing ip address
+    ...                 and port number.\n
+
+    ${resp} =    Enable Syslog Setting    ${EMPTY}    ${EMPTY}
+    Should Be Equal    ${resp}    ok
+    ${status}=   Read Attribute   /org/openbmc/LogManager/rsyslog   status
+    Should Be Equal    ${status}    Enabled
+
+Enable syslog with only IP address
+    [Documentation]     ***GOOD PATH***
+    ...                 This testcase is to enable syslog with only ip address.\n
+
+    ${resp} =    Enable Syslog Setting    ${SYSLOG_IP_ADDRESS}    ${EMPTY}
+    Should Be Equal    ${resp}    ok
+    ${ip}=   Read Attribute   /org/openbmc/LogManager/rsyslog   ipaddr
+    Should Be Equal    ${ip}    ${SYSLOG_IP_ADDRESS}
+    ${status}=   Read Attribute   /org/openbmc/LogManager/rsyslog   status
+    Should Be Equal    ${status}    Enabled
+
+Enable Syslog with only port number
+    [Documentation]     ***GOOD PATH***
+    ...                 This testcase is to enable syslog with only port number.\n
+
+    ${status}=   Read Attribute   /org/openbmc/LogManager/rsyslog   status
+    Should Be Equal    ${status}    Enabled
+    ${resp} =    Enable Syslog Setting    ${EMPTY}    ${SYSLOG_PORT}
+    Should Be Equal    ${resp}    ok
+    ${port}=   Read Attribute   /org/openbmc/LogManager/rsyslog   port
+    Should Be Equal    ${port}    ${SYSLOG_PORT}
+    ${status}=   Read Attribute   /org/openbmc/LogManager/rsyslog   status
+    Should Be Equal    ${status}    Enabled
+
+Disable Syslog
+    [Documentation]     ***GOOD PATH***
+    ...                 This testcase is to verify disabling syslog.\n
+
+    ${resp} =    Disable Syslog Setting    ${EMPTY}
+    Should Be Equal    ${resp}    ok
+    ${status}=   Read Attribute   /org/openbmc/LogManager/rsyslog   status
+    Should Be Equal    Disable    ${status}
+
+Enable invalid ip for Syslog remote server
+    [Documentation]     ***BAD PATH***
+    ...                 This testcase is to verify error while enabling syslog with
+    ...                 invalid ip address.\n
+
+    ${resp} =    Enable Syslog Setting    ${INVALID_SYSLOG_IP_ADDRESS}    ${SYSLOG_PORT}
+    Should Be Equal    ${resp}    error
+
+Enable invalid port for Syslog remote server
+    [Documentation]     ***BAD PATH***
+    ...                 This testcase is to verify error while enabling syslog with
+    ...                 invalid port number.\n
+
+    ${resp} =    Enable Syslog Setting    ${SYSLOG_IP_ADDRESS}    ${INVALID_SYSLOG_PORT}
+    Should Be Equal    ${resp}    error
+
+
+Persistency check for syslog setting
+    [Documentation]   This test case is to verify that syslog setting does not change
+    ...               after service processor reboot.
+
+    ${old_ip}=   Read Attribute   /org/openbmc/LogManager/rsyslog   ipaddr
+    ${old_port}=   Read Attribute   /org/openbmc/LogManager/rsyslog   port
+    ${old_status} =    Read Attribute    /org/openbmc/LogManager/rsyslog   status
+    
+    Open Connection And Log In
+    ${output}=      Execute Command    /sbin/reboot
+    Sleep   ${SYSTEM_SHUTDOWN_TIME}
+    Wait For Host To Ping   ${OPENBMC_HOST}
+    Sleep   ${WAIT_FOR_SERVICES_UP}
+
+    ${ip_address} =    Read Attribute    /org/openbmc/LogManager/rsyslog   ipaddr
+    ${port} =    Read Attribute    /org/openbmc/LogManager/rsyslog   port
+    ${status} =    Read Attribute    /org/openbmc/LogManager/rsyslog   status
+
+    Should Be Equal    ${old_ip}    ${ip_address}
+    Should Be Equal    ${old_port}    ${port}
+    Should Be Equal    ${old_status}    ${status}
+
+*** Keywords ***
+
+Enable Syslog Setting
+    [Arguments]    ${ipaddr}    ${port}
+    ${MYDICT}=  create Dictionary   ipaddr=${ipaddr}  port=${port}
+    @{rsyslog} =   Create List     ${MYDICT}
+    ${data} =   create dictionary   data=@{rsyslog}
+    ${resp} =   openbmc post request    /org/openbmc/LogManager/rsyslog/action/Enable     data=${data}
+    ${jsondata} =    to json    ${resp.content}
+    [return]    ${jsondata['status']}
+
+Disable Syslog Setting
+    [Arguments]    ${args}
+    @{setting_list} =   Create List     ${args}
+    ${data} =   create dictionary   data=@{setting_list}
+    ${resp} =   OpenBMC Post Request    /org/openbmc/LogManager/rsyslog/action/Disable      data=${data}
+    ${jsondata} =    to json    ${resp.content}
+    [return]    ${jsondata['status']}