def update(backend=None): ''' Update the fileserver cache. If no backend is provided, then the cache for all configured backends will be updated. backend Narrow fileserver backends to a subset of the enabled ones. .. versionchanged:: 2015.5.0 If all passed backends start with a minus sign (``-``), then these backends will be excluded from the enabled backends. However, if there is a mix of backends with and without a minus sign (ex: ``backend=-roots,git``) then the ones starting with a minus sign will be disregarded. Additionally, fileserver backends can now be passed as a comma-separated list. In earlier versions, they needed to be passed as a python list (ex: ``backend="['roots', 'git']"``) CLI Example: .. code-block:: bash salt-run fileserver.update salt-run fileserver.update backend=roots,git ''' fileserver = salt.fileserver.Fileserver(__opts__) fileserver.update(back=backend) return True
def update(): ''' Execute an update for all of the configured fileserver backends CLI Example: .. code-block:: bash salt-run fileserver.update ''' fileserver = salt.fileserver.Fileserver(__opts__) fileserver.update()
def fileserver_update(fileserver): ''' Update the fileserver backends, requires that a built fileserver object be passed in ''' try: if not fileserver.servers: log.error('No fileservers loaded, the master will not be able to ' 'serve files to minions') raise SaltMasterError('No fileserver backends available') fileserver.update() except Exception as exc: log.error('Exception {0} occurred in file server update'.format(exc), exc_info_on_loglevel=logging.DEBUG)
def update(backend=None): ''' Update all of the file-servers that support the update function or the named fileserver only. CLI Example: .. code-block:: bash salt-run fileserver.update salt-run fileserver.update backend='["root", "git"]' ''' fileserver = salt.fileserver.Fileserver(__opts__) fileserver.update(back=backend) return True
def update(): ''' Execute an update for all of the configured fileserver backends ''' fileserver = salt.fileserver.Fileserver(__opts__) fileserver.update()