Skip to content

Commit 87fd3fc

Browse files
committed
change exception
Signed-off-by: dw035535 <diane.wang@broadcom.com>
1 parent c496c46 commit 87fd3fc

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

windows/check_os_fullname/check_os_fullname.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# SPDX-License-Identifier: BSD-2-Clause
33
---
44
# Description:
5-
# This test case is used for check VM guest fullname and guest ID
6-
# are reported correctly in the VM guest info through VMware Tools.
7-
# When VMware Tools is not installed or not running in VM,
8-
# this test case result is 'Blocked'.
5+
# This test case is used for checking VM guest OS fullname
6+
# and guest OS ID are reported correctly in the VM guest info
7+
# by VMware Tools. When VMware Tools is not installed or not
8+
# running in the guest OS, this test case result is 'Blocked'.
99
#
1010
- name: check_os_fullname
1111
hosts: localhost
@@ -21,7 +21,7 @@
2121
- name: "Get VM guest info"
2222
include_tasks: ../../common/vm_get_guest_info.yml
2323

24-
- name: "Set fact of the pre-defined guest OS info"
24+
- name: "Set fact of the pre-defined guest OS info list"
2525
include_tasks: win_guest_os_info.yml
2626

2727
- name: "Print the guest OS info before checking"
@@ -32,6 +32,7 @@
3232
- "OS fullname got in VM guest info: {{ guestinfo_guest_full_name }}"
3333
- "VM guest ID configured: {{ vm_guest_id }}"
3434
- "VM guest ID got in VM guest info: {{ guestinfo_guest_id }}"
35+
- "VM hardware version: {{ vm_hardware_version }}"
3536

3637
- name: "Set fact of current OS name"
3738
ansible.builtin.set_fact:
@@ -45,15 +46,15 @@
4546
ansible.builtin.assert:
4647
that:
4748
- current_gos_info
48-
fail_msg:
49-
- "The pre-defined guest OS info list does not contain this OS version: {{ current_gos }},"
50-
- "please check whether this guest OS is supported and add it's info to the list accordingly."
49+
fail_msg: >
50+
"The pre-defined guest OS info list does not contain this OS version: {{ current_gos }},
51+
please check whether this guest OS is supported and add it to the list accordingly."
5152
52-
- name: "Check whether meet the conditions of known issue"
53+
- name: "Handle Windows 11 known issue"
5354
include_tasks: win11_guest_info_exception.yml
5455

5556
- name: "Check guest fullname in VM guest info"
56-
include_tasks: check_guest_info.yml
57+
include_tasks: check_vm_guest_info.yml
5758
when: win11_70u3c_exception is undefined
5859
rescue:
5960
- name: "Test case failure"
File renamed without changes.

windows/check_os_fullname/win11_guest_info_exception.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: BSD-2-Clause
33
---
44
# On ESXi 7.0U3c, guest fullname is 'Windows 11 Enterprise, 64-bit (Build xxxxx)',
5-
# guest ID is empty.
5+
# guest ID is empty in VM guest info.
66
#
77
- name: "Set fact of the exception of Windows 11 guest fullname"
88
ansible.builtin.set_fact:
@@ -12,6 +12,8 @@
1212
- esxi_version is version('7.0.3', '=')
1313
- esxi_build == "19193900"
1414
- vmtools_version is version('12.0.0', '>=')
15+
- guestinfo_guest_id == ''
16+
- guestinfo_guest_full_name is search('Build')
1517

1618
- name: "Known issue - incorrect/empty guestID in guest info of Windows 11"
1719
ansible.builtin.debug:
@@ -20,4 +22,6 @@
2022
- "Please refer to https://knowledge.broadcom.com/external/article?legacyId=86517."
2123
tags:
2224
- known_issue
23-
when: win11_70u3c_exception is defined and win11_70u3c_exception
25+
when:
26+
- win11_70u3c_exception is defined
27+
- win11_70u3c_exception

0 commit comments

Comments
 (0)