1*** Settings ***
2Documentation       Utility for getting/reading Secure Boot related settings.
3Resource            ../../lib/open_power_utils.robot
4Resource            ../../lib/utils.robot
5Resource            ../../lib/state_manager.robot
6Resource            ../../lib/boot_utils.robot
7Library             ../../lib/bmc_ssh_utils.py
8
9*** Keywords ***
10
11Set TPMEnable Policy
12    [Documentation]  Enable or disable TPM Policy.
13    [Arguments]  ${tpm_policy}
14
15    # Description of argument(s):
16    # tpm_policy  Enable-1 or Disable-0.
17
18    ${value_dict}=  Create Dictionary  data=${tpm_policy}
19    Write Attribute  ${CONTROL_HOST_URI}/TPMEnable  TPMEnable
20    ...  data=${value_dict}
21
22
23Set And Verify TPM Policy
24    [Documentation]  Enable or disable and verify TPM Policy.
25    [Arguments]  ${tpm_policy}
26
27    # Description of argument(s):
28    # tpm_policy  Enable-1 or Disable-0.
29
30    Set TPMEnable Policy  ${tpm_policy}
31    Verify The Attribute  ${CONTROL_URI}/host0/TPMEnable  TPMEnable  ${tpm_policy}
32