Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NMS-15595: PersistRegexSelectorStrategy only works on string attributes #6274

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

Bonrob2
Copy link
Contributor

@Bonrob2 Bonrob2 commented Jun 26, 2023

Added note in the that the data collection resource types topic that PersistRegexSelectorStrategy only works on string attributes.

All Contributors

Contribution Checklist

  • Please make an issue in the OpenNMS issue tracker if there isn't one already.
    Once there is an issue, please:
    1. update the title of this PR to be in the format: ${JIRA-ISSUE-NUMBER}: subject of pull request
    2. update the Jira link at the bottom of this comment to refer to the real issue number
    3. prefix your commit messages with the issue number, if possible
    4. once you've created this PR, please link to it in a comment in the Jira issue
      Don't worry if this sounds like a lot, we can help you get things set up properly.
  • If this code is likely to affect the UI, did you name your branch with -smoke in it to trigger smoke tests?
  • If this is a new or updated feature, is there documentation for the new behavior?
  • If this is new code, are there unit and/or integration tests?
  • If this PR targets a foundation-* branch, does it try to avoid changing files in $OPENNMS_HOME/etc/?

What's Next?

A PR should be assigned at least 2 reviewers. If you know that someone would be a good person to review your code, feel free to add them.

If you need help making additions or changes to the documentation related to your changes, please let us know.

In any case, if anything is unclear or you want help getting your PR ready for merge, please don't hesitate to say something in the comments here,
or in the #opennms-development chat channel.

Once reviewer(s) accept the PR and the branch passes continuous integration, the PR is eligible for merge.

At that time, if you have commit access (are an OpenNMS Group employee or a member of the OGP) you are welcome to merge the PR when you're ready.
Otherwise, a reviewer can merge it for you.

Thanks for taking time to contribute!

External References

Added note in the that the data collection resource types topic that PersistRegexSelectorStrategy only works on string attributes.
@ProjectJYL
Copy link
Contributor

I've tested the persist regex selector before. My results show filtering only works on string attributes. @mmahacek Can you confirm this?

Copy link
Contributor

@mmahacek mmahacek left a comment

Choose a reason for hiding this comment

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

Per

public void visitAttribute(CollectionAttribute attribute) {
if (!attribute.getType().isNumeric()) {
context.setVariable(attribute.getName(), attribute.getStringValue());
}
}
, only non-numeric attributes are evaluated.

@Bonrob2 Bonrob2 merged commit 533fa9d into foundation-2023 Jun 26, 2023
3 of 4 checks passed
@Bonrob2 Bonrob2 deleted the jira/NMS-15595 branch June 26, 2023 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants