|
@@ 2432-2464 (lines=33) @@
|
| 2429 |
|
|
| 2430 |
|
return self._send_xml_command(cmd) |
| 2431 |
|
|
| 2432 |
|
def get_overrides(self, filter=None, filter_id=None, nvt_oid=None, |
| 2433 |
|
task_id=None, details=None, result=None): |
| 2434 |
|
"""Request a list of overrides |
| 2435 |
|
|
| 2436 |
|
Arguments: |
| 2437 |
|
filter (str, optional): Filter term to use for the query |
| 2438 |
|
filter_id (str, optional): UUID of an existing filter to use for |
| 2439 |
|
the query |
| 2440 |
|
nvt_oid (str, optional): OID of a nvt |
| 2441 |
|
task_id (str, optional): UUID of a task |
| 2442 |
|
details (boolean, optional): |
| 2443 |
|
result (boolean, optional): |
| 2444 |
|
|
| 2445 |
|
Returns: |
| 2446 |
|
The response. See :py:meth:`send_command` for details. |
| 2447 |
|
""" |
| 2448 |
|
cmd = XmlCommand('get_overrides') |
| 2449 |
|
|
| 2450 |
|
_add_filter(cmd, filter, filter_id) |
| 2451 |
|
|
| 2452 |
|
if nvt_oid: |
| 2453 |
|
cmd.set_attribute('nvt_oid', nvt_oid) |
| 2454 |
|
|
| 2455 |
|
if task_id: |
| 2456 |
|
cmd.set_attribute('task_id', task_id) |
| 2457 |
|
|
| 2458 |
|
if not details is None: |
| 2459 |
|
cmd.set_attribute('details', _to_bool(details)) |
| 2460 |
|
|
| 2461 |
|
if not result is None: |
| 2462 |
|
cmd.set_attribute('result', _to_bool(result)) |
| 2463 |
|
|
| 2464 |
|
return self._send_xml_command(cmd) |
| 2465 |
|
|
| 2466 |
|
def get_override(self, override_id): |
| 2467 |
|
"""Request a single override |
|
@@ 2296-2328 (lines=33) @@
|
| 2293 |
|
cmd.set_attribute('details', '1') |
| 2294 |
|
return self._send_xml_command(cmd) |
| 2295 |
|
|
| 2296 |
|
def get_notes(self, filter=None, filter_id=None, nvt_oid=None, |
| 2297 |
|
task_id=None, details=None, result=None): |
| 2298 |
|
"""Request a list of notes |
| 2299 |
|
|
| 2300 |
|
Arguments: |
| 2301 |
|
filter (str, optional): Filter term to use for the query |
| 2302 |
|
filter_id (str, optional): UUID of an existing filter to use for |
| 2303 |
|
the query |
| 2304 |
|
nvt_oid (str, optional): OID of a nvt |
| 2305 |
|
task_id (str, optional): UUID of a task |
| 2306 |
|
details (boolean, optional): |
| 2307 |
|
result (boolean, optional): |
| 2308 |
|
|
| 2309 |
|
Returns: |
| 2310 |
|
The response. See :py:meth:`send_command` for details. |
| 2311 |
|
""" |
| 2312 |
|
cmd = XmlCommand('get_notes') |
| 2313 |
|
|
| 2314 |
|
_add_filter(cmd, filter, filter_id) |
| 2315 |
|
|
| 2316 |
|
if nvt_oid: |
| 2317 |
|
cmd.set_attribute('nvt_oid', nvt_oid) |
| 2318 |
|
|
| 2319 |
|
if task_id: |
| 2320 |
|
cmd.set_attribute('task_id', task_id) |
| 2321 |
|
|
| 2322 |
|
if not details is None: |
| 2323 |
|
cmd.set_attribute('details', _to_bool(details)) |
| 2324 |
|
|
| 2325 |
|
if not result is None: |
| 2326 |
|
cmd.set_attribute('result', _to_bool(result)) |
| 2327 |
|
|
| 2328 |
|
return self._send_xml_command(cmd) |
| 2329 |
|
|
| 2330 |
|
def get_note(self, note_id): |
| 2331 |
|
"""Request a single note |