blob: eacaae31d59194469b2ff9839c1ab8cc25db8ca2 [file] [log] [blame]
Rahul Maheshwaric84f30c2019-07-30 00:29:04 -05001*** Settings ***
2
3Documentation Module to test IPMI asset tag functionality.
4Resource ../lib/ipmi_client.robot
5Resource ../lib/openbmc_ffdc.robot
Rahul Maheshwari9a0f50d2019-09-17 06:03:44 -05006Library ../lib/gen_robot_valid.py
Rahul Maheshwaric84f30c2019-07-30 00:29:04 -05007
Rahul Maheshwari9a0f50d2019-09-17 06:03:44 -05008Suite Setup Redfish.Login
9Suite Teardown Redfish.Logout
Rahul Maheshwaric84f30c2019-07-30 00:29:04 -050010Test Teardown FFDC On Test Case Fail
11
Rahul Maheshwari9a0f50d2019-09-17 06:03:44 -050012
Rahul Maheshwaric84f30c2019-07-30 00:29:04 -050013*** Test Cases ***
14
15Set Asset Tag With Valid String Length
16 [Documentation] Set asset tag with valid string length and verify.
17 [Tags] Set_Asset_Tag_With_Valid_String_Length
18 # Allowed MAX characters length for asset tag name is 63.
19 ${random_string}= Generate Random String 63
20 Run Keyword Run IPMI Standard Command dcmi set_asset_tag ${random_string}
21
22 ${asset_tag}= Run Keyword Run IPMI Standard Command dcmi asset_tag
23 Should Contain ${asset_tag} ${random_string}
24
25
26Set Asset Tag With Invalid String Length
27 [Documentation] Verify error while setting invalid asset tag via IPMI.
28 [Tags] Set_Asset_Tag_With_Invalid_String_Length
29 # Any string more than 63 character is invalid for asset tag.
30 ${random_string}= Generate Random String 64
31
32 ${resp}= Run Keyword And Expect Error * Run IPMI Standard Command
33 ... dcmi set_asset_tag ${random_string}
34 Should Contain ${resp} Parameter out of range ignore_case=True
Rahul Maheshwari9a0f50d2019-09-17 06:03:44 -050035
36
37Set Asset Tag With IPMI And Verify With Redfish
38 [Documentation] Set valid asset tag via IPMI and verify using Redfish.
39 [Tags] Set_Asset_Tag_With_IPMI_And_Verify_With_Redfish
40
41 ${random_string}= Generate Random String 63
42 Run Keyword Run IPMI Standard Command dcmi set_asset_tag ${random_string}
43
44 ${asset_tag}= Redfish.Get Attribute ${SYSTEM_BASE_URI} AssetTag
45 Valid Value asset_tag ['${random_string}']