Skip to content

Commit c8e02c5

Browse files
authored
Merge pull request #290 from y0urself/rename-details-parameter
Changing the details argument
2 parents 59b84bb + e28c1de commit c8e02c5

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010
### Changed
1111
* Added the `tasks` parameter to `get_config()`. [#289](https://github.com/greenbone/python-gvm/pull/289)
12+
* Renamed `no_details` to `details` in `get_reports()` so it is uniform with all the other calls. [#290](https://github.com/greenbone/python-gvm/pull/290)
1213
### Deprecated
1314
### Removed
1415
### Fixed

gvm/protocols/gmpv7/gmpv7.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3620,7 +3620,7 @@ def get_reports(
36203620
filter_id: Optional[str] = None,
36213621
note_details: Optional[bool] = None,
36223622
override_details: Optional[bool] = None,
3623-
no_details: Optional[bool] = None
3623+
details: Optional[bool] = None
36243624
) -> Any:
36253625
"""Request a list of reports
36263626
@@ -3630,7 +3630,7 @@ def get_reports(
36303630
note_details: If notes are included, whether to include note details
36313631
override_details: If overrides are included, whether to include
36323632
override details
3633-
no_details: Whether to exclude results
3633+
details: Whether to exclude results
36343634
36353635
Returns:
36363636
The response. See :py:meth:`send_command` for details.
@@ -3649,8 +3649,8 @@ def get_reports(
36493649
if override_details is not None:
36503650
cmd.set_attribute("override_details", _to_bool(override_details))
36513651

3652-
if no_details is not None:
3653-
cmd.set_attribute("details", _to_bool(not no_details))
3652+
if details is not None:
3653+
cmd.set_attribute("details", _to_bool(details))
36543654

36553655
cmd.set_attribute("ignore_pagination", "1")
36563656

tests/protocols/gmpv7/testcmds/test_get_reports.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ def test_get_reports_with_override_details(self):
7070
)
7171

7272
def test_get_reports_with_details(self):
73-
self.gmp.get_reports(no_details=False)
73+
self.gmp.get_reports(details=True)
7474

7575
self.connection.send.has_been_called_with(
7676
'<get_reports details="1" ignore_pagination="1"/>'
7777
)
7878

7979
def test_get_reports_without_details(self):
80-
self.gmp.get_reports(no_details=True)
80+
self.gmp.get_reports(details=False)
8181

8282
self.connection.send.has_been_called_with(
8383
'<get_reports details="0" ignore_pagination="1"/>'

0 commit comments

Comments
 (0)