Skip to content

Added filtering functionality to subscription creation#16

Open
andersong-precisionOT wants to merge 3 commits intoopenshift-telco:mainfrom
andersong-precisionOT:main
Open

Added filtering functionality to subscription creation#16
andersong-precisionOT wants to merge 3 commits intoopenshift-telco:mainfrom
andersong-precisionOT:main

Conversation

@andersong-precisionOT
Copy link
Copy Markdown

@andersong-precisionOT andersong-precisionOT commented Jan 14, 2025

Added:
CreateNotificationStreamFiltered()
NewCreateSubscriptionFiltered()
Filter field to struct CreateSubscriptionData

Filters are passed in as a string to the CreateNotificationStreamFiltered function.
The string should have no newlines and be in XML format, containing the filter tag and all desired components inside of it.
Ex. filter := "<filter><severity>critical</severity></filter>"
Filtering otherwise follows standard NETCONF rules

Addresses issue #13

Filtered stream added to operations.go
Filter options added to notification.go
@adetalhouet
Copy link
Copy Markdown
Contributor

Hi @andersong-precisionOT thank you for the contribution. Instead of duplicating the functions, can you parameterize the existing one? Thanks

@andersong-precisionOT
Copy link
Copy Markdown
Author

Hi @andersong-precisionOT thank you for the contribution. Instead of duplicating the functions, can you parameterize the existing one? Thanks

Just pushed this. Only reason it wasn't implemented like this to begin with was concerns with backwards compatibility.

@adetalhouet
Copy link
Copy Markdown
Contributor

@hanengarcia can you merge this please?

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