@@ -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 ):
0 commit comments