Feat: Enhance NetworkManager EventTargetParser targets#930
Open
niccoloalfredo wants to merge 1 commit into
Open
Feat: Enhance NetworkManager EventTargetParser targets#930niccoloalfredo wants to merge 1 commit into
niccoloalfredo wants to merge 1 commit into
Conversation
This was referenced Oct 31, 2025
Member
|
Checked commit sourcesense@8c8a595 with ruby 3.1.7, rubocop 1.56.3, haml-lint 0.64.0, and yamllint app/models/manageiq/providers/openstack/network_manager/event_target_parser.rb
spec/models/manageiq/providers/openstack/network_manager/event_target_parser_spec.rb
|
Member
|
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix NetworkManager EventTargetParser for Neutron event payload structure
Summary
Fixes the
EventTargetParserinNetworkManagerto correctly extract resource IDs from Neutron events. The current implementation assumes a flat payload structure with a directresource_idfield, but Neutron uses nested payloads where resources are contained in type-specific objects.Problem
Current behavior:
Actual Neutron payload structure:
{ "payload": { "network": { "id": "b39598c6-e36e-4d8c-82c9-d295addcf82c", "tenant_id": "fd2f0bf534504696a8fb62ca84f4e191", ... } } }Solution
Key Changes
1. Added
resource_typehelper:Extracts
"network"from"network.create.end"automatically.2. Added intelligent
resource_idextraction:payload.dig("network", "id")3. Replaced
if/elsifchain withcasestatement:4. Enhanced tenant ID extraction:
Searches multiple locations for tenant/project ID in nested structures.
Testing
Manual testing with real Neutron events via AMQP:
Updated spec tests: