blob: 753507ec18b6d70d3807daf510670f6b1976e395 [file] [log] [blame]
Rahul Maheshwarifdd5ff62017-08-01 04:15:03 -05001*** Settings ***
2Documentation This suite is for testing general IPMI functions.
3
4Resource ../../lib/ipmi_client.robot
5Resource ../../lib/openbmc_ffdc.robot
6
7Test Teardown FFDC On Test Case Fail
8
9*** Variables ***
10
11*** Test Cases ***
12
13Set Asset Tag With Valid String Length
14 [Documentation] Set asset tag with valid string length and verify.
15 [Tags] Set_Asset_Tag_With_Valid_String_Length
16
17 # Allowed MAX characters length for asset tag name is 63.
18 ${random_string}= Generate Random String 63
19 Run Keyword Run IPMI Standard Command dcmi set_asset_tag ${random_string}
20
21 ${asset_tag}= Run Keyword Run IPMI Standard Command dcmi asset_tag
22 Should Contain ${asset_tag} ${random_string}
23
24
25Set Asset Tag With Invalid String Length
26 [Documentation] Verify error while setting invalid asset tag via IPMI.
27 [Tags] Set_Asset_Tag_With_Invalid_String_Length
28
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
35
36
37Set Asset Tag With Valid String Length Via REST
38 [Documentation] Set valid asset tag via REST and verify.
39 [Tags] Set_Asset_Tag_With_Valid_String_Length_Via_REST
40
41 ${random_string}= Generate Random String 63
42 ${args}= Create Dictionary data=${random_string}
43 Write Attribute /xyz/openbmc_project/inventory/system AssetTag
44 ... data=${args}
45
46 ${asset_tag}= Read Attribute /xyz/openbmc_project/inventory/system
47 ... AssetTag
48 Should Be Equal As Strings ${asset_tag} ${random_string}
49
50
51*** Keywords ***