Skip to content

Add functionalities to openstack api - #499

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

Add functionalities to openstack api#499
jose-caballero wants to merge 7 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?

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.
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.20%. Comparing base (b340826) to head (8be2cb9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #499      +/-   ##
==========================================
+ Coverage   99.18%   99.20%   +0.01%     
==========================================
  Files         112      112              
  Lines        2715     2773      +58     
  Branches      336      339       +3     
==========================================
+ Hits         2693     2751      +58     
  Misses         19       19              
  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
@jose-caballero
jose-caballero force-pushed the add_functionalities_to_openstack_api branch from 4c333c8 to 8be2cb9 Compare August 12, 2026 10:42
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