6271a6706055ad2f1c3bdaf80cd488c962e4f654
[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
13 Verification of TSDR Cassandra Feature Installation
14     [Documentation]    Install and Verify the TSDR Cassandra Syslog Features
15     Initialize Cassandra Tables Metricval    val_table=metriclog
16     Wait Until Keyword Succeeds    24x    10 sec    Check Karaf Log Has Messages    tsdr.syslog
17     Verify Feature Is Installed    odl-tsdr-cassandra
18     Verify Feature Is Installed    odl-tsdr-syslog-collector
19
20 Sending syslog to ODL Syslog collector using Logger command
21     [Documentation]    Sending Syslogs to collector.
22     :FOR    ${key}    IN ZIP   &{syslog_facility}
23     \    ${value}=    Get From Dictionary    ${syslog_facility}    ${key}
24     \    ${f_value}=    Evaluate    ${value} * 8
25     \    Generate Syslog    ${f_value}
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