Skip to content

Add functionalities to openstack api - #499

Open
jose-caballero wants to merge 13 commits into
mainfrom
add_functionalities_to_openstack_api
Open

Add functionalities to openstack api#499
jose-caballero wants to merge 13 commits into
mainfrom
add_functionalities_to_openstack_api

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

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.10%. Comparing base (9052ea3) to head (5a77611).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/apis/openstack_api/openstack_server.py 95.83% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #499      +/-   ##
==========================================
- Coverage   99.19%   99.10%   -0.09%     
==========================================
  Files         112      112              
  Lines        2723     2793      +70     
  Branches      336      340       +4     
==========================================
+ Hits         2701     2768      +67     
- Misses         19       22       +3     
  Partials        3        3              

☔ View full report in Codecov by Harness.
📢 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.

@anish-mudaraddi anish-mudaraddi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

a quick fix - but other than that lgtm

Comment thread lib/apis/openstack_api/openstack_server.py Outdated
Comment thread tests/lib/apis/openstack_api/test_openstack_server.py Outdated
@jose-caballero
jose-caballero force-pushed the add_functionalities_to_openstack_api branch 2 times, most recently from 8be2cb9 to ec619ce Compare August 12, 2026 12:46
Add two functions to manage the metadata (what is displayed in field
"properties" in the output of "openstack server show").

We are going to use the metadata field to mark certain Servers that
require actions.
For example, to mark the Servers that are running an EOL version of the
Operating System and when the user was notified about it.

These 2 functions just perform the set and delete steps. The exact
content and format of the parameters is responsibility of the workflows
code calling them.
Add the code to be able to perform the following actions:
* add a tag to a Server
* remove a tag from a Server
* list of Servers including a given tag

Note that for some of those actions, a very specific microversion of
NOVA is needed. For those cases, we first record the current version, if
that exists, we step temporarily the required microversion, and finally
we restore the original value.

This code is needed for the Hygiene work.
We will mark the Servers we found in some undesired status (e.g. running
a very old version of the OS) with a given tag. Filtering the entire
list of Servers by tag is very fast.
Write a function to get the email address of the User who instantiated
a given Server.

This information will be used to be able to send emails to those Users
when something problematic has been detected on the Servers. For
example, if the Server is running an EOL version of the Operating System
or have been in SHUTOFF state for too long.
@jose-caballero
jose-caballero force-pushed the add_functionalities_to_openstack_api branch from ec619ce to e5483ef Compare August 18, 2026 07:06
It may be possible that, for some hygiene automations,
once we set a Server in SHUTOFF state, we don't want the
user to re-activate it.
We can prevent it by admin-locking it.
Comment thread lib/apis/openstack_api/openstack_server.py Outdated
Comment thread lib/apis/openstack_api/openstack_server.py
Comment thread lib/apis/openstack_api/openstack_server.py Outdated
Comment thread lib/apis/openstack_api/openstack_server.py Outdated
Comment thread lib/apis/openstack_api/openstack_server.py Outdated
Comment thread lib/apis/openstack_api/openstack_server.py
Comment thread lib/apis/openstack_api/openstack_server.py
Comment thread lib/apis/openstack_api/openstack_server.py Outdated
Comment thread lib/apis/openstack_api/openstack_server.py Outdated
Comment thread lib/apis/openstack_api/openstack_server.py Outdated
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.

3 participants