Skip to content

Commit 0a643ec

Browse files
ozgengreenbonebot
authored andcommitted
fix: allow v224 alive tests in next target requests
1 parent 1dd05e5 commit 0a643ec

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

gvm/protocols/gmp/_gmpnext.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
Tasks,
3535
WebApplicationTargets,
3636
)
37+
from .requests.v224 import AliveTest as AliveTestV224
3738
from .requests.v224 import HostsOrdering
3839

3940

@@ -1398,7 +1399,7 @@ def create_target(
13981399
smb_credential_id: EntityID | None = None,
13991400
esxi_credential_id: EntityID | None = None,
14001401
snmp_credential_id: EntityID | None = None,
1401-
alive_test: str | AliveTest | None = None,
1402+
alive_test: str | AliveTest | AliveTestV224 | None = None,
14021403
allow_simultaneous_ips: bool | None = None,
14031404
reverse_lookup_only: bool | None = None,
14041405
reverse_lookup_unify: bool | None = None,
@@ -1461,7 +1462,7 @@ def modify_target(
14611462
smb_credential_id: EntityID | None = None,
14621463
esxi_credential_id: EntityID | None = None,
14631464
snmp_credential_id: EntityID | None = None,
1464-
alive_test: AliveTest | str | None = None,
1465+
alive_test: str | AliveTest | AliveTestV224 | None = None,
14651466
allow_simultaneous_ips: bool | None = None,
14661467
reverse_lookup_only: bool | None = None,
14671468
reverse_lookup_unify: bool | None = None,

gvm/protocols/gmp/requests/next/_targets.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from gvm.xml import XmlCommand
1212

1313
from .._entity_id import EntityID
14+
from ..v224 import AliveTest as AliveTestV224
1415

1516

1617
class AliveTest(Enum):
@@ -72,7 +73,7 @@ def create_target(
7273
smb_credential_id: EntityID | None = None,
7374
esxi_credential_id: EntityID | None = None,
7475
snmp_credential_id: EntityID | None = None,
75-
alive_test: str | AliveTest | None = None,
76+
alive_test: str | AliveTest | AliveTestV224 | None = None,
7677
allow_simultaneous_ips: bool | None = None,
7778
reverse_lookup_only: bool | None = None,
7879
reverse_lookup_unify: bool | None = None,
@@ -189,7 +190,7 @@ def modify_target(
189190
smb_credential_id: EntityID | None = None,
190191
esxi_credential_id: EntityID | None = None,
191192
snmp_credential_id: EntityID | None = None,
192-
alive_test: AliveTest | str | None = None,
193+
alive_test: str | AliveTest | AliveTestV224 | None = None,
193194
allow_simultaneous_ips: bool | None = None,
194195
reverse_lookup_only: bool | None = None,
195196
reverse_lookup_unify: bool | None = None,

0 commit comments

Comments
 (0)