Skip to content

Action to shutdown all servers in hypervisor#445

Draft
jose-caballero wants to merge 3 commits into
mainfrom
action_to_shutdown_all_servers_in_hypervisor
Draft

Action to shutdown all servers in hypervisor#445
jose-caballero wants to merge 3 commits into
mainfrom
action_to_shutdown_all_servers_in_hypervisor

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?

The function should first find the entire list of servers on that
hypervisor, using the openstack query library.
Then, calls the api function to shut down a list of servers,
passing the list of Server IDs.

Note on the implementation:
* due to the current implementation of function run() in
  actions/src/openstack_actions.py, any function in workflows/ directory
  can accept as input argument either an openstack.Connection() object or
  a cloud_account name, but not both.
  In this case, we need both: the cloud_account name for the query function
  to find the servers and the connection object for the function to shut them down.
  We extract the cloud_account value from the connection object.
@jose-caballero jose-caballero marked this pull request as draft May 26, 2026 08:49
@jose-caballero jose-caballero force-pushed the action_to_shutdown_all_servers_in_hypervisor branch from 93ca650 to 8aa6839 Compare May 26, 2026 08:59
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.

1 participant