Skip to content

Conversation

@clauspruefer
Copy link
Owner

Pull Request

Description

Backend Method Processing logic is sub-optimal / needs refactoring.

Why

  • No concrete service call data / backend method mapping exists currently
  • Backend methods always must be called after the complete service data mapping (recursion has finished)
  • Only one backend method should be definable

Related Issue

Fixes #39

Type of Change

  • Refactor

@clauspruefer clauspruefer self-assigned this Jan 25, 2026
Copilot AI review requested due to automatic review settings January 25, 2026 08:15
@clauspruefer clauspruefer added the refactor Refactoring needed label Jan 25, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors backend method execution so that the backend method to be executed is defined in service call metadata rather than only in backend configuration, and ties backend methods to class definitions.

Changes:

  • Add ClassMapper.get_class_properties() and refactor ServiceMapper to resolve and invoke a single SYSBackendMethod defined in service call metadata after mapping is complete.
  • Remove legacy SYSBackendMethods configuration from PKI service properties and instead specify SYSBackendMethod per call in service_call_metadata.py.
  • Minor cleanup in ClassHandler.set_json_dict to keep system keys out of generated JSON.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/microesb.py Adds get_class_properties, refactors ServiceMapper.__init__ to drive backend method execution from call metadata, and adjusts JSON generation behavior.
example/02-pki-management/service_properties.py Removes obsolete SYSBackendMethods list; keeps only property and method declarations on classes.
example/02-pki-management/service_call_metadata.py Declares SYSBackendMethod in each service call item to select which backend method to run for each PKI-related service.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI commented Jan 25, 2026

@clauspruefer I've opened a new pull request, #42, to work on those changes. Once the pull request is ready, I'll request review from you.

@clauspruefer clauspruefer merged commit 7df3f66 into main Jan 25, 2026
8 checks passed
@clauspruefer clauspruefer deleted the issue-39 branch January 25, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SysBackendMethods Need (Slight) Refactoring

2 participants