Prashanth Katti | 1dcd539 | 2017-05-12 04:35:53 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Resource ../xcat/resource.txt |
| 4 | |
| 5 | Library SSHLibrary |
| 6 | Library OperatingSystem |
| 7 | |
| 8 | *** Keywords *** |
| 9 | |
| 10 | Open Connection And Login To XCAT |
| 11 | [Documentation] Open connection and login to xCAT server. |
| 12 | [Arguments] ${xcat_host}=${XCAT_HOST} ${xcat_port}=${XCAT_PORT} |
| 13 | |
| 14 | # Description of argument(s): |
| 15 | # xcat_host IP address of the XCAT server. |
| 16 | # xcat_port Network port on which XCAT server accepts ssh session. |
| 17 | |
| 18 | Open Connection ${xcat_host} port=${xcat_port} |
| 19 | Login ${XCAT_USERNAME} ${XCAT_PASSWORD} |
| 20 | |
| 21 | Get List Of BMC Nodes |
| 22 | [Documentation] Get list of BMC nodes. |
| 23 | [Arguments] ${node_cfg_file_path}=${NODE_CFG_FILE_PATH} |
| 24 | |
| 25 | # Get the list of BMC nodes to be added. |
| 26 | # This keyword expects file having list of BMC nodes |
| 27 | # as an input. |
| 28 | # File should have IP addresses of BMC nodes. |
| 29 | |
| 30 | OperatingSystem.File Should Exist ${node_cfg_file_path} msg=cfg file missing. |
| 31 | File Should Not Be Empty ${node_cfg_file_path} msg=Empty config file. |
| 32 | |
| 33 | ${bmc_list} = OperatingSystem.Get File ${node_cfg_file_path} |
| 34 | [Return] ${bmc_list} |