<commit_before>*** Settings ***

Documentation  This test suite verifies pgood state.

Resource  ../lib/rest_client.robot
Resource  ../lib/utils.robot
Resource  ../lib/state_manager.robot

Variables  ../data/variables.py

*** Variables ***

${POWER_URI}  ${CONTROL_URI}/power0/

*** Test Cases ***

Verify PGood When Power On Using REST
    [Documentation]  Verify pgood state on good power supply.
    [Tags]  Verify_PGood_When_Power_On_Using_REST

    # Initiate Host poweron using rest commands.
    Initiate Host Boot  1
    ${data}=  Read Attribute  ${POWER_URI}  pgood

    Should Be Equal As Integers  ${data}  1

Verify PGood When Power Off Using REST
    [Documentation]  Verify pgood state on bad power supply.
    [Tags]  Verify_PGood_When_Power_Off_Using_REST

    # Initiate Host poweroff using rest commands.
    Initiate Host PowerOff  1
    ${data}=  Read Attribute  ${POWER_URI}  pgood

    Should Be Equal As Integers  ${data}  0
<commit_msg>Pgood automation for MFG Stage2<commit_after>*** Settings ***

Documentation  This test suite verifies pgood state.

Resource  ../lib/rest_client.robot
Resource  ../lib/utils.robot
Resource  ../lib/state_manager.robot

Variables  ../data/variables.py

*** Variables ***

${POWER_URI}  ${CONTROL_URI}/power0/

*** Test Cases ***

Verify PGood When Power On Using REST
    [Documentation]  Verify pgood state on good power supply.
    [Tags]  Verify_PGood_When_Power_On_Using_REST

    # Initiate Host poweron using rest commands.
    Initiate Host Boot  1
    ${data}=  Read Attribute  ${POWER_URI}  pgood

    Should Be Equal As Integers  ${data}  1

Verify PGood When Power Off Using REST
    [Documentation]  Verify pgood state on bad power supply.
    [Tags]  Verify_PGood_When_Power_Off_Using_REST

    # Initiate Host poweroff using rest commands.
    Initiate Host PowerOff  1
    ${data}=  Read Attribute  ${POWER_URI}  pgood

    Should Be Equal As Integers  ${data}  0

Verify PGood When Power On Using IPMI
    [Documentation]  Verify pgood state when power on using IPMI.
    [Tags]  Verify_PGood_When_Power_On_Using_IPMI

    # Initiate Host poweron using IPMI commands.
    Initiate Host Boot Via External IPMI
    ${data}=  Read Attribute  ${POWER_URI}  pgood

    Should Be Equal As Integers  ${data}  1

Verify PGood When Power Off Using IPMI
    [Documentation]  Verify pgood state when power off using IPMI.
    [Tags]  Verify_PGood_When_Power_Off_Using_IPMI

    # Initiate Host poweroff using IPMI commands.
    Initiate Host PowerOff Via External IPMI
    ${data}=  Read Attribute  ${POWER_URI}  pgood

    Should Be Equal As Integers  ${data}  0
{'fraction_non_alphanumeric': 0.07689379520365436, 'fraction_numerical': 0.0049486105824134, 'mean_word_length': 3.4242424242424243, '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': '300289', 'n_tokens_mistral': 844, 'n_tokens_neox': 827, 'n_words': 288}