-
Notifications
You must be signed in to change notification settings - Fork 14
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
ENH: Add monitoring script to collect information about VMs in different states #128
Conversation
Added a script for collecting the status of VMs and unit tests. One unit test is still being developed.
Update the main method for collecting stats and add a test for checking an error is raised if a param is missing.
Add limit=10000 param to server queries to search across all projects and to get all servers that match query to be returned
Corrected package import and added missing docstring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked through your tests yet - but I've made comments on how you can use the stuff I already wrote to automatically post to influxdb
Also you'll want to move your test file into the tests folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a few comments
Updated the script based on the changes requested. Includes having a separate method to read the length of the generator object returned by the openstack query and some updates to formatting and unit tests
Add main method so the script can be run to collect data for an influxDB instance
queries were failing on prod because we were asking for too many servers with one call. Implemented a helper function to handle pagination for us
move tests to test folder and convert them to pytest tests add test for main and get_all_server_statuses
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #128 +/- ##
==========================================
+ Coverage 97.93% 98.45% +0.51%
==========================================
Files 50 12 -38
Lines 1844 842 -1002
==========================================
- Hits 1806 829 -977
+ Misses 38 13 -25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
fixed a bug and added fixed tests These scripts are now working with prod I'm not going for full test coverage for |
add return type and docstring to run_server_query
Adds a new script for collecting information about VMs in different states with unit tests