Skip to content

Add function to handle Servers metadata#484

Open
jose-caballero wants to merge 1 commit into
mainfrom
edit_servers_metadata
Open

Add function to handle Servers metadata#484
jose-caballero wants to merge 1 commit into
mainfrom
edit_servers_metadata

Conversation

@jose-caballero

Copy link
Copy Markdown
Contributor

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.

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?

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.
@anish-mudaraddi

anish-mudaraddi commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

these functions are just calling openstacksdk's built-in method .set_server_metadata and .delete_server_metadata and not doing anything else

can't we just call these built-in methods directly in any action/API function that needs to set metadata instead of creating a whole new function that once again verifies that the server exists (slowing down the process by adding an unnecessary API call find_server)

I could see this being useful if you're putting some global validation checks on the properties that is unique to us - but maybe you should just wait until there's a use-case like that before creating these functions? I'm wary of adding more code we need to maintain

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.19%. Comparing base (c774776) to head (9a9a5ef).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #484   +/-   ##
=======================================
  Coverage   99.19%   99.19%           
=======================================
  Files         112      112           
  Lines        2725     2735   +10     
  Branches      338      338           
=======================================
+ Hits         2703     2713   +10     
  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.

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