DMTF/Redfish-Mockup-Creator

Stack overflow due to recursive references

JonHass opened this issue · 2 comments

Running Redfish-Mockup-Creator against a Swordfish prototype that includes recursive navigation references is causing stack overflow in Creator. See attached log.

console.txt.zip

After a brief look at the code, I think a fix like this should work:

In function recursive_call(), there a loop: for x in d
For each resource x to be processed, check to see if it is in a set of already processed resources
If yes, continue to the next loop iteration (i.e skip it)
If no, add it the set of processed resources and carry on with the processing

Jon - would someone be able to test a fix against the subject Swordfish prototype?

Assigning to Bill (for development) and Jon (to provide access to an implementation for testing the fix)