1*** 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}
23    Log  ${output}
24
25
26Run DMTF Tool
27    [Documentation]  Execution of the command.
28    [Arguments]      ${rsv_dir_path}  ${command_string}
29
30    # Description of arguments:
31    # rsv_dir_path    Directory path for rsv tool (e.g. "Redfish-Service-Validator").
32    # command_string  The complete rsv command string to be run.
33
34    ${rc}  ${output}=  Shell Cmd  ${command_string}
35    Log  ${output}
36
37    # Example:
38    # Validation has failed: 9 problems found
39    Should Not Contain  ${output}  Validation has failed
40