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

[Refactor python-gvm API] Step 2: Detach Alerts #458

Merged
merged 14 commits into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Calendar Versioning](https://calver.org)html).
* Introduced new explicit API calls for SecInfo: `get_nvt()`, `get_nvt_list()`, `get_cpe()`, `get_cpe_list()`, `get_cve()`, `get_cve_list()`, `get_cert_bund_advisory()`, `get_cert_bund_advisory_list()`, `get_dnf_cert_advisory()`, `get_dnf_cert_advisory_list()`, `get_oval_definition()`, `get_oval_definition_list()`. [#456](https://github.com/greenbone/python-gvm/pull/456)

### Changed
* Detached the Alerts API calls from the GMP class into a new `AlertsMixin`. [#458](https://github.com/greenbone/python-gvm/pull/458)
* Detached the Notes and Overrides API calls from the GMP class into a new `NotesMixin` and `OverridesMixin`. [#457](https://github.com/greenbone/python-gvm/pull/457)
* Changed the API calls `get_nvt()` and `get_nvts()` to `get_scan_config_nvt()` and `get_scan_config_nvts()`. [#456](https://github.com/greenbone/python-gvm/pull/456)
* Detached the `InfoType` from the GMP types class. [#456](https://github.com/greenbone/python-gvm/pull/456)
Expand Down
10 changes: 10 additions & 0 deletions gvm/protocols/gmpv208/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@
from typing import Any, Callable, Optional

from gvm.protocols.gmpv208.gmpv208 import GmpV208Mixin
from gvm.protocols.gmpv208.entities.alerts import (
AlertCondition,
AlertEvent,
AlertMethod,
AlertsMixin,
get_alert_condition_from_string,
get_alert_event_from_string,
get_alert_method_from_string,
)
from gvm.protocols.gmpv208.entities.port_lists import (
get_port_range_type_from_string,
PortListMixin,
Expand Down Expand Up @@ -67,6 +76,7 @@

class Gmp(
GmpV208Mixin,
AlertsMixin,
NotesMixin,
OverridesMixin,
PortListMixin,
Expand Down
Loading