blob: 2404dee09fc09b21e16209e950c8daa82a339c62 [file] [log] [blame]
George Keishing00ee05a2019-02-25 12:35:06 -06001*** Settings ***
2Documentation DMTF tools utility keywords.
3
4Resource resource.robot
5Library gen_cmd.py
6
7*** Variables ***
8
9# ignore_err controls Shell Cmd behavior.
10${ignore_err} ${0}
11
12*** Keywords ***
13
14Download DMTF Tool
15 [Documentation] Git clone tool.
ganesanbbca06d02023-04-15 10:52:51 +000016 [Arguments] ${rsv_dir_path} ${rsv_github_url} ${branch_name}
George Keishing00ee05a2019-02-25 12:35:06 -060017
18 # Description of arguments:
19 # rsv_dir_path Directory path for rsv tool (e.g. "Redfish-Service-Validator").
20 # rsv_github_url Github URL link(e.g "https://github.com/DMTF/Redfish-Service-Validator").
21
George Keishing2d0804e2019-12-12 22:27:05 -060022 ${cmd_buf} Catenate rm -rf ${rsv_dir_path} ;
ganesanbbca06d02023-04-15 10:52:51 +000023 ... git clone --branch ${branch_name} ${rsv_github_url} ${rsv_dir_path}
George Keishing2d0804e2019-12-12 22:27:05 -060024 ${rc} ${output}= Shell Cmd ${cmd_buf}
George Keishing00ee05a2019-02-25 12:35:06 -060025
26
27Run DMTF Tool
28 [Documentation] Execution of the command.
manashsarmaa053fb32020-06-08 08:43:32 -050029 [Arguments] ${rsv_dir_path} ${command_string} ${check_error}=0
George Keishing00ee05a2019-02-25 12:35:06 -060030
31 # Description of arguments:
32 # rsv_dir_path Directory path for rsv tool (e.g. "Redfish-Service-Validator").
33 # command_string The complete rsv command string to be run.
manashsarmaa053fb32020-06-08 08:43:32 -050034 # check_error It decides if error information is to be checked.
George Keishing00ee05a2019-02-25 12:35:06 -060035
manashsarmaa053fb32020-06-08 08:43:32 -050036 ${rc} ${output}= Shell Cmd ${command_string} ignore_err=${check_error}
George Keishing00ee05a2019-02-25 12:35:06 -060037 Log ${output}
George Keishing899ae012022-03-25 10:16:41 -050038 [Return] ${rc} ${output}
George Keishing398d9e62019-02-28 05:41:33 -060039
40
41Redfish Service Validator Result
42 [Documentation] Check tool output for errors.
43 [Arguments] ${tool_output}
George Keishing00ee05a2019-02-25 12:35:06 -060044
45 # Example:
46 # Validation has failed: 9 problems found
George Keishing4a903942022-12-21 23:27:04 -060047 # Service could not be started: RetriesExhaustedError()
48 Should Not Contain Any ${tool_output} Validation has failed
49 ... Service could not be started: RetriesExhaustedError()
George Keishing398d9e62019-02-28 05:41:33 -060050
51
52Redfish JsonSchema ResponseValidator Result
53 [Documentation] Check tool output for errors.
54 [Arguments] ${tool_output}
55
56 # Example:
57 # 0 errors
58 Should Contain ${tool_output} 0 errors
59