|
@@ 2530-2562 (lines=33) @@
|
| 2527 |
|
|
| 2528 |
|
return self._send_xml_command(cmd) |
| 2529 |
|
|
| 2530 |
|
def get_overrides(self, *, filter=None, filter_id=None, nvt_oid=None, |
| 2531 |
|
task_id=None, details=None, result=None): |
| 2532 |
|
"""Request a list of overrides |
| 2533 |
|
|
| 2534 |
|
Arguments: |
| 2535 |
|
filter (str, optional): Filter term to use for the query |
| 2536 |
|
filter_id (str, optional): UUID of an existing filter to use for |
| 2537 |
|
the query |
| 2538 |
|
nvt_oid (str, optional): OID of a nvt |
| 2539 |
|
task_id (str, optional): UUID of a task |
| 2540 |
|
details (boolean, optional): |
| 2541 |
|
result (boolean, optional): |
| 2542 |
|
|
| 2543 |
|
Returns: |
| 2544 |
|
The response. See :py:meth:`send_command` for details. |
| 2545 |
|
""" |
| 2546 |
|
cmd = XmlCommand('get_overrides') |
| 2547 |
|
|
| 2548 |
|
_add_filter(cmd, filter, filter_id) |
| 2549 |
|
|
| 2550 |
|
if nvt_oid: |
| 2551 |
|
cmd.set_attribute('nvt_oid', nvt_oid) |
| 2552 |
|
|
| 2553 |
|
if task_id: |
| 2554 |
|
cmd.set_attribute('task_id', task_id) |
| 2555 |
|
|
| 2556 |
|
if not details is None: |
| 2557 |
|
cmd.set_attribute('details', _to_bool(details)) |
| 2558 |
|
|
| 2559 |
|
if not result is None: |
| 2560 |
|
cmd.set_attribute('result', _to_bool(result)) |
| 2561 |
|
|
| 2562 |
|
return self._send_xml_command(cmd) |
| 2563 |
|
|
| 2564 |
|
def get_override(self, override_id): |
| 2565 |
|
"""Request a single override |
|
@@ 2394-2426 (lines=33) @@
|
| 2391 |
|
cmd.set_attribute('details', '1') |
| 2392 |
|
return self._send_xml_command(cmd) |
| 2393 |
|
|
| 2394 |
|
def get_notes(self, *, filter=None, filter_id=None, nvt_oid=None, |
| 2395 |
|
task_id=None, details=None, result=None): |
| 2396 |
|
"""Request a list of notes |
| 2397 |
|
|
| 2398 |
|
Arguments: |
| 2399 |
|
filter (str, optional): Filter term to use for the query |
| 2400 |
|
filter_id (str, optional): UUID of an existing filter to use for |
| 2401 |
|
the query |
| 2402 |
|
nvt_oid (str, optional): OID of a nvt |
| 2403 |
|
task_id (str, optional): UUID of a task |
| 2404 |
|
details (boolean, optional): |
| 2405 |
|
result (boolean, optional): |
| 2406 |
|
|
| 2407 |
|
Returns: |
| 2408 |
|
The response. See :py:meth:`send_command` for details. |
| 2409 |
|
""" |
| 2410 |
|
cmd = XmlCommand('get_notes') |
| 2411 |
|
|
| 2412 |
|
_add_filter(cmd, filter, filter_id) |
| 2413 |
|
|
| 2414 |
|
if nvt_oid: |
| 2415 |
|
cmd.set_attribute('nvt_oid', nvt_oid) |
| 2416 |
|
|
| 2417 |
|
if task_id: |
| 2418 |
|
cmd.set_attribute('task_id', task_id) |
| 2419 |
|
|
| 2420 |
|
if not details is None: |
| 2421 |
|
cmd.set_attribute('details', _to_bool(details)) |
| 2422 |
|
|
| 2423 |
|
if not result is None: |
| 2424 |
|
cmd.set_attribute('result', _to_bool(result)) |
| 2425 |
|
|
| 2426 |
|
return self._send_xml_command(cmd) |
| 2427 |
|
|
| 2428 |
|
def get_note(self, note_id): |
| 2429 |
|
"""Request a single note |