Code Duplication    Length = 29-29 lines in 2 locations

gvm/protocols/gmpv208/gmpv208.py 1 location

@@ 1620-1648 (lines=29) @@
1617
        """
1618
        return self.__get_config(policy_id, UsageType.POLICY, tasks=audits)
1619
1620
    def get_tasks(
1621
        self,
1622
        *,
1623
        filter: Optional[str] = None,
1624
        filter_id: Optional[str] = None,
1625
        trash: Optional[bool] = None,
1626
        details: Optional[bool] = None,
1627
        schedules_only: Optional[bool] = None,
1628
    ) -> Any:
1629
        """Request a list of tasks
1630
1631
        Arguments:
1632
            filter: Filter term to use for the query
1633
            filter_id: UUID of an existing filter to use for the query
1634
            trash: Whether to get the trashcan tasks instead
1635
            details: Whether to include full task details
1636
            schedules_only: Whether to only include id, name and schedule
1637
                details
1638
1639
        Returns:
1640
            The response. See :py:meth:`send_command` for details.
1641
        """
1642
        return self.__get_tasks(
1643
            UsageType.SCAN,
1644
            filter=filter,
1645
            filter_id=filter_id,
1646
            trash=trash,
1647
            details=details,
1648
            schedules_only=schedules_only,
1649
        )
1650
1651
    def get_audits(

gvm/protocols/gmpv9/gmpv9.py 1 location

@@ 1493-1521 (lines=29) @@
1490
        """
1491
        return self.__get_config(policy_id, UsageType.POLICY, tasks=audits)
1492
1493
    def get_tasks(
1494
        self,
1495
        *,
1496
        filter: Optional[str] = None,
1497
        filter_id: Optional[str] = None,
1498
        trash: Optional[bool] = None,
1499
        details: Optional[bool] = None,
1500
        schedules_only: Optional[bool] = None,
1501
    ) -> Any:
1502
        """Request a list of tasks
1503
1504
        Arguments:
1505
            filter: Filter term to use for the query
1506
            filter_id: UUID of an existing filter to use for the query
1507
            trash: Whether to get the trashcan tasks instead
1508
            details: Whether to include full task details
1509
            schedules_only: Whether to only include id, name and schedule
1510
                details
1511
1512
        Returns:
1513
            The response. See :py:meth:`send_command` for details.
1514
        """
1515
        return self.__get_tasks(
1516
            UsageType.SCAN,
1517
            filter=filter,
1518
            filter_id=filter_id,
1519
            trash=trash,
1520
            details=details,
1521
            schedules_only=schedules_only,
1522
        )
1523
1524
    def get_audits(