python-gvm 27.3.1__py3-none-any.whl → 27.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gvm/__version__.py +1 -1
- gvm/protocols/gmp/_gmpnext.py +27 -0
- gvm/protocols/gmp/requests/next/_agent_installer_instructions.py +14 -0
- gvm/protocols/gmp/requests/next/_agents.py +33 -0
- {python_gvm-27.3.1.dist-info → python_gvm-27.5.0.dist-info}/METADATA +1 -1
- {python_gvm-27.3.1.dist-info → python_gvm-27.5.0.dist-info}/RECORD +8 -8
- {python_gvm-27.3.1.dist-info → python_gvm-27.5.0.dist-info}/WHEEL +0 -0
- {python_gvm-27.3.1.dist-info → python_gvm-27.5.0.dist-info}/licenses/LICENSE +0 -0
gvm/__version__.py
CHANGED
gvm/protocols/gmp/_gmpnext.py
CHANGED
|
@@ -65,17 +65,21 @@ class GMPNext(GMPv227[T]):
|
|
|
65
65
|
*,
|
|
66
66
|
scanner_id: EntityID,
|
|
67
67
|
language_type: AgentInstallerInstructionLanguageType,
|
|
68
|
+
origin_url: str,
|
|
68
69
|
) -> T:
|
|
69
70
|
"""Request an agent installer instruction.
|
|
70
71
|
|
|
71
72
|
Args:
|
|
72
73
|
scanner_id: UUID of the Agent controller to get the installer instruction for.
|
|
73
74
|
language_type: Language of the installer instruction.
|
|
75
|
+
origin_url: Origin URL used to generate the executable agent
|
|
76
|
+
installation command.
|
|
74
77
|
"""
|
|
75
78
|
return self._send_request_and_transform_response(
|
|
76
79
|
AgentInstallerInstructions.get_agent_installer_instruction(
|
|
77
80
|
scanner_id=scanner_id,
|
|
78
81
|
language_type=language_type,
|
|
82
|
+
origin_url=origin_url,
|
|
79
83
|
)
|
|
80
84
|
)
|
|
81
85
|
|
|
@@ -302,6 +306,29 @@ class GMPNext(GMPv227[T]):
|
|
|
302
306
|
"""Trigger agents synchronization from all agent controllers."""
|
|
303
307
|
return self._send_request_and_transform_response(Agents.sync_agents())
|
|
304
308
|
|
|
309
|
+
def get_agent_support_bundle(
|
|
310
|
+
self,
|
|
311
|
+
agent_id: EntityID,
|
|
312
|
+
days: int = 0,
|
|
313
|
+
) -> T:
|
|
314
|
+
"""Request a support bundle for an agent.
|
|
315
|
+
|
|
316
|
+
Args:
|
|
317
|
+
agent_id: ID of the agent to get the support bundle for.
|
|
318
|
+
days: Number of days of logs to include. If None, zero is sent so the
|
|
319
|
+
Agent Controller uses its configured default.
|
|
320
|
+
|
|
321
|
+
Raises:
|
|
322
|
+
RequiredArgument: If agent_id is missing.
|
|
323
|
+
ValueError: If days is negative.
|
|
324
|
+
"""
|
|
325
|
+
return self._send_request_and_transform_response(
|
|
326
|
+
Agents.get_agent_support_bundle(
|
|
327
|
+
agent_id,
|
|
328
|
+
days=days,
|
|
329
|
+
)
|
|
330
|
+
)
|
|
331
|
+
|
|
305
332
|
def create_credential_store_credential(
|
|
306
333
|
self,
|
|
307
334
|
name: str,
|
|
@@ -17,12 +17,19 @@ class AgentInstallerInstructions:
|
|
|
17
17
|
cls,
|
|
18
18
|
scanner_id: EntityID,
|
|
19
19
|
language_type: AgentInstallerInstructionLanguageType,
|
|
20
|
+
origin_url: str,
|
|
20
21
|
) -> Request:
|
|
21
22
|
"""Request an agent installer instruction.
|
|
22
23
|
|
|
23
24
|
Args:
|
|
24
25
|
scanner_id: UUID of the Agent controller to get the installer instruction for.
|
|
25
26
|
language_type: Language of the installer instruction.
|
|
27
|
+
origin_url: Origin URL used to generate the executable agent
|
|
28
|
+
installation command.
|
|
29
|
+
|
|
30
|
+
Raises:
|
|
31
|
+
RequiredArgument: If scanner_id, language_type, or origin_url is
|
|
32
|
+
missing.
|
|
26
33
|
"""
|
|
27
34
|
if not scanner_id:
|
|
28
35
|
raise RequiredArgument(
|
|
@@ -36,8 +43,15 @@ class AgentInstallerInstructions:
|
|
|
36
43
|
argument="language_type",
|
|
37
44
|
)
|
|
38
45
|
|
|
46
|
+
if not origin_url:
|
|
47
|
+
raise RequiredArgument(
|
|
48
|
+
function=cls.get_agent_installer_instruction.__name__,
|
|
49
|
+
argument="origin_url",
|
|
50
|
+
)
|
|
51
|
+
|
|
39
52
|
cmd = XmlCommand("get_agent_installer_instruction")
|
|
40
53
|
cmd.set_attribute("scanner_id", str(scanner_id))
|
|
41
54
|
cmd.set_attribute("language", language_type.value)
|
|
55
|
+
cmd.set_attribute("origin_url", origin_url)
|
|
42
56
|
|
|
43
57
|
return cmd
|
|
@@ -431,3 +431,36 @@ class Agents:
|
|
|
431
431
|
def sync_agents(cls) -> Request:
|
|
432
432
|
"""Trigger agents synchronization from all agent controllers."""
|
|
433
433
|
return XmlCommand("sync_agents")
|
|
434
|
+
|
|
435
|
+
@classmethod
|
|
436
|
+
def get_agent_support_bundle(
|
|
437
|
+
cls,
|
|
438
|
+
agent_id: EntityID,
|
|
439
|
+
*,
|
|
440
|
+
days: int = 0,
|
|
441
|
+
) -> Request:
|
|
442
|
+
"""Request a support bundle for an agent.
|
|
443
|
+
|
|
444
|
+
Args:
|
|
445
|
+
agent_id: ID of the agent to get the support bundle for.
|
|
446
|
+
days: Number of days of logs to include. If None, zero is sent so the
|
|
447
|
+
Agent Controller uses its configured default.
|
|
448
|
+
|
|
449
|
+
Raises:
|
|
450
|
+
RequiredArgument: If agent_id is missing.
|
|
451
|
+
ValueError: If days is negative.
|
|
452
|
+
"""
|
|
453
|
+
if not agent_id:
|
|
454
|
+
raise RequiredArgument(
|
|
455
|
+
function=cls.get_agent_support_bundle.__name__,
|
|
456
|
+
argument="agent_id",
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
if days < 0:
|
|
460
|
+
raise ValueError("days must be greater than or equal to zero")
|
|
461
|
+
|
|
462
|
+
cmd = XmlCommand("get_agent_support_bundle")
|
|
463
|
+
cmd.set_attribute("agent_uuid", str(agent_id))
|
|
464
|
+
cmd.set_attribute("days", str(days))
|
|
465
|
+
|
|
466
|
+
return cmd
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-gvm
|
|
3
|
-
Version: 27.
|
|
3
|
+
Version: 27.5.0
|
|
4
4
|
Summary: Library to communicate with remote servers over GMP or OSP
|
|
5
5
|
Project-URL: Homepage, https://github.com/greenbone/python-gvm/
|
|
6
6
|
Project-URL: Repository, https://github.com/greenbone/python-gvm/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
gvm/__init__.py,sha256=Eu3a8hRdlixDFn34Q-BwPXVN65KHpgFk_i0CYUdbfF8,412
|
|
2
|
-
gvm/__version__.py,sha256=
|
|
2
|
+
gvm/__version__.py,sha256=GzAtPVr7ThSUWJKJIoQgXzIb_HJC7xo2yFWz8wB6Erk,103
|
|
3
3
|
gvm/_enum.py,sha256=n--ztwQQW2MU4M9E_4qJrw-32IGc4Laj6auZ8glMw_0,1168
|
|
4
4
|
gvm/errors.py,sha256=FnZoe3ROKlAm8LMJ25uKRaG9cp-SG8hYIVtDMwwp0l0,5263
|
|
5
5
|
gvm/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -27,14 +27,14 @@ gvm/protocols/gmp/_gmp224.py,sha256=NO-ufzkGW1RNzMHrIjlFm7r8QzSH0uRZK5xc9mWLRVI,
|
|
|
27
27
|
gvm/protocols/gmp/_gmp225.py,sha256=3lz_AHTIQdBEr4DIYJ5o9D0Eke-Df3jUb0IZytITRdo,2227
|
|
28
28
|
gvm/protocols/gmp/_gmp226.py,sha256=YqQ7CJIbUtM7s8wQPYX5BgePdhX-tUjCemanW0_DZtE,14543
|
|
29
29
|
gvm/protocols/gmp/_gmp227.py,sha256=-q4Aci1I4FRtLle21qTwtkchE2ixWn1-Kug58X4dU5I,5713
|
|
30
|
-
gvm/protocols/gmp/_gmpnext.py,sha256=
|
|
30
|
+
gvm/protocols/gmp/_gmpnext.py,sha256=DaK7zym4ks5i6vQ0BVbqrhmTLf3w7jVwoo4cL-3J-YQ,58643
|
|
31
31
|
gvm/protocols/gmp/requests/__init__.py,sha256=XH1zSifyz9Rx4FqY2lJ1mwurnUepHk7REZ-fSMC_Wx0,200
|
|
32
32
|
gvm/protocols/gmp/requests/_entity_id.py,sha256=V96VhTg7_CF2AduaAHRYrGgTaOVA8_mG1lFiCl8-CMA,136
|
|
33
33
|
gvm/protocols/gmp/requests/_version.py,sha256=GdHQnEVzJ6PbxoU4pxP36Oze1XvK5llWqB9bkC16Pf8,393
|
|
34
34
|
gvm/protocols/gmp/requests/next/__init__.py,sha256=KXolfKC-eX2DyPvSEYgLT6FSXtrkUyx5v_zAs7gFMBs,4645
|
|
35
35
|
gvm/protocols/gmp/requests/next/_agent_groups.py,sha256=Dqa77vY2U82lG6wkLZfGMIUOHfZW9yCXkFvT3M8bFfo,6275
|
|
36
|
-
gvm/protocols/gmp/requests/next/_agent_installer_instructions.py,sha256=
|
|
37
|
-
gvm/protocols/gmp/requests/next/_agents.py,sha256=
|
|
36
|
+
gvm/protocols/gmp/requests/next/_agent_installer_instructions.py,sha256=wh4LBJVEE3t_Og9uf5Ek_y8MxjtnTcBa2IT4u4JVXg0,1798
|
|
37
|
+
gvm/protocols/gmp/requests/next/_agents.py,sha256=j4UNQmfeH8ToFfA8T4JiPKb4ZGpQy71DL--sbaVXttM,15589
|
|
38
38
|
gvm/protocols/gmp/requests/next/_credential_stores.py,sha256=wgixeHhls_Nvd7lYPE3mra_2vtWFZscm8HCwy4UgUNg,5691
|
|
39
39
|
gvm/protocols/gmp/requests/next/_credentials.py,sha256=9iI2F4rp6TtQdM-OXS9IKN09SZRRLxYeBMcZs-Heo1Q,6107
|
|
40
40
|
gvm/protocols/gmp/requests/next/_integration_configs.py,sha256=j9RospMEU9ErjUzRNHv9tvv0_yRSwMfJdOKNUmJC4rk,3715
|
|
@@ -113,7 +113,7 @@ gvm/protocols/http/openvasd/_notus.py,sha256=FwX5fFsx-FWXf4Rl_5seequkQ6XVS8jZ0NW
|
|
|
113
113
|
gvm/protocols/http/openvasd/_openvasd1.py,sha256=YhV-OJULO4XJJQTsvAyH1ZVc5r1mRmGk2VMotvOoIxg,3896
|
|
114
114
|
gvm/protocols/http/openvasd/_scans.py,sha256=U8aYmHudMQFtVzl9khjNsRRewY0sf8G376zTYZN6HQQ,16667
|
|
115
115
|
gvm/protocols/http/openvasd/_vts.py,sha256=_T4j4SdXe0DthBA7pCehx4FXKYbQyhzpq72YNO4fKt4,2136
|
|
116
|
-
python_gvm-27.
|
|
117
|
-
python_gvm-27.
|
|
118
|
-
python_gvm-27.
|
|
119
|
-
python_gvm-27.
|
|
116
|
+
python_gvm-27.5.0.dist-info/METADATA,sha256=uSZA0ETu5HNOWaMsPLS7m_vxAybl9Ng7fjS0hyM5r-4,5709
|
|
117
|
+
python_gvm-27.5.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
118
|
+
python_gvm-27.5.0.dist-info/licenses/LICENSE,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
|
|
119
|
+
python_gvm-27.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|