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

Add boolean "no_details" option to "get_reports()" #129

Merged
merged 3 commits into from
May 20, 2019
Merged

Add boolean "no_details" option to "get_reports()" #129

merged 3 commits into from
May 20, 2019

Conversation

Kars-de-Jong
Copy link
Contributor

@Kars-de-Jong Kars-de-Jong commented May 17, 2019

GMP v7 and up support the undocumented boolean parameter "details", which can be set to "0" to suppress results. As of GMP v8 this is the preferred way of getting a list of reports related to a task, since the reports are no longer included in get_tasks().

This closes #128.

Checklist:

GMP v7 and up support the undocumented boolean parameter "details" to suppress results. As of GMP v8 this is the preferred way of getting a list of reports related to a task, since the reports are no longer included in get_tasks().
@codecov
Copy link

codecov bot commented May 17, 2019

Codecov Report

Merging #129 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #129      +/-   ##
==========================================
+ Coverage    96.4%   96.41%   +<.01%     
==========================================
  Files          10       10              
  Lines        2478     2480       +2     
==========================================
+ Hits         2389     2391       +2     
  Misses         89       89
Impacted Files Coverage Δ
gvm/protocols/gmpv7.py 99.74% <100%> (ø) ⬆️

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 181982d...09bf5fb. Read the comment docs.

@codecov
Copy link

codecov bot commented May 17, 2019

Codecov Report

Merging #129 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #129      +/-   ##
==========================================
+ Coverage    96.4%   96.41%   +<.01%     
==========================================
  Files          10       10              
  Lines        2478     2480       +2     
==========================================
+ Hits         2389     2391       +2     
  Misses         89       89
Impacted Files Coverage Δ
gvm/protocols/gmpv7.py 99.74% <100%> (ø) ⬆️

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 181982d...a1d7252. Read the comment docs.

@Kars-de-Jong Kars-de-Jong marked this pull request as ready for review May 17, 2019 14:15
@Kars-de-Jong Kars-de-Jong requested a review from a team May 17, 2019 14:15
@bjoernricks
Copy link
Contributor

Do I understand your PR correctly that details="1" is the default? Means if the details attribute is not included in the request gvmd assumes it is 1?

@Kars-de-Jong
Copy link
Contributor Author

Kars-de-Jong commented May 17, 2019

Do I understand your PR correctly that details="1" is the default? Means if the details attribute is not included in the request gvmd assumes it is 1?

Yes, it seems to be the default.

Copy link
Contributor

@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.

The PR looks very good!

I am not a fan of the details parameter and therefore I've not added it by intention. But if your use case really requires it, we should merge this PR.

@Kars-de-Jong
Copy link
Contributor Author

It makes quite a big difference in the size of the xml returned, so it would be better for us.

@bjoernricks
Copy link
Contributor

Yes, it seems to be the default.

😒

@bjoernricks bjoernricks requested a review from wiegandm May 17, 2019 14:24
@bjoernricks
Copy link
Contributor

@wiegandm could you take care of this PR next week?

gvm/protocols/gmpv7.py Outdated Show resolved Hide resolved
@wiegandm
Copy link
Member

@bjoernricks Ack.

@Kars-de-Jong, I think the comment should be the other way around, could you please check?

gvm/protocols/gmpv7.py Outdated Show resolved Hide resolved
@Kars-de-Jong Kars-de-Jong changed the title Add boolean "details" option to "get_reports()" Add boolean "no_details" option to "get_reports()" May 20, 2019
@wiegandm wiegandm merged commit 01c7e7f into greenbone:master May 20, 2019
@Kars-de-Jong Kars-de-Jong deleted the add-details-option-to-get-reports branch May 20, 2019 10:44
@bjoernricks
Copy link
Contributor

I really don't like the no_details argument. We need to fix the protocol for this param!

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.

get_reports() doesn't support suppressing result details
3 participants