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 cannot download correct Volume schema #508

Open
JojoWu19 opened this issue Jul 21, 2022 · 6 comments
Open

Validator cannot download correct Volume schema #508

JojoWu19 opened this issue Jul 21, 2022 · 6 comments

Comments

@JojoWu19
Copy link

Now, validator cannot specify where to download schema files. If there is no schema file in the schema_directory, validator download the last released package of schema files from publish uri and then download other schema files (e.g., oem or swordfish) that are specified in the OData metadata. But Volume_v1.xml(v1_6_2) already is in the last released package, valodator cannot download the newer version from redfish service by described in the OData metadata. How to let validator download the specified schema file?

@JojoWu19
Copy link
Author

Is this issue working as design? or is there any workaround to let it normal?
We also try to prepare correct schema files in the schema directory, but there is below error:

...
Traceback (most recent call last):
  File "/home3/jojo/DMTF/Service_Validator/redfish_service_validator/RedfishServiceValidator.py", line 146, in main
    currentService = traverse.rfService(vars(args))
  File "/home3/jojo/DMTF/Service_Validator/redfish_service_validator/traverse.py", line 75, in __init__
    self.catalog = catalog.SchemaCatalog(self.config['metadatafilepath'])
  File "/home3/jojo/DMTF/Service_Validator/redfish_service_validator/catalog.py", line 104, in __init__
    schema = SchemaDoc(f.read(), self, my_name)
  File "/home3/jojo/DMTF/Service_Validator/redfish_service_validator/catalog.py", line 181, in __init__
    reftags = edmxTag.find_all("Reference", recursive=False)
AttributeError: 'NoneType' object has no attribute 'find_all'
Service could not be started: AttributeError("'NoneType' object has no attribute 'find_all'",)
Try running the Redfish Protocol Validator to ensure the service meets basic protocol conformance

@mraineri
Copy link
Contributor

This is due to how Volume is ultimately produced by SNIA, but the DMTF republishes the file in its 8010 package. Unfortunately there may be gaps in time where the 8010 contents contain an older version than what SNIA has published. The workaround for the tools would be to download the latest Volume_v1.xml file from SNIA and put it in the schema directory created by the tool. We'll need to fix this long term though.

The exception is not something I've seen before though, but I also haven't tested with the latest Volume schema from SNIA.

@JojoWu19
Copy link
Author

@mraineri , thank for your response, and yes, if this issue can be solved, it is helpful.

The exception is raised when I launch validator with cleaning schema_directory and copy all csdl schema files (Redfish, SNIA and OEM) in it.

@mraineri
Copy link
Contributor

Are you only copying over Volume, or everything SNIA has published?

I tried Volume 1.8.0 and did not recreate the exception.

@JojoWu19
Copy link
Author

I find that the exception is raised when SchemaFiles/metadata includes non-schema files like Makefile.am. Now, I can prepare correct schema files as a workaround. Maybe, validator could enhance to ignore non-schema files here.
@mraineri , thank for your help again.

@mraineri
Copy link
Contributor

Yes, we should certainly enhance the validator to skip over those types of files.

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

2 participants