Upgrade RF syntax for v3.2 compatibility
[integration/test.git] / csit / suites / tsdr / Cassandra / 050_SyslogTable.robot
1 *** Settings ***
2 Documentation     Test suite for Cassandra DataStore Syslog Verification
3 Library           SSHLibrary
4 Library           Collections
5 Library           String
6 Library           ../../../libraries/Common.py
7 Resource          ../../../libraries/KarafKeywords.robot
8 Resource          ../../../libraries/TsdrUtils.robot
9 Variables         ../../../variables/Variables.py
10
11 *** Test Cases ***
12 Verification of TSDR Cassandra Feature Installation
13     [Documentation]    Install and Verify the TSDR Cassandra Syslog Features
14     Initialize Cassandra Tables Metricval    val_table=metriclog
15     Wait Until Keyword Succeeds    24x    10 sec    Check Karaf Log Has Messages    tsdr.syslog
16     Verify Feature Is Installed    odl-tsdr-cassandra
17     Verify Feature Is Installed    odl-tsdr-syslog-collector
18
19 Sending syslog to ODL Syslog collector using Logger command
20     [Documentation]    Sending Syslogs to collector.
21     FOR    ${key}    IN ZIP    &{syslog_facility}
22         ${value}=    Get From Dictionary    ${syslog_facility}    ${key}
23         ${f_value}=    Evaluate    ${value} * 8
24         Generate Syslog    ${f_value}
25     END
26
27 Verifying TSDR Data Store For Syslog Entries
28     [Documentation]    Verifying if syslogs is getting stored.
29     Copy TSDR tables    val_table=metriclog
30     ${metric_log}=    Verify the Metrics Syslog on Cassandra Client    grep DC=SYSLOG
31     @{Syslogs}=    Split to lines    ${metric_log}
32     ${iterator}=    Set Variable    0
33     FOR    ${key}    IN ZIP    &{syslog_facility}
34         ${value}=    Get From Dictionary    ${syslog_facility}    ${key}
35         ${f_value}=    Evaluate    ${value} * 8
36         Should Contain    ${syslogs}[${iterator}]    ${MESSAGE}
37         Should Contain    ${syslogs}[${iterator}]    <${f_value}>
38         ${iterator}=    Evaluate    ${iterator} + 1
39     END