Repository: greenbone/python-gvm

Issue:
get_tasks function does not accept ignore_pagination parameter 
<!--
If reporting an issue please try to provide the information asked below.

Before reporting an issue please:

1. make sure that you're using the latest published GVM components for the
   release you are using: https://community.greenbone.net/t/about-the-source-edition-gse-category/176.
2. check the list of issues whether it isn't already reported.
3. be aware that this is not a support forum. If your issue is more a question
   than a bug report, please use https://community.greenbone.net/c/gmp instead.
-->

### Expected behavior
as described here , get_tasks should accept the ignore_pagination parameter. using python modules the parameter is not recognized

https://docs.greenbone.net/API/GMP/gmp-21.4.html#command_get_tasks
https://greenbone.github.io/python-gvm/api/gmpv224.html#gvm.protocols.gmpv224.Gmp.get_tasks

### Current behavior
it's not possible to specify the value as input to the variable, nor is it possible to specify the page to be obtained.

### Steps to reproduce
```
from gvm.connections import UnixSocketConnection
from gvm.protocols.gmp import Gmp
from gvm.transforms import EtreeTransform
from gvm.xml import pretty_print

connection = UnixSocketConnection()
transform = EtreeTransform()

with Gmp(connection, transform=transform) as gmp:
    gmp.authenticate(gmp_user, gmp_password)
    tasks = gmp.get_tasks(ignore_pagination = True)
```

### GVM versions

**gmp:** 22.4

Hints from issue comments:

Solution patch:
diff --git a/gvm/protocols/gmp/_gmp224.py b/gvm/protocols/gmp/_gmp224.py
index b897c304..a09d7e89 100644
--- a/gvm/protocols/gmp/_gmp224.py
+++ b/gvm/protocols/gmp/_gmp224.py
@@ -3805,6 +3805,7 @@ class GMPv224(GvmProtocol[T]):
         trash: Optional[bool] = None,
         details: Optional[bool] = None,
         schedules_only: Optional[bool] = None,
+        ignore_pagination: Optional[bool] = None,
     ) -> T:
         """Request a list of tasks
 
@@ -3815,6 +3816,8 @@ class GMPv224(GvmProtocol[T]):
             details: Whether to include full task details
             schedules_only: Whether to only include id, name and schedule
                 details
+            ignore_pagination: Whether to ignore pagination settings (filter
+                terms "first" and "rows"). Default is False.
         """
         return self._send_and_transform_command(
             Tasks.get_tasks(
@@ -3823,6 +3826,7 @@ class GMPv224(GvmProtocol[T]):
                 trash=trash,
                 details=details,
                 schedules_only=schedules_only,
+                ignore_pagination=ignore_pagination,
             )
         )
 
diff --git a/gvm/protocols/gmp/requests/v224/_tasks.py b/gvm/protocols/gmp/requests/v224/_tasks.py
index 9adeb8db..4f73922d 100644
--- a/gvm/protocols/gmp/requests/v224/_tasks.py
+++ b/gvm/protocols/gmp/requests/v224/_tasks.py
@@ -200,6 +200,7 @@ class Tasks:
         trash: Optional[bool] = None,
         details: Optional[bool] = None,
         schedules_only: Optional[bool] = None,
+        ignore_pagination: Optional[bool] = None,
     ) -> Request:
         """Request a list of tasks
 
@@ -210,6 +211,8 @@ class Tasks:
             details: Whether to include full task details
             schedules_only: Whether to only include id, name and schedule
                 details
+            ignore_pagination: Whether to ignore pagination settings (filter
+                terms "first" and "rows"). Default is False.
         """
         cmd = XmlCommand("get_tasks")
         cmd.set_attribute("usage_type", "scan")
@@ -225,6 +228,9 @@ class Tasks:
         if schedules_only is not None:
             cmd.set_attribute("schedules_only", to_bool(schedules_only))
 
+        if ignore_pagination is not None:
+            cmd.set_attribute("ignore_pagination", to_bool(ignore_pagination))
+
         return cmd
 
     @classmethod


Test patch:
diff --git a/tests/protocols/gmp/requests/v224/test_tasks.py b/tests/protocols/gmp/requests/v224/test_tasks.py
index 2e6194e1..f14a7f2b 100644
--- a/tests/protocols/gmp/requests/v224/test_tasks.py
+++ b/tests/protocols/gmp/requests/v224/test_tasks.py
@@ -453,6 +453,19 @@ class TasksTestCase(unittest.TestCase):
             b'<get_tasks usage_type="scan" schedules_only="0"/>',
         )
 
+    def test_get_tasks_with_ignore_pagination(self):
+        request = Tasks().get_tasks(ignore_pagination=True)
+        self.assertEqual(
+            bytes(request),
+            b'<get_tasks usage_type="scan" ignore_pagination="1"/>',
+        )
+
+        request = Tasks().get_tasks(ignore_pagination=False)
+        self.assertEqual(
+            bytes(request),
+            b'<get_tasks usage_type="scan" ignore_pagination="0"/>',
+        )
+
     def test_get_task(self):
         request = Tasks().get_task("task_id")
         self.assertEqual(
diff --git a/tests/protocols/gmpv224/entities/tasks/test_get_tasks.py b/tests/protocols/gmpv224/entities/tasks/test_get_tasks.py
index b41e11d0..44247fc8 100644
--- a/tests/protocols/gmpv224/entities/tasks/test_get_tasks.py
+++ b/tests/protocols/gmpv224/entities/tasks/test_get_tasks.py
@@ -53,3 +53,16 @@ class GmpGetTasksTestMixin:
         self.connection.send.has_been_called_with(
             b'<get_tasks usage_type="scan" schedules_only="1"/>'
         )
+
+    def test_get_tasks_with_ignore_pagination(self):
+        self.gmp.get_tasks(ignore_pagination=True)
+
+        self.connection.send.has_been_called_with(
+            b'<get_tasks usage_type="scan" ignore_pagination="1"/>'
+        )
+
+        self.gmp.get_tasks(ignore_pagination=False)
+
+        self.connection.send.has_been_called_with(
+            b'<get_tasks usage_type="scan" ignore_pagination="0"/>'
+        )