OPSI.Util.Repository module¶
opsi python library - Repository¶
Functionality to work with opsi repositories.
| copyright: | uib GmbH <info@uib.de> |
|---|---|
| license: | GNU Affero General Public License version 3 |
-
class
OPSI.Util.Repository.CIFSRepository(url, **kwargs)¶ Bases:
OPSI.Util.Repository.FileRepository-
disconnect()¶
-
getMountPoint()¶
-
-
class
OPSI.Util.Repository.DepotToLocalDirectorySychronizer(sourceDepot, destinationDirectory, productIds=[], maxBandwidth=0, dynamicBandwidth=False)¶ Bases:
object-
synchronize(productProgressObserver=None, overallProgressObserver=None)¶
-
-
class
OPSI.Util.Repository.FileRepository(url, **kwargs)¶ Bases:
OPSI.Util.Repository.Repository-
content(source='', recursive=False)¶
-
delete(destination)¶
-
download(source, destination, progressSubject=None, startByteNumber=-1, endByteNumber=-1)¶ startByteNumber: position of first byte to be read endByteNumber: position of last byte to be read
-
exists(source)¶
-
fileInfo(source)¶
-
isdir(source)¶
-
isfile(source)¶
-
islink(source)¶
-
makeDirectory(destination)¶
-
upload(source, destination, progressSubject=None)¶
-
-
class
OPSI.Util.Repository.HTTPRepository(url, **kwargs)¶ Bases:
OPSI.Util.Repository.Repository-
disconnect()¶
-
download(source, destination, progressSubject=None, startByteNumber=-1, endByteNumber=-1)¶ startByteNumber: position of first byte to be read endByteNumber: position of last byte to be read
-
getPeerCertificate(asPem=False)¶
-
-
class
OPSI.Util.Repository.Repository(url, **kwargs)¶ -
addHook(hook)¶
-
attachObserver(observer)¶
-
content(source='', recursive=False)¶ List the content of the repository.
The returned entries are a dict with the following keys: name, size, path and type. name is the name of file or folder. path is the relative path. type is either ‘file’ or ‘dir’.
Parameters: recursive (bool) – Recursive listing? Returns: Content of the repository. Return type: [dict, ]
-
copy(source, destination, overallProgressSubject=None, currentProgressSubject=None)¶ source = file, destination = file => overwrite destination source = file, destination = dir => copy into destination source = file, destination = not existent => create destination directories, copy source to destination source = dir, destination = file => error source = dir, destination = dir => copy source dir into destination source = dir, destination = not existent => create destination, copy content of source into destination source = dir/*, destination = dir/not existent => create destination if not exists, copy content of source into destination
-
delete(destination)¶
-
detachObserver(observer)¶
-
disconnect()¶
-
download(source, destination, progressSubject=None, startByteNumber=-1, endByteNumber=-1)¶
-
exists(source)¶
-
fileInfo(source)¶
-
getCountAndSize(source='')¶
-
isdir(source)¶
-
isfile(source)¶
-
islink(source)¶
-
listdir(source='')¶
-
makeDirectory(destination)¶
-
removeHook(hook)¶
-
setBandwidth(dynamicBandwidth=False, maxBandwidth=0)¶ maxBandwidth in byte/s
-
setMaxBandwidth(maxBandwidth)¶
-
upload(source, destination)¶
-
-
class
OPSI.Util.Repository.RepositoryHook¶ Bases:
object-
error_Repository_copy(source, destination, overallProgressSubject, currentProgressSubject, exception)¶
-
post_Repository_copy(source, destination, overallProgressSubject, currentProgressSubject)¶
-
pre_Repository_copy(source, destination, overallProgressSubject, currentProgressSubject)¶
-
-
class
OPSI.Util.Repository.RepositoryObserver¶ Bases:
object-
dynamicBandwidthLimitChanged(repository, bandwidth)¶
-
-
class
OPSI.Util.Repository.WebDAVRepository(url, **kwargs)¶ Bases:
OPSI.Util.Repository.HTTPRepository-
content(source='', recursive=False)¶
-
delete(destination)¶
-
upload(source, destination, progressSubject=None)¶
-
-
OPSI.Util.Repository.getRepository(url, **kwargs)¶