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

Improve handling of get_aggregates #107

Merged
merged 5 commits into from
Mar 7, 2019
Merged

Improve handling of get_aggregates #107

merged 5 commits into from
Mar 7, 2019

Conversation

wiegandm
Copy link
Member

@wiegandm wiegandm commented Mar 7, 2019

Make the handling of the get_aggregates GMP command consistent with the
handling of other GMP commands.

This includes verifying that parameters required in GMP are present and contain
a valid value.

The get_aggregates GMP command allows many optional
parameters
.
The optional parameters can be passed as kwargs key-value pairs, but are
currently not validated.

Checklist:

The `get_aggregates` command in GMP requires a `type` attribute defining
the type of resource to gather data from. This commit implements this on
`python-gvm` side and validates the type against a list retrieved from
the `type_filter_columns ()` function in `gvmd/src/manage_sql.c`.
@codecov
Copy link

codecov bot commented Mar 7, 2019

Codecov Report

Merging #107 into master will increase coverage by 0.13%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #107      +/-   ##
==========================================
+ Coverage   96.18%   96.31%   +0.13%     
==========================================
  Files          10       10              
  Lines        2412     2418       +6     
==========================================
+ Hits         2320     2329       +9     
+ Misses         92       89       -3
Impacted Files Coverage Δ
gvm/protocols/gmpv7.py 99.73% <100%> (+0.15%) ⬆️

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 3a0a7a5...193dc01. Read the comment docs.

@wiegandm wiegandm marked this pull request as ready for review March 7, 2019 12:53
@wiegandm wiegandm requested review from a team and bjoernricks March 7, 2019 12:53
Copy link
Member

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

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

Nice. Thanks a lot!

@bjoernricks bjoernricks merged commit dd76259 into greenbone:master Mar 7, 2019
@wiegandm wiegandm deleted the get_aggregates branch March 7, 2019 13:23
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.

None yet

2 participants