Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

feat: extract enricher data from config #97

Merged
merged 23 commits into from
Aug 19, 2021

Conversation

lstoppa
Copy link
Contributor

@lstoppa lstoppa commented Jul 29, 2021

No description provided.

- initial commit
@github-actions
Copy link
Contributor

github-actions bot commented Jul 29, 2021

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@lstoppa
Copy link
Contributor Author

lstoppa commented Jul 29, 2021

I have read the Code of Conduct and I hereby accept the Terms

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2021

Codecov Report

Merging #97 (302face) into develop (7699591) will increase coverage by 11.86%.
The diff coverage is 80.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop      #97       +/-   ##
============================================
+ Coverage    40.33%   52.19%   +11.86%     
============================================
  Files           22       28        +6     
  Lines          838     1071      +233     
============================================
+ Hits           338      559      +221     
- Misses         500      512       +12     
Impacted Files Coverage Δ
splunk_connect_for_snmp_poller/manager/poller.py 0.00% <ø> (ø)
splunk_connect_for_snmp_poller/mongo.py 0.00% <0.00%> (ø)
..._connect_for_snmp_poller/manager/task_utilities.py 20.83% <25.64%> (+2.22%) ⬆️
splunk_connect_for_snmp_poller/manager/tasks.py 38.09% <51.85%> (+38.09%) ⬆️
tests/test_utils.py 68.18% <88.88%> (+8.18%) ⬆️
...ect_for_snmp_poller/manager/static/mib_enricher.py 89.74% <89.74%> (ø)
..._for_snmp_poller/manager/realtime/interface_mib.py 97.95% <100.00%> (+0.08%) ⬆️
...poller/manager/static/interface_mib_utililities.py 100.00% <100.00%> (ø)
splunk_connect_for_snmp_poller/utilities.py 37.25% <100.00%> (+8.36%) ⬆️
tests/test_config_input_data.py 100.00% <100.00%> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7699591...302face. Read the comment docs.

- sanitizers (formatting)
@lstoppa
Copy link
Contributor Author

lstoppa commented Jul 29, 2021

I have read the Code of Conduct and I hereby accept the Terms

1 similar comment
@lstoppa
Copy link
Contributor Author

lstoppa commented Jul 29, 2021

I have read the Code of Conduct and I hereby accept the Terms

- sanitizers (formatting, again)
@lstoppa
Copy link
Contributor Author

lstoppa commented Jul 29, 2021

I have read the Code of Conduct and I hereby accept the Terms

@lstoppa lstoppa changed the base branch from main to develop July 29, 2021 12:19
- sanitizers: json files cannot have comments, however our sanitizer wants our json
  files to have comments. We changed json to jsoncomment in order to add those required
  comments.
@lstoppa
Copy link
Contributor Author

lstoppa commented Jul 29, 2021

I have read the Code of Conduct and I hereby accept the Terms

- sanitizers: json files cannot have comments, however our sanitizer wants our json
  files to have comments. We changed json to jsoncomment in order to add those required
  comments (part #2)
- sanitizers: json files cannot have comments, however our sanitizer wants our json
  files to have comments. We changed json to jsoncomment in order to add those required
  comments (part #3)
- added integration code: now, we can extract fields, based on the configuration file we have
- some lint sort error
- added support for basic mongo operations and enricher
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has totally checked 207 files.

Valid Invalid Ignored Fixed
38 4 165 0
Click to see the invalid file list
  • tests/mib_walk_data/if_mib_walk.json
  • tests/mib_walk_data/if_mib_walk_invalid_indexes.json
  • tests/mib_walk_data/if_mib_walk_invalid_networks.json
  • tests/test_mib_enricher.py

tests/test_mib_enricher.py Show resolved Hide resolved
omrozowicz-splunk and others added 11 commits August 10, 2021 11:02
* feat: ADDON-37033 (implement bulk operation for non-oid profiles)

* add ObjectType/ObjectIdentity casting of oid values for bulk action

* delete debug lines

* add info loggers

* 1. remove debug logs
2. small refactor
3. add unit tests

* change get to walk

* fix walk/get mismatch

* update get method

* update mib_string_handler

* revert commented lines

* fix casting bug

* fix bulk for * oids

* refactor and change unit tests

* update unit tests

* add casting for get varbinds

* code refactor with black

* Update tests/test_tasks.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* add mock for mib_string_handler in unit tests

* rename get_data, walk_handler and get_handler

* add mocking for imports in unit tests

* add mocking for imports in unit tests

* reformat code

* cleanup unit tests

* reorganize imports in test file

* format imports

* attempt to fix linter workflow

* attempt to fix linter workflow

* attempt to fix linter workflow

* implement _any_failures_happened function to avoid duplicates

* format task_utilities file

* format task_utilities file

* change mib_string_handler description from snmpwalk to snmpbulkwalk

* add casting for variable in a single get scenario

Co-authored-by: lstoppa <77723162+lstoppa@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- initial commit
- sanitizers (formatting)
- sanitizers (formatting, again)
- sanitizers: json files cannot have comments, however our sanitizer wants our json
  files to have comments. We changed json to jsoncomment in order to add those required
  comments.
- sanitizers: json files cannot have comments, however our sanitizer wants our json
  files to have comments. We changed json to jsoncomment in order to add those required
  comments (part #2)
- sanitizers: json files cannot have comments, however our sanitizer wants our json
  files to have comments. We changed json to jsoncomment in order to add those required
  comments (part #3)
- added integration code: now, we can extract fields, based on the configuration file we have
- some lint sort error
- added support for basic mongo operations and enricher
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

Expected release notes (by @omrozowicz-splunk)

features:
undefined variable bug fix (302face)
apply comments from PR (1c478c3)
extract IF-MIB data from an SNMPWALK (#96) (7699591)
support polling the same IP address using multiple profiles (#92) (a6320ca)

fixes:
lint (ADDON-39581) - added support for basic mongo operations and enricher (361fedd)
lint (ADDON-39580) - some lint sort error (1d37271)
lint (ADDON-39580) - added integration code: now, we can extract fields, based on the configuration file we have (02e11bd)
lint (ADDON-39580) - sanitizers: json files cannot have comments, however our sanitizer wants our json files to have comments. We changed json to jsoncomment in order to add those required comments (part #3) (d133b8f)
lint (ADDON-39580) - sanitizers: json files cannot have comments, however our sanitizer wants our json files to have comments. We changed json to jsoncomment in order to add those required comments (part #2) (6378565)
lint (ADDON-39580) - sanitizers: json files cannot have comments, however our sanitizer wants our json files to have comments. We changed json to jsoncomment in order to add those required comments. (21f07c0)
lint (ADDON-39580) - sanitizers (formatting, again) (11cc16e)
lint (ADDON-39580) - sanitizers (formatting) (6d07fd3)
lint (ADDON-39580) - initial commit (047424d)
lint (ADDON-39581) - added support for basic mongo operations and enricher (b2ef85c)
lint (ADDON-39580) - some lint sort error (23e75b4)
lint (ADDON-39580) - added integration code: now, we can extract fields, based on the configuration file we have (ae3647e)
lint (ADDON-39580) - sanitizers: json files cannot have comments, however our sanitizer wants our json files to have comments. We changed json to jsoncomment in order to add those required comments (part #3) (220f7e8)
lint (ADDON-39580) - sanitizers: json files cannot have comments, however our sanitizer wants our json files to have comments. We changed json to jsoncomment in order to add those required comments (part #2) (41a4c39)
lint (ADDON-39580) - sanitizers: json files cannot have comments, however our sanitizer wants our json files to have comments. We changed json to jsoncomment in order to add those required comments. (f1abfb7)
lint (ADDON-39580) - sanitizers (formatting, again) (9285510)
lint (ADDON-39580) - sanitizers (formatting) (1c921ba)
lint (ADDON-39580) - initial commit (f92aa4f)
forced commit for creating new release (f3081c1)

others (will not be included in Semantic-Release notes):
8663dc1 Update tests/test_mib_enricher.py
33acbbf feat: Replace multiple SNMP walks with one SNMP Bulk (#100)
ebe3ebf Feature/redo walk (#95)
d5879c5 Stubs for lint
9cff184 Stubs for lint
adddbea Stubs for lint
5dc1549 Stubs for lint
2c5a5c3 Feat/multiple profiles2 (#93)

  • I hereby acknowledge these release notes are 🥙 AWESOME 🥙

@weliasz weliasz merged commit 123864f into develop Aug 19, 2021
@weliasz weliasz deleted the feature/add-static-mongo-data branch August 19, 2021 10:10
@github-actions github-actions bot locked and limited conversation to collaborators Aug 19, 2021
@ryanfaircloth
Copy link
Contributor

🎉 This PR is included in version 1.5.0-develop.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants