mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #59619 from mxrss2/59611-bug-windows-server-core-container-grains
Update to RE #59611 -- Server Core Grains issue
This commit is contained in:
commit
14f5b24349
3 changed files with 11 additions and 2 deletions
|
@ -933,7 +933,7 @@ Salt 3002.2 (2020-11-16)
|
|||
|
||||
Fixed
|
||||
-----
|
||||
|
||||
- Fix server core grains issue when running inside a windows container (#59611)
|
||||
- Change dict check to isinstance instead of type() for key_values in file.keyvalue. (#57758)
|
||||
- Fail when func_ret is False when using the new module.run syntax. (#57768)
|
||||
- Fix comparison of certificate values (#58296)
|
||||
|
|
|
@ -1438,7 +1438,9 @@ def _windows_os_release_grain(caption, product_type):
|
|||
release = ""
|
||||
if "Server" in caption:
|
||||
# Edge case here to handle MS Product that doesn't contain a year
|
||||
if re.match(r"^Microsoft Hyper-V Server$", caption):
|
||||
if re.match(
|
||||
r"^Microsoft[^\d]+(Server|Datacenter|Standard|Essentials)$", caption
|
||||
):
|
||||
version = "2019"
|
||||
else:
|
||||
for item in caption.split(" "):
|
||||
|
|
|
@ -1505,6 +1505,13 @@ def test__windows_os_release_grain(subtests):
|
|||
version = core._windows_os_release_grain(caption, 1)
|
||||
assert version == "2019Server"
|
||||
|
||||
# Microsoft Windows Server Datacenter
|
||||
# Issue https://github.com/saltstack/salt/issue/59611
|
||||
caption = "Microsoft Windows Server Datacenter"
|
||||
with subtests.test(caption):
|
||||
version = core._windows_os_release_grain(caption, 1)
|
||||
assert version == "2019Server"
|
||||
|
||||
|
||||
@pytest.mark.skip_unless_on_linux
|
||||
def test_linux_memdata():
|
||||
|
|
Loading…
Add table
Reference in a new issue