'''Software Update===============Methods described in this section relate to the software update API.These methods can be accessed at ``Nessus.software_update``... rst-class:: hide-signature.. autoclass:: SoftwareUpdateAPI :members:'''fromtypingimportDict,Optionalfromtyping_extensionsimportLiteralfromrestfly.utilsimportdict_cleanfromtenable.base.endpointimportAPIEndpoint
[docs]defupdate(self)->None:''' Schedules a software update for all components Example: >>> nessus.software_update.update() '''self._get()
[docs]defsettings(self,update:Literal['all','plugins','disabled'],custom_host:Optional[str]=None,auto_update_delay:Optional[int]=None)->None:''' Update the software update settings Args: update (str): What components should be updated? Expected values are ``all``, ``plugins``, and ``disabled``. custom_host (str, optional): URL of the custom plugin feed host auto_update_delay (int, optional): How often should the plugin feed attempt to update (in hours) Example: >>> nessus.software_update.settings(update='all', ... auto_update_delay=24 ... ) '''self._put(json=dict_clean({'update':update,'custom_host':custom_host,'auto_update_delay':auto_update_delay}))