Hi, +1 for splitting big files ;-). And maybe we could lower the maximum line count even more after this split (it was set after the cmdlib split to pretty much the size of the biggest file, which probably was backend.py).
For the split, maybe it makes sense to take a look at rpc_defs.py. backend.py essentially only implements all the RPC calls (after they went through noded.py), and the RPC calls are already grouped somehow in rpc_defs.py. I propose to either split according to the groups in rpc_defs.py or to regroup the RPC calls there as well. Please also note that splitting the file might incur quite some work: First you would have to find the appropriate branch to do it (in order to ease merging afterwards, probably 2.8 or 2.9 are fine), then you have to perform the split (including make files etc.) and finally you probably want to split tests as well, so that's cleaned up too. As always, reviews have to be done and the whole work merged up to master afterwards... So I don't know how well that aligns with your GSoC project (as a quickfix, you can always disable the warning for backend.py and file a bug about splitting it). See additional comments inline: On Sat, Aug 17, 2013 at 4:02 PM, Sebastian Gebhard <[email protected]>wrote: > Hi list, > > my current works on OpenvSwitch support require addition of code to > lib/backend.py, which will result in the file having more then 4500 lines, > which will result in a lint error. > > I would propose to split it up into seperate files: > lib/backend/common.py > lib/backend/instance.py > lib/backend/hv.py > What would go in there? There are not so many hypervisor related RPCs, IIRC. > lib/backend/node.py > lib/backend/master.py > What are "master" RPC calls? I mean, pretty much all calls come from the master (except some queries)... > lib/backend/storage.py > > What is your opinion on that? > > Cheers, > Sebastian > > Cheers, Thomas -- Thomas Thrainer | Software Engineer | [email protected] | Google Germany GmbH Dienerstr. 12 80331 München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores
