<commit_before>*** Settings ***
Documentation  Set metadata for test suite.

Library          SSHLibrary
Resource         ../lib/connection_client.robot
Resource         ../lib/rest_client.robot
Resource         ../lib/utils.robot
Resource         ../lib/code_update_utils.robot

Suite Setup      System Driver Data

*** Variables ***

${DRIVER_CMD}    cat /etc/os-release | grep ^VERSION_ID=

*** Keyword ***

System Driver Data
    [Documentation]  System driver information and enable defaults settings.
    Run Keyword And Ignore Error  Clear System Entry From Knownhosts
    Open Connection And Log In
    Run Keyword And Ignore Error  Log BMC Driver Details
    Run Keyword And Ignore Error  Log PNOR Driver Details
    Run Keyword And Ignore Error  Log BMC Model
    Run Keyword And Ignore Error  Enable Core Dump On BMC
    Run Keyword And Ignore Error  Set Boot Defaults
    Enable Field Mode And Verify Unmount

Set Boot Defaults
    Set Control Boot Mode  ${CONTROL_HOST_URI}/boot  ${BOOT_MODE_REGULAR}
    Set Control Boot Mode
    ...  ${CONTROL_HOST_URI}/boot/one_time  ${BOOT_MODE_REGULAR}

Log BMC Driver Details
    [Documentation]   Get BMC driver details and log.

    ${output}  ${stderr}=  Execute Command  ${DRIVER_CMD}
    ...  return_stderr=True
    Should Be Empty  ${stderr}
    Log  ${output}
    [Return]  ${output}

Log PNOR Driver Details
    [Documentation]   Get PNOR driver details and log.
    # Until the new REST interface is available using pflash to
    # capture the PNOR details.
    ${software}=  Get Host Software Objects Details
    Log  ${software}

Log BMC Model
    [Documentation]  Fetch BMC Model name from system and log.
    ${bmc_model}=  Get BMC System Model
    Log  BMC Model=${bmc_model}<commit_msg>Add initial power policy setting to ALWAYS_POWER_OFF<commit_after>*** Settings ***
Documentation  Set metadata for test suite.

Library          SSHLibrary
Resource         ../lib/connection_client.robot
Resource         ../lib/rest_client.robot
Resource         ../lib/utils.robot
Resource         ../lib/code_update_utils.robot

Suite Setup      System Driver Data

*** Variables ***

${DRIVER_CMD}    cat /etc/os-release | grep ^VERSION_ID=

*** Keyword ***

System Driver Data
    [Documentation]  System driver information and enable defaults settings.
    Run Keyword And Ignore Error  Clear System Entry From Knownhosts
    Open Connection And Log In
    Run Keyword And Ignore Error  Log BMC Driver Details
    Run Keyword And Ignore Error  Log PNOR Driver Details
    Run Keyword And Ignore Error  Log BMC Model
    Run Keyword And Ignore Error  Enable Core Dump On BMC
    Run Keyword And Ignore Error  Set Boot Defaults
    Set BMC Power Policy  ${ALWAYS_POWER_OFF}
    Enable Field Mode And Verify Unmount

Set Boot Defaults
    Set Control Boot Mode  ${CONTROL_HOST_URI}/boot  ${BOOT_MODE_REGULAR}
    Set Control Boot Mode
    ...  ${CONTROL_HOST_URI}/boot/one_time  ${BOOT_MODE_REGULAR}

Log BMC Driver Details
    [Documentation]   Get BMC driver details and log.

    ${output}  ${stderr}=  Execute Command  ${DRIVER_CMD}
    ...  return_stderr=True
    Should Be Empty  ${stderr}
    Log  ${output}
    [Return]  ${output}

Log PNOR Driver Details
    [Documentation]   Get PNOR driver details and log.
    # Until the new REST interface is available using pflash to
    # capture the PNOR details.
    ${software}=  Get Host Software Objects Details
    Log  ${software}

Log BMC Model
    [Documentation]  Fetch BMC Model name from system and log.
    ${bmc_model}=  Get BMC System Model
    Log  BMC Model=${bmc_model}
{'fraction_non_alphanumeric': 0.06985805733370443, 'fraction_numerical': 0.0, 'mean_word_length': 3.024636058230683, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '879399', 'n_tokens_mistral': 1054, 'n_tokens_neox': 1022, 'n_words': 408}