Skip to content

Commit

Permalink
Add other options too
Browse files Browse the repository at this point in the history
  • Loading branch information
saberlynx committed Nov 26, 2020
1 parent 65b530d commit 330fbdb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Added
* get_nvt command requests preferences [#348](https://github.com/greenbone/python-gvm/pull/348)
* get_nvt command requests all details [#348](https://github.com/greenbone/python-gvm/pull/348)
### Changed
* added the `audits` parameter to `get_policy` [#345](https://github.com/greenbone/python-gvm/pull/345)
### Deprecated
Expand Down
2 changes: 2 additions & 0 deletions gvm/protocols/gmpv7/gmpv7.py
Original file line number Diff line number Diff line change
Expand Up @@ -3447,6 +3447,8 @@ def get_nvt(self, nvt_oid: str):
# for single entity always request all details
cmd.set_attribute("details", "1")
cmd.set_attribute("preferences", "1")
cmd.set_attribute("preference_count", "1")
cmd.set_attribute("timeout", "1")
return self._send_xml_command(cmd)

def get_nvt_families(self, *, sort_order: Optional[str] = None):
Expand Down
5 changes: 4 additions & 1 deletion tests/protocols/gmpv7/testcmds/test_get_nvt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def test_get_nvt_with_nvt_oid(self):
self.gmp.get_nvt(nvt_oid='nvt_oid')

self.connection.send.has_been_called_with(
'<get_nvts nvt_oid="nvt_oid" details="1" preferences="1"/>'
(
'<get_nvts nvt_oid="nvt_oid" details="1" '
'preferences="1" preference_count="1" timeout="1"/>'
)
)

def test_get_nvt_missing_nvt_oid(self):
Expand Down

0 comments on commit 330fbdb

Please sign in to comment.