Sushil Singh | c5e9ebc | 2020-04-09 03:32:57 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Management console utilities keywords. |
| 3 | |
| 4 | Library ../../lib/gen_robot_valid.py |
| 5 | Library Collections |
| 6 | Library ../../lib/bmc_ssh_utils.py |
| 7 | Library 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 | |
| 18 | Set AvahiDaemon Service |
| 19 | [Documentation] To enable or disable avahi service. |
| 20 | [Arguments] ${command} |
| 21 | |
| 22 | # Description of argument(s): |
George Keishing | 1faaa46 | 2020-04-16 10:27:20 -0500 | [diff] [blame] | 23 | # command Get command from dictionary. |
Sushil Singh | c5e9ebc | 2020-04-09 03:32:57 -0500 | [diff] [blame] | 24 | |
| 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 | |
| 30 | Verify AvahiDaemon Service Status |
| 31 | [Documentation] To check for avahi service. |
| 32 | [Arguments] ${message} |
| 33 | |
| 34 | # Description of argument(s): |
George Keishing | 1faaa46 | 2020-04-16 10:27:20 -0500 | [diff] [blame] | 35 | # message Get status message from dictionary. |
Sushil Singh | c5e9ebc | 2020-04-09 03:32:57 -0500 | [diff] [blame] | 36 | |
| 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} |