MCPcopy Index your code
hub / github.com/saltstack/salt / updates

Method updates

salt/utils/win_update.py:333–364  ·  view source on GitHub ↗

Get the contents of ``_updates`` (all updates) and puts them in an Updates class to expose the list and summary functions. Returns: Updates: An instance of the Updates class with all updates for the system. Code Example:

(self)

Source from the content-addressed store, hash-verified

331 self.refresh(online=online)
332
333 def updates(self):
334 """
335 Get the contents of ``_updates`` (all updates) and puts them in an
336 Updates class to expose the list and summary functions.
337
338 Returns:
339
340 Updates:
341 An instance of the Updates class with all updates for the
342 system.
343
344 Code Example:
345
346 .. code-block:: python
347
348 import salt.utils.win_update
349 wua = salt.utils.win_update.WindowsUpdateAgent()
350 updates = wua.updates()
351
352 # To get a list
353 updates.list()
354
355 # To get a summary
356 updates.summary()
357 """
358 updates = Updates()
359 found = updates.updates
360
361 for update in self._updates:
362 found.Add(update)
363
364 return updates
365
366 def refresh(self, online=True):
367 """

Callers 3

installedFunction · 0.95
removedFunction · 0.95
uptodateFunction · 0.95

Calls 2

UpdatesClass · 0.70
AddMethod · 0.45

Tested by

no test coverage detected