-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFE: Continue breaking out quads.py #25
Comments
@jtaleric thank you for the suggestions, we're always welcome to improvements in design and structure. We'll chip away at this, possibly breaking them up into smaller pieces (we want to avoid large changesets for obvious reasons). |
Sounds good will, please keep this issue updated so I can track it here. I will discuss further ideas with @kambiz-aghaiepour. |
@kambiz-aghaiepour Furthermore, I would break out the expect script https://github.com/redhat-performance/quads/blob/master/bin/juniper-set-port.exp and convert that to pyexpect. Also, I would use the same methodology above for this. Ie create a networking.py, and then a juniper.py which inherits networking.py. |
* split off the class definition and add additional class definitions to allow for more modular approach. * Also looking to add an easy way to switch the backend data storage into a database. Related-To: #25 Change-Id: I88abb0d465598aa1ea5666d6b28baf4037160400
This part is completed. We are keeping this open and are chipping away at it. |
This change includes a number of improvements and some bug fixes. In terms of code aesthetics: * get rid of the [excessive] exit() calls in the quads library routines. Ideally quads object class methods should operate on data, and return code or error status. Program execution should not be terminated. * As opposed to printing results to the screen, return results in an array. This will allow the calling party to decide on how to manage data. * If the data file is modified since it was read, add a method to determine if it is necessary to reread the data. * Use BasicHTTPServer to allow for GET and PUT methods to read data. The benefit here is significant improvement in query times. Also the quads-daemon becomes the "gatekeeper" and authoritative source of data (for reads as well as writes) * Setup a quads-daemon service file. * quads-cli is fully compatible with quads.py, but uses the quads-daemon service. Minor bug fixes: * bin/quads-validate-env.sh If the schedule.yaml file was being updated while this script is launched a race condition is possible causing misleading emails to be generated with bogus content. The script is updated to avoid this condition (note using the daemon would avoid the issue as well). * It was previously possible to set the start date / time on a host schedule to be after the end date! (simple fix) * The color map was no longer usefule in simple-table-generator.py Fixes: #66 Fixes: #67 Fixes: #68 Fixes: #69 related-to: #25 Change-Id: I646c59b2e9efbaf99cc79f168867c461ec7d40c3
This adds checks to ensure that all the hosts in a given environment have completed their build state. If there are any hosts that have not finished building, then the network validation tests are skipped and the error is reported. Once the host builds are completed, then the network validation tests are run. Both have to pass for the environment to be released to the user. related-to: #25 fixes: #48 Change-Id: Ie6df8df17ffbe84e42ba63f895dcae5c3074c547
A lot of things have changed since this was last filed, I don't think it's relevant any longer and most of the ideas behind this have been implemented. I think a better place to watch the more pythonic enhancements is going to be these RFE here: Above, we're going to see a full move from a legacy API built around SimpleHTTPServer and a move into CherryPy. We'll also see a new API that's fully RESTful put in place and lastly a move away from manipulating locking, reads and writes of flat files into a proper ODM with mongo documents. |
Based on a conversation I had with @kambiz-aghaiepour here are my suggestions for yet another change for quads.py.
Currently QUADs.py is a huge python class that tackles many things. I would suggest breaking out the the following, to ease further development and allow a plugin model.
I also recommended getting rid of all the bash scripts so you can easily switch out hammer for some other tool to execute a like command, ie beaker.
I would also recommend moving the code base into a lib/ instead of bin/ -- You can create a bin/quads.py that imports the quads lib, imports the config and executes the main method.
The text was updated successfully, but these errors were encountered: