blob: 2bc2d3d334a96ac1454b0f15b8c74d088b165cdd [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.
16 [Arguments] ${rsv_dir_path} ${rsv_github_url}
17
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
22 ${rc} ${output}= Shell Cmd rm -rf ${rsv_dir_path} ; git clone ${rsv_github_url} ${rsv_dir_path}
George Keishing00ee05a2019-02-25 12:35:06 -060023
24
25Run DMTF Tool
26 [Documentation] Execution of the command.
27 [Arguments] ${rsv_dir_path} ${command_string}
28
29 # Description of arguments:
30 # rsv_dir_path Directory path for rsv tool (e.g. "Redfish-Service-Validator").
31 # command_string The complete rsv command string to be run.
32
33 ${rc} ${output}= Shell Cmd ${command_string}
34 Log ${output}
George Keishing398d9e62019-02-28 05:41:33 -060035 [Return] ${output}
36
37
38Redfish Service Validator Result
39 [Documentation] Check tool output for errors.
40 [Arguments] ${tool_output}
George Keishing00ee05a2019-02-25 12:35:06 -060041
42 # Example:
43 # Validation has failed: 9 problems found
George Keishing398d9e62019-02-28 05:41:33 -060044 Should Not Contain ${tool_output} Validation has failed
45
46
47Redfish JsonSchema ResponseValidator Result
48 [Documentation] Check tool output for errors.
49 [Arguments] ${tool_output}
50
51 # Example:
52 # 0 errors
53 Should Contain ${tool_output} 0 errors
54