|
@@ 3188-3219 (lines=32) @@
|
| 3185 |
|
cmd.set_attribute("permission_id", permission_id) |
| 3186 |
|
return self._send_xml_command(cmd) |
| 3187 |
|
|
| 3188 |
|
def get_port_lists( |
| 3189 |
|
self, |
| 3190 |
|
*, |
| 3191 |
|
filter=None, |
| 3192 |
|
filter_id=None, |
| 3193 |
|
details=None, |
| 3194 |
|
targets=None, |
| 3195 |
|
trash=None, |
| 3196 |
|
): |
| 3197 |
|
"""Request a list of port lists |
| 3198 |
|
|
| 3199 |
|
Arguments: |
| 3200 |
|
filter (str, optional): Filter term to use for the query |
| 3201 |
|
filter_id (str, optional): UUID of an existing filter to use for |
| 3202 |
|
the query |
| 3203 |
|
details (boolean, optional): Whether to include full port list |
| 3204 |
|
details |
| 3205 |
|
targets (boolean, optional): Whether to include targets using this |
| 3206 |
|
port list |
| 3207 |
|
trash (boolean, optional): Whether to get port lists in the |
| 3208 |
|
trashcan instead |
| 3209 |
|
|
| 3210 |
|
Returns: |
| 3211 |
|
The response. See :py:meth:`send_command` for details. |
| 3212 |
|
""" |
| 3213 |
|
cmd = XmlCommand("get_port_lists") |
| 3214 |
|
|
| 3215 |
|
_add_filter(cmd, filter, filter_id) |
| 3216 |
|
|
| 3217 |
|
if not details is None: |
| 3218 |
|
cmd.set_attribute("details", _to_bool(details)) |
| 3219 |
|
|
| 3220 |
|
if not targets is None: |
| 3221 |
|
cmd.set_attribute("targets", _to_bool(targets)) |
| 3222 |
|
|
|
@@ 3813-3842 (lines=30) @@
|
| 3810 |
|
cmd.set_attribute("target_id", target_id) |
| 3811 |
|
return self._send_xml_command(cmd) |
| 3812 |
|
|
| 3813 |
|
def get_tasks( |
| 3814 |
|
self, |
| 3815 |
|
*, |
| 3816 |
|
filter=None, |
| 3817 |
|
filter_id=None, |
| 3818 |
|
trash=None, |
| 3819 |
|
details=None, |
| 3820 |
|
schedules_only=None, |
| 3821 |
|
): |
| 3822 |
|
"""Request a list of tasks |
| 3823 |
|
|
| 3824 |
|
Arguments: |
| 3825 |
|
filter (str, optional): Filter term to use for the query |
| 3826 |
|
filter_id (str, optional): UUID of an existing filter to use for |
| 3827 |
|
the query |
| 3828 |
|
trash (boolean, optional): Whether to get the trashcan tasks instead |
| 3829 |
|
details (boolean, optional): Whether to include full task details |
| 3830 |
|
schedules_only (boolean, optional): Whether to only include id, name |
| 3831 |
|
and schedule details |
| 3832 |
|
|
| 3833 |
|
Returns: |
| 3834 |
|
The response. See :py:meth:`send_command` for details. |
| 3835 |
|
""" |
| 3836 |
|
cmd = XmlCommand("get_tasks") |
| 3837 |
|
|
| 3838 |
|
_add_filter(cmd, filter, filter_id) |
| 3839 |
|
|
| 3840 |
|
if not trash is None: |
| 3841 |
|
cmd.set_attribute("trash", _to_bool(trash)) |
| 3842 |
|
|
| 3843 |
|
if not details is None: |
| 3844 |
|
cmd.set_attribute("details", _to_bool(details)) |
| 3845 |
|
|