Skip to content

Commit cf21aa6

Browse files
authored
Merge branch 'main' into log-update
2 parents e34ac90 + c26a40d commit cf21aa6

20 files changed

+41
-29
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## [2.5.0] - 2025-05-16
4+
- Corrected regex pattern for date-time properties
5+
36
## [2.4.9] - 2024-09-27
47
- Added 'requesttimeout' and 'requestattempts' arguments
58

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2016-2024, Contributing Member(s) of Distributed Management Task
3+
Copyright (c) 2016-2025, Contributing Member(s) of Distributed Management Task
44
Force, Inc.. All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without modification,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2016-2024 DMTF. All rights reserved.
1+
Copyright 2016-2025 DMTF. All rights reserved.
22

33
# Redfish Service Validator
44

RedfishServiceValidator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright 2016-2024 DMTF. All rights reserved.
2+
# Copyright 2016-2025 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
44
# https://github.com/DMTF/Redfish-Service-Validator/blob/main/LICENSE.md
55

RedfishServiceValidatorGui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# Copyright 2016-2024 DMTF. All rights reserved.
2+
# Copyright 2016-2025 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
44
# https://github.com/DMTF/Redfish-Service-Validator/blob/main/LICENSE.md
55

redfish_service_validator/RedfishLogo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright Notice:
2-
# Copyright 2016-2024 DMTF. All rights reserved.
2+
# Copyright 2016-2025 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-Service-Validator/blob/main/LICENSE.md
44

55
"""

redfish_service_validator/RedfishServiceValidator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright Notice:
2-
# Copyright 2016-2024 DMTF. All rights reserved.
2+
# Copyright 2016-2025 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-Service-Validator/blob/main/LICENSE.md
44

55
import sys
@@ -16,7 +16,7 @@
1616
from redfish_service_validator.validateResource import validateSingleURI, validateURITree
1717
from redfish_service_validator import tohtml, schema_pack, traverse, logger
1818

19-
tool_version = '2.4.9'
19+
tool_version = '2.5.0'
2020

2121
def validate(argslist=None, configfile=None):
2222
"""Main command

redfish_service_validator/RedfishServiceValidatorGui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright Notice:
2-
# Copyright 2016-2024 DMTF. All rights reserved.
2+
# Copyright 2016-2025 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-Service-Validator/blob/main/LICENSE.md
44

55
"""

redfish_service_validator/catalog.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ def validate_basic(val, my_type, validPattern=None, min=None, max=None):
785785

786786
elif my_type == "Edm.DateTimeOffset":
787787
return RedfishProperty.validate_string(
788-
val, r".*(Z|(\+|-)[0-9][0-9]:[0-9][0-9])")
788+
val, r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|(\+|-)\d{2}:\d{2})")
789789

790790
elif my_type == "Edm.Duration":
791791
return RedfishProperty.validate_string(
@@ -1075,7 +1075,16 @@ def as_json(self):
10751075
base = super().as_json()
10761076
base.update({'Properties': {a: b.as_json() for a, b in self.properties.items()}})
10771077
return base
1078-
1078+
1079+
def act_iterator(self, actions_dict):
1080+
for key, value in actions_dict.items():
1081+
if key.startswith("#"):
1082+
yield value
1083+
elif key == "Oem":
1084+
for oem_key, oem_value in value.items():
1085+
if oem_key.startswith("#"):
1086+
yield oem_value
1087+
10791088
def getLinks(self, collectionlimit={}):
10801089
"""Grab links from our Object
10811090
"""
@@ -1091,13 +1100,13 @@ def getLinks(self, collectionlimit={}):
10911100
if not isinstance(item.Type, RedfishType): continue
10921101
if n == 'Actions':
10931102
new_type = item.Type.catalog.getTypeInCatalog('ActionInfo.ActionInfo')
1094-
for act in item.Value.values():
1095-
if isinstance(act, dict):
1096-
uri = act.get('@Redfish.ActionInfo')
1097-
if isinstance(uri, str):
1098-
my_link = RedfishObject(new_type, 'ActionInfo', item).populate({'@odata.id': uri})
1099-
my_link.InAnnotation = True
1100-
links.append(my_link)
1103+
act_iter = self.act_iterator(item.Value)
1104+
for act in act_iter:
1105+
uri = act.get('@Redfish.ActionInfo')
1106+
if isinstance(uri, str):
1107+
my_link = RedfishObject(new_type, 'ActionInfo', item).populate({'@odata.id': uri})
1108+
my_link.InAnnotation = True
1109+
links.append(my_link)
11011110
if item.Type.IsNav:
11021111
if isinstance(item.Value, list):
11031112
for num, val in enumerate(item.Value):

redfish_service_validator/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright Notice:
2-
# Copyright 2016-2024 DMTF. All rights reserved.
2+
# Copyright 2016-2025 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-Service-Validator/blob/main/LICENSE.md
44

55
import configparser

0 commit comments

Comments
 (0)