-
Notifications
You must be signed in to change notification settings - Fork 5
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
Enable and Disable Hypervisor in Openstack StacksStorm Action #289
Conversation
I created two actions, one for enabling and disabling the Nova Compute service on a Hypervisor. This passes the user inputs into a workflow which calls the openstack api to disable the spesified service.
Installing my repo/actions failed on the action, testing what needs fixing.
Cleaned up the type hints, print statements and renamed the workflow to follow a more generic name for reusibility. Renamed all of the references accordingly.
Unit testing all of the workflows and functions. Also renamed a few files and cleaned up some of the code.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #289 +/- ##
==========================================
+ Coverage 98.24% 98.26% +0.01%
==========================================
Files 239 243 +4
Lines 9028 9105 +77
Branches 529 531 +2
==========================================
+ Hits 8870 8947 +77
Misses 137 137
Partials 21 21 ☔ View full report in Codecov by Sentry. |
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 great. Just some small things.
About comments:
Personally I wouldn't put comments in the code unless you need to explain what a very complicated statement does I.E lambda functions. In your case it's just grouping together blocks of code and naming them. Your code should be understandable by it's structure and layout without comments. Feel free to ignore me if you think they are beneficial to yourself and others.
About the comment I made on raising an error rather than returning none. @anish-mudaraddi Do you have any thoughts on this? I am not completely aware of how the rest of the openstack api is written.
Formatting Co-authored-by: Kalibh Halford <[email protected]>
Formatting Co-authored-by: Kalibh Halford <[email protected]>
Formatting Co-authored-by: Kalibh Halford <[email protected]>
Co-authored-by: Kalibh Halford <[email protected]>
…pack into enable-disable-HV-action
To help user understand if the action has failed. Additional code refactoring.
…pack into enable-disable-HV-action
To help users understand if the action has failed. Additional code refactoring.
Description:
Created the Stackstorm action runner, workflow.py files and api call files to enable and disable hypervisors in openstack using stackstorm. Additionally added the unit tests to test the .py files.
Submitter:
Have you (where applicable):
Reviewer
Does this PR:
lib
directory?lib
layers?