Code Duplication    Length = 29-29 lines in 2 locations

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(

gvm/protocols/gmpv208/gmpv208.py 1 location

@@ 1652-1680 (lines=29) @@
1649
        """
1650
        return self.__get_config(policy_id, UsageType.POLICY, tasks=audits)
1651
1652
    def get_tasks(
1653
        self,
1654
        *,
1655
        filter: Optional[str] = None,
1656
        filter_id: Optional[str] = None,
1657
        trash: Optional[bool] = None,
1658
        details: Optional[bool] = None,
1659
        schedules_only: Optional[bool] = None,
1660
    ) -> Any:
1661
        """Request a list of tasks
1662
1663
        Arguments:
1664
            filter: Filter term to use for the query
1665
            filter_id: UUID of an existing filter to use for the query
1666
            trash: Whether to get the trashcan tasks instead
1667
            details: Whether to include full task details
1668
            schedules_only: Whether to only include id, name and schedule
1669
                details
1670
1671
        Returns:
1672
            The response. See :py:meth:`send_command` for details.
1673
        """
1674
        return self.__get_tasks(
1675
            UsageType.SCAN,
1676
            filter=filter,
1677
            filter_id=filter_id,
1678
            trash=trash,
1679
            details=details,
1680
            schedules_only=schedules_only,
1681
        )
1682
1683
    def get_audits(