blob: ca8893e72c18b432699ff0c8dca86e839db5aa40 [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").
Sridevi Ramesh89242292025-07-20 02:36:56 -050021 # branch_name Name of the branch.
George Keishing00ee05a2019-02-25 12:35:06 -060022
George Keishing2d0804e2019-12-12 22:27:05 -060023 ${cmd_buf} Catenate rm -rf ${rsv_dir_path} ;
ganesanbbca06d02023-04-15 10:52:51 +000024 ... git clone --branch ${branch_name} ${rsv_github_url} ${rsv_dir_path}
George Keishing2d0804e2019-12-12 22:27:05 -060025 ${rc} ${output}= Shell Cmd ${cmd_buf}
George Keishing00ee05a2019-02-25 12:35:06 -060026
27
28Run DMTF Tool
29 [Documentation] Execution of the command.
manashsarmaa053fb32020-06-08 08:43:32 -050030 [Arguments] ${rsv_dir_path} ${command_string} ${check_error}=0
George Keishing00ee05a2019-02-25 12:35:06 -060031
32 # Description of arguments:
33 # rsv_dir_path Directory path for rsv tool (e.g. "Redfish-Service-Validator").
34 # command_string The complete rsv command string to be run.
manashsarmaa053fb32020-06-08 08:43:32 -050035 # check_error It decides if error information is to be checked.
George Keishing00ee05a2019-02-25 12:35:06 -060036
manashsarmaa053fb32020-06-08 08:43:32 -050037 ${rc} ${output}= Shell Cmd ${command_string} ignore_err=${check_error}
George Keishing00ee05a2019-02-25 12:35:06 -060038 Log ${output}
George Keishing409df052024-01-17 22:36:14 +053039 RETURN ${rc} ${output}
George Keishing398d9e62019-02-28 05:41:33 -060040
41
42Redfish Service Validator Result
43 [Documentation] Check tool output for errors.
44 [Arguments] ${tool_output}
George Keishing00ee05a2019-02-25 12:35:06 -060045
Sridevi Ramesh89242292025-07-20 02:36:56 -050046 # Description of arguments:
47 # tool_output DMTF tool output.
48
George Keishing00ee05a2019-02-25 12:35:06 -060049 # Example:
50 # Validation has failed: 9 problems found
George Keishing4a903942022-12-21 23:27:04 -060051 # Service could not be started: RetriesExhaustedError()
52 Should Not Contain Any ${tool_output} Validation has failed
53 ... Service could not be started: RetriesExhaustedError()
George Keishing398d9e62019-02-28 05:41:33 -060054
55
56Redfish JsonSchema ResponseValidator Result
57 [Documentation] Check tool output for errors.
58 [Arguments] ${tool_output}
59
Sridevi Ramesh89242292025-07-20 02:36:56 -050060 # Description of arguments:
61 # tool_output DMTF tool output.
62
George Keishing398d9e62019-02-28 05:41:33 -060063 # Example:
64 # 0 errors
65 Should Contain ${tool_output} 0 errors
66