blob: 5c012276666fe12b9bc35f0ffbe3f744696dc362 [file] [log] [blame]
Sushil Singhc5e9ebc2020-04-09 03:32:57 -05001*** Settings ***
2Documentation Management console utilities keywords.
3
4Library ../../lib/gen_robot_valid.py
5Library Collections
6Library ../../lib/bmc_ssh_utils.py
7Library SSHLibrary
8
9*** Variables ***
10&{daemon_command} start=systemctl start avahi-daemon
11 ... stop=systemctl stop avahi-daemon
12 ... status=systemctl status avahi-daemon -l
13&{daemon_message} start=Active: active (running)
14 ... stop=Active: inactive (dead)
15
16*** Keywords ***
17
18Set AvahiDaemon Service
19 [Documentation] To enable or disable avahi service.
20 [Arguments] ${command}
21
22 # Description of argument(s):
George Keishing1faaa462020-04-16 10:27:20 -050023 # command Get command from dictionary.
Sushil Singhc5e9ebc2020-04-09 03:32:57 -050024
25 ${service_command}= Get From Dictionary ${daemon_command} ${command}
26 ${resp} ${stderr} ${rc}= BMC Execute Command ${service_command} print_out=1
27 Should Be Equal As Integers ${rc} 0
28
29
30Verify AvahiDaemon Service Status
31 [Documentation] To check for avahi service.
32 [Arguments] ${message}
33
34 # Description of argument(s):
George Keishing1faaa462020-04-16 10:27:20 -050035 # message Get status message from dictionary.
Sushil Singhc5e9ebc2020-04-09 03:32:57 -050036
37 ${service_command}= Get From Dictionary ${daemon_command} status
38 ${service_message}= Get From Dictionary ${daemon_message} ${message}
39 ${resp} ${stderr} ${rc}= BMC Execute Command ${service_command} print_out=1
40 Should Contain ${resp} ${service_message}