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