[ironic] An approach to removing WSME

Steve Baker sbaker at redhat.com
Thu Jan 30 00:45:40 UTC 2020


I've put together a set of changes for removing WSME which involves 
copying just enough of it into ironic, and I think we need to have the 
conversation about whether this approach is desirable :) This git 
branch[1] finishes with WSME removed and existing tests passing.

Here are some stats about lines of code (not including unit tests, 
calculated with cloc):

4500 wsme/wsme

6000 ironic/ironic/api master

7000 ironic/ironic/api story/1651346

In words, we need 1000 out of 4500 lines of WSME source in order to 
support 6000 lines of ironic specific API code.

Switching to a replacement for WSME would likely touch a good proportion 
of that 6000 lines of ironic specific API code. If we eventually replace 
it with a new library I think it would be easier if the thing being 
replaced is inside the ironic source tree to allow for a gradual 
transition. So this approach could be an end in itself, or it could be a 
step towards the final goal.

My strategy for copying in code was to pull in chunks of required logic 
while removing some unused features (like request pass-through and date 
& time type serialization). I also replaced py2/3 patterns with pure 
py3. There is likely further things which can be removed or refactored 
for simplicity, but what exists currently works.

If there is enough positive feedback for this approach I'll start on 
unit test coverage for the new code.

[1] https://review.opendev.org/#/q/topic:story/1651346




More information about the openstack-discuss mailing list