Comment 0 for bug 1663541

Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote : Avoid constructing the whole resources tree at connect()

This bug is related to [0] which points out that python-redfish is extremely verbose, perhaps, this one describes the reason for that.

Basically, as soon as you invoke connect()[1] python-redfish will follow pretty much all links to the resources in the Redfish tree and build objects from it, even if you only need to get a single one (say one System, which represents a "Node" in Ironic).

One thing that I've learned working in Ironic is that BMCs are fragile, I worry about the way things are architected in python-redfish because a simple connect could hammer the BMC with many requests at once, the more resources you have, say 1000 Systems, this is going to be 1001 requests at startup (Note, there's more resources than systems, there are Managers and also Chassis, they all count).

Back to [0], the example I'm using here I have only 1 System, 1 Chassis and 1 Manager [2] and only with this few python-redfish produces 1000+ lines of debug code (mostly for dumping the representation of the objects it creates) and 21 requests [3].

[0] https://bugs.launchpad.net/python-redfish/+bug/1662896
[1] For example:

  import redfish
  redfish.connect(...)

[2] http://paste.openstack.org/show/598363/
[3] http://paste.openstack.org/show/598366/

More info:
----------

The tests are running the Redfish simulator version 1.0.0 (DSP2043), direct link: https://www.dmtf.org/sites/default/files/standards/documents/DSP2043_1.0.0.zip

With the mockup server: https://github.com/DMTF/Redfish-Mockup-Server/blob/master/redfishMockupServer.py