Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator fail to check property with "type" : "null" #51

Closed
VertivHugo opened this issue Sep 6, 2018 · 7 comments
Closed

Validator fail to check property with "type" : "null" #51

VertivHugo opened this issue Sep 6, 2018 · 7 comments

Comments

@VertivHugo
Copy link

Property "UefiTargetBootSourceOverride" definition in schema is:

"UefiTargetBootSourceOverride": {
    "description": "This property is the UEFI Device Path of the device to boot from when BootSourceOverrideTarget is UefiTarget.",
    "longDescription": "The value of this property shall be the UEFI device path of the override boot target. The valid values for this property are specified through the Redfish.AllowableValues annotation. BootSourceOverrideEnabled = Continuous is not supported for UEFI Boot Source Override as this setting is defined in UEFI as a one time boot only.",
    "readonly": false,
    "type": [
        "string",
        "null"
    ]
}

The real implementation of value "UefiTargetBootSourceOverride" in redfish service is:

"Boot": {
        "BootSourceOverrideEnabled": "Disabled",
        "BootSourceOverrideTarget": "None",
        "UefiTargetBootSourceOverride"": null,
        "BootSourceOverrideMode": "Legacy"
}

The condition option in porfile to validate property "UefiTargetBootSourceOverride" is:

"UefiTargetBootSourceOverride": {
    "ReadRequirement": "Recommended",
    "ConditionalRequirements": [{
        "Purpose": "If UEFI mode is selected, must allow for UEFI target.",
        "CompareProperty": "BootSourceOverrideMode",
        "CompareType": "Equal",
        "CompareValues": ["UEFI"],
        "ReadRequirement": "Mandatory",
        "Comparison": "AnyOf",
        "Values": ["None", "RDOC1", "RDOC2"]
    }]              
}

Whatever the value of "Values" i set into conditioin option is ["Test1", "Test2"], ["null", "Test1", "Test2"], [null, "Test1", "Test2"] or ["None", "Test1", "Test2"] to validate property "UefiTargetBootSourceOverride".
The Validator result is always return fail and the error message is:

TypeError: argument of type 'NoneType' is not iterable
ERROR - Could not finish validation check on this payload

How to config condition option to process ["type" : "null"] property?
@tomasg2012
Copy link
Contributor

tomasg2012 commented Sep 6, 2018

I don't think there's sufficient debug information to diagnose this if I ask for a log with --debug_logging. Does this happen if UefiTargetBootSourceOverride is not null?

I will try to test this with a mockup and see what the problem is. Is this particular profile you're using public?

@VertivHugo
Copy link
Author

Attach the log file which add "--debug_logging" option for more debug information. I had reduce some useless messages for upload the file. If any missing, please kindly let me know.
InteropLog_09_07_2018_152217.txt
When the value of property "UefiTargetBootSourceOverride" is not null, the Validation's result is no problem.

@tomasg2012
Copy link
Contributor

Would you be able to test this with the branch update-interop-bugfix ?

@mraineri
Copy link
Contributor

@VertivHugo have you been able to run the change @tomasg2012 has pointed out?

@mraineri
Copy link
Contributor

The change has actually been put into master, so the fix should be in place now.

@VertivHugo
Copy link
Author

The issue has been solved at latest version of code. Thanks for help.

@VertivHugo
Copy link
Author

Close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants