Some notes on current plugin implementation - Link
Line# - Comment
37,165,170 - installing and using numpy only for random selection? not the best idea
154 - random_combination function, im sure, can be much simpler.
159- using two lists for id and names and matching based on index? not the best idea, use dict
173 - interesting way to find the other set. but does this solution scale for n-split?
177- can instead use dict, consider when extending support for n-split
205, 230 - hardcode. find solution for service discovery
257 - generatePackage returns false if it doesnt work. use if to confirm this (error handling)
261-263, 324 - move hardcode to config.py
271 - change HOST_URL to host
296 - to get the VIM list you can use get_vims_list() function from wrappers.SONATAClient.admin.py
335 - this needs to be supported by adaptor
318 - while doing this, can maintain a dict of all items with fields like ip, name, etc
General Comments
Code can be a little more modular, make functions for repeated tasks (ex rest calls)
Error handling? currently none
Fix hardcodes, at the minimum make a config.py with all the hardcoded values (dirty fix!)
Is it better to have a python pip package instread of having docker services? atleast in the current context
Assumed 2-way split everywhere, nightmare for the next iteration when adding support for more.
Some notes on current plugin implementation - Link
Line# - Comment
37,165,170
- installing and using numpy only for random selection? not the best idea154
- random_combination function, im sure, can be much simpler.159
- using two lists for id and names and matching based on index? not the best idea, use dict173
- interesting way to find the other set. but does this solution scale for n-split?177
- can instead use dict, consider when extending support for n-split205, 230
- hardcode. find solution for service discovery257
- generatePackage returns false if it doesnt work. use if to confirm this (error handling)261-263, 324
- move hardcode to config.py271
- change HOST_URL to host296
- to get the VIM list you can use get_vims_list() function from wrappers.SONATAClient.admin.py335
- this needs to be supported by adaptor318
- while doing this, can maintain a dict of all items with fields like ip, name, etcGeneral Comments