blob: 0539dadad2229001c49574f1dfd4a9bf785bf4c2 [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}
Sushil Singhd03f2ce2020-09-17 08:54:41 -050041
42
43Get Lock Resource Information
44 [Documentation] Get lock resource information.
45
46 ${code_base_dir_path}= Get Code Base Dir Path
47 ${resource_lock_json}= Evaluate
48 ... json.load(open('${code_base_dir_path}data/resource_lock_table.json')) modules=json
49 Rprint Vars resource_lock_json
50
51 [Return] ${resource_lock_json}