|
Post by rajeeranjan on Jul 3, 2023 11:58:28 GMT
Hi, We are trying to do basic validation for all the Redfish Properties based on data types. For e.g. - for numeric properties -> range based validation
- for string properties -> pattern validation using regex
- for enum properties -> check if current value is one of the possible values
- for boolean -> the value should either be true or false.
With Redfish Service Validator, we can do these validations based on the schema, but it's too generalized. Is there any other tool which can take input from user and do properties' value validation ? This is what we are thinking of doing -> The plan is to enhance DMTF's redfish service validator to do this. A csv can be used which has all the properties which needs these validation. (Some properties are static and might not need these validation, direct comparison can be done in those cases.) Workflow -> For each property of a resource -> check if property is present is csv -> if the property is present, based on data type, pick the columns and do the respective validation. (similar to what the tool is already based on schema) Possible columns which I can think of-> "URI", "Property","Max", "Min", "PossibleEnumValues(Format- ["xyz", "abc"]", "RegexPattern" Any suggestion on optimizing it, or can anyone help me with an alternate solution to this problem. Thanks, Rajeev
|
|
|
Post by mraineri on Jul 5, 2023 12:47:02 GMT
Your specific usage does go further than we planned for the Redfish Service Validator, and we have not planned to perform additional testing like that for the Redfish Service Validator. Standard properties are defined in a way to cover all possible types of products, so it's really a superset of all possibilities.
However, a Redfish profile should cover this use cases. In a Redfish profile, you can specify constraints on particular properties in resources to ones expected in your application. Unfortunately regex types of checking isn't supported today, but it seems like all of your other use cases are supported. For example, for the SystemType property in ComputerSystem, you can specify the following to enforce that only "Physical" and "Virtual" are allowed values for SystemType:
"PropertyRequirements": { "SystemType": { "Comparison": "AnyOf", "Values": [ "Physical", "Virtual ] } } And with the Redfish-Interop-Validator, you can test your service with the profile you constructed with your set of requirements.
|
|
|
Post by rajeeranjan on Jul 17, 2023 17:58:06 GMT
Thanks for your reply. Just a quick question-> can we do post/patch method validation using Redfish-Interop-Validator?
|
|
|
Post by mraineri on Jul 17, 2023 19:01:00 GMT
We have an outstanding issue (https://github.com/DMTF/Redfish-Interop-Validator/issues/18) to add that sort of testing to the Interop Validator. Unfortunately we have yet to come up with a "safe" method of modifying arbitrary properties in a manner that will ensure we don't break the system under test. The testing right now is entirely read-only.
|
|
|
Post by rajeeranjan on Jul 19, 2023 18:55:52 GMT
Is there any redfish profile already published by DMTF or any other sample profiles which can be used as reference for creating a new one ? There's nothing published here : redfish.dmtf.org/profiles
|
|
|
Post by mraineri on Jul 19, 2023 20:10:00 GMT
|
|
|
Post by rajeeranjan on Jul 24, 2023 16:22:18 GMT
Do we have any tool which can generate profiles for interop validator ?
|
|
|
Post by mraineri on Jul 26, 2023 15:00:27 GMT
No tools; these have been produced by hand to date.
|
|