Host related testcases in openbmc-test-automation

Jayashree D jayashree-d at hcl.com
Mon Aug 10 15:18:48 AEST 2020


Hi George,

In obmc-console feature, after login to BMC we will run “obmc-console-client” and will give “ENTER” to connect the host by giving username and password.

root at tiogapass:~# obmc-console-client                                        # BMC Execute Command
                                                                                                                           # ENTER
CentOS Linux 8 (Core)
Kernel 5.2.9-91_fbk10_3371_ge007350ae172 on an x86_64

localhost login:                                                                                            # Host Username
Password:                                                                                                     # Host Password

[root at localhost ~]#


We can run obmc-console-client using BMC Execute Command, then ENTER should be given and OS Username and password.
Is there any way to run the above commands “ENTER” in automation scripts after obmc-console-client?

Regards,
Jayashree

From: Jayashree D
Sent: Thursday, August 6, 2020 8:20 PM
To: George Keishing <gkeishin at in.ibm.com>
Cc: openbmc at lists.ozlabs.org
Subject: RE: Host related testcases in openbmc-test-automation

Thanks George, I will look into this keywords.

From: George Keishing <gkeishin at in.ibm.com<mailto:gkeishin at in.ibm.com>>
Sent: Thursday, August 6, 2020 6:12 PM
To: Jayashree D <jayashree-d at hcl.com<mailto:jayashree-d at hcl.com>>
Cc: openbmc at lists.ozlabs.org<mailto:openbmc at lists.ozlabs.org>
Subject: Re: Host related testcases in openbmc-test-automation

[CAUTION: This Email is from outside the Organization. Unless you trust the sender, Don’t click links or open attachments as it may be a Phishing email, which can steal your Information and compromise your Computer.]

Jayashree,

See if this info helps to get you started what you are looking for.

1. OBMC-CONSOLE - To connect the host via BMC, we are using obmc-console-client to login the host and check the host conections.

Most of the test code uses the login BMC/host, check connect via REST/SSH/Ping to do the check on connection

You can look at this keyword used:
Example:

-login to BMC and execute : BMC Execute Command
https://github.com/openbmc/openbmc-test-automation/blob/master/lib/bmc_ssh_utils.py#L12<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Flib%2Fbmc_ssh_utils.py%23L12&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366004707&sdata=FWn1U2v3YL44mE4%2B%2FLQJ58%2BqBSn57YA9qD%2FuZku2Ju4%3D&reserved=0>
https://github.com/openbmc/openbmc-test-automation/blob/master/redfish/extended/test_basic_ci.robot#L74<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Fredfish%2Fextended%2Ftest_basic_ci.robot%23L74&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366004707&sdata=IQhFENJiIkzsS3lEitdpBX6eBInNIUCMd9sO408AF8c%3D&reserved=0>
https://github.com/openbmc/openbmc-test-automation/blob/master/redfish/extended/test_basic_ci.robot#L96<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Fredfish%2Fextended%2Ftest_basic_ci.robot%23L96&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366014703&sdata=ysP5zMeVa7UODKItQ30fDFFu9hjqh8a7WDxjuCc%2Fu1I%3D&reserved=0>
https://github.com/openbmc/openbmc-test-automation/blob/master/redfish/managers/test_certificate.robot#L413<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Fredfish%2Fmanagers%2Ftest_certificate.robot%23L413&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366014703&sdata=M4kpR%2BYUSOhs8v%2Fw8I7aHeR3dvgohKJbLwRLAh9m6e4%3D&reserved=0>
etc...

or simply use something like this:
SSHLibrary.Open connection ${bmc_ip}
SSHLibrary.Login ${openbmc_username} ${openbmc_password}

-login to Host and execute: Login To OS Host / OS Execute Command
https://github.com/openbmc/openbmc-test-automation/blob/master/syslib/utils_os.robot#L38<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Fsyslib%2Futils_os.robot%23L38&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366024696&sdata=hHShdQPoOkLRCt7yKaI5gR0qPXuV%2FNBXJg4qcIwExPE%3D&reserved=0>
https://github.com/openbmc/openbmc-test-automation/blob/master/lib/bmc_ssh_utils.py#L70<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Flib%2Fbmc_ssh_utils.py%23L70&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366024696&sdata=7ICm9BqdcdW38FuPfg6VbIqo5pmQaab44OsvsEmwokk%3D&reserved=0>
etc.

- obmc-console-client: Start SOL Console Logging / Stop SOL Console Logging
https://github.com/openbmc/openbmc-test-automation/blob/master/lib/common_utils.robot#L386<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Flib%2Fcommon_utils.robot%23L386&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366024696&sdata=eI1kuljBHLWVQmXHzCTbX7GWLHeLCPzurllrjPUP6E4%3D&reserved=0>
https://github.com/openbmc/openbmc-test-automation/blob/master/lib/common_utils.robot#L342<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Flib%2Fcommon_utils.robot%23L342&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366034691&sdata=YFLmdwiIpMj%2FxUEHez33Hl2ZF0d8dMZPer0W9CWmEjE%3D&reserved=0>

you can grep/serach around tests / redfish dir, you ll see where and how they are used in the test suite


The test boot keywords to power on /off/ reboot etc are here, https://github.com/openbmc/openbmc-test-automation/blob/master/lib/boot_utils.robot<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Flib%2Fboot_utils.robot&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366034691&sdata=YcAA%2BPQUs7DsjSrpaQBhJVKz07LfVQyoDp3ml2Nx58A%3D&reserved=0>
you'll notice those are used in test to drive the boot and the best part is if you key in these test parameter from robot command line https://github.com/openbmc/openbmc-test-automation/blob/master/lib/resource.robot#L45<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Flib%2Fresource.robot%23L45&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366044688&sdata=kILoPxnQZpSGSdGrS339EOWMO8dnZYkw%2B9VWWlF9Kuk%3D&reserved=0>

it will ensure, to login and check if the Host is up and running as part of the boot keyword



2. HOST LOGGER - To handle and store host's console output data, such as boot logs.

You can use the above SOL keyword to collect the data for Host boot logs
You can as well use IPMI SOL capabilities
https://github.com/openbmc/openbmc-test-automation/blob/master/lib/ipmi_client.robot#L188<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Flib%2Fipmi_client.robot%23L188&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366044688&sdata=2H7q16WAl5rlqSqS4gkabyYtf90hMhIsEyGLdT9gdv0%3D&reserved=0>
https://github.com/openbmc/openbmc-test-automation/blob/master/lib/ipmi_client.robot#L204<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Flib%2Fipmi_client.robot%23L204&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366044688&sdata=RAX2hmIi%2BHWID3fTK%2BCcFIl0vDwx0yH2cUwbPsxWYnQ%3D&reserved=0>

FFDC collects those data as well : https://github.com/openbmc/openbmc-test-automation/blob/master/lib/openbmc_ffdc.robot#L39<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc-test-automation%2Fblob%2Fmaster%2Flib%2Fopenbmc_ffdc.robot%23L39&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366054681&sdata=jexRdnu8b%2B6YRSv%2B%2FmHOTw9V6CrD4pcRpQ7TWw%2FjoBw%3D&reserved=0>





Thanks and Regards,
George Keishing



[Inactive hide details for Jayashree D ---06-08-2020 04:08:09 PM---Hi All, I need to test the below features in openbmc-test-aut]Jayashree D ---06-08-2020 04:08:09 PM---Hi All, I need to test the below features in openbmc-test-automation.

From: Jayashree D <jayashree-d at hcl.com<mailto:jayashree-d at hcl.com>>
To: "openbmc at lists.ozlabs.org<mailto:openbmc at lists.ozlabs.org>" <openbmc at lists.ozlabs.org<mailto:openbmc at lists.ozlabs.org>>
Date: 06-08-2020 04:08 PM
Subject: [EXTERNAL] Host related testcases in openbmc-test-automation
Sent by: "openbmc" <openbmc-bounces+gkeishin=in.ibm.com at lists.ozlabs.org<mailto:openbmc-bounces+gkeishin=in.ibm.com at lists.ozlabs.org>>

________________________________



Hi All,

I need to test the below features in openbmc-test-automation.
Is there any related testcases to verify those features?

1. OBMC-CONSOLE - To connect the host via BMC, we are using obmc-console-client to login the host and check the host conections.
(https://github.com/openbmc/obmc-console<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fobmc-console&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366054681&sdata=8yio%2FtiZMhyCj%2BFGZUwh5A61JderIRlD%2BUsrxqGk%2B0M%3D&reserved=0>)

2. HOST LOGGER - To handle and store host's console output data, such as boot logs.
(https://github.com/openbmc/phosphor-hostlogger<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fphosphor-hostlogger&data=02%7C01%7Cjayashree-d%40hcl.com%7C8553afa8ad3d4c09cdf808d83a062596%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637323145366064674&sdata=2%2FWbQyTInkJrEHUXJD4Qh%2BkYDjWPturq0mjKTOfs06s%3D&reserved=0>)


Regards,
Jayashree

::DISCLAIMER::

________________________________
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.
________________________________


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200810/745a9923/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 105 bytes
Desc: image001.gif
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200810/745a9923/attachment-0001.gif>


More information about the openbmc mailing list