Skip to content

Add method to shutdown server#441

Open
jose-caballero wants to merge 2 commits into
mainfrom
add_method_to_shutdown_server
Open

Add method to shutdown server#441
jose-caballero wants to merge 2 commits into
mainfrom
add_method_to_shutdown_server

Conversation

@jose-caballero
Copy link
Copy Markdown
Contributor

Description:

Special Notes:


Submitter:

Have you (where applicable):

  • Added unit tests?
  • Checked the latest commit runs on Dev?
  • Updated the example config file(s) and README?

Reviewer

Does this PR:

  • Place non-StackStorm code into the lib directory?
  • Have unit tests for the action/sensor and lib layers?
  • Have clear and obvious action parameter names and descriptions?

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 65.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.43%. Comparing base (c94154f) to head (2318af3).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
lib/apis/openstack_api/openstack_server.py 65.00% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #441      +/-   ##
==========================================
- Coverage   99.69%   99.43%   -0.27%     
==========================================
  Files         109      109              
  Lines        2648     2667      +19     
  Branches      332      335       +3     
==========================================
+ Hits         2640     2652      +12     
- Misses          7       13       +6     
- Partials        1        2       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread lib/apis/openstack_api/openstack_server.py Outdated
@DavidFair
Copy link
Copy Markdown
Collaborator

Also there's no way to test this code using ST2 - could you add action yamls to wrap both calls so I can test on a dev ST2 instance?

Copy link
Copy Markdown
Collaborator

@DavidFair DavidFair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this a formal review

Needs unit testing (even in the PR template)
Needs to be runnable on a dev instance else we're working on hopes and prayers (again in the PR template)

Before we accept code into ST2 where it can run on a prod instance with elevated permissions automatically in the future....

@jose-caballero jose-caballero force-pushed the add_method_to_shutdown_server branch 2 times, most recently from 4266b4e to 77eda60 Compare May 21, 2026 16:01
Add a new function to shutdown a single VM or server.
This function will be used on new actions. For example, to shutdown all
servers in a given hypervisor.

A unit test function to validate that an Exception is raised when
the servers goes to ERROR state has been implemented.
@jose-caballero jose-caballero force-pushed the add_method_to_shutdown_server branch from c76dcad to 2318af3 Compare May 21, 2026 16:26
@DavidFair DavidFair dismissed their stale review May 21, 2026 16:45

Away and don't want to block this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants