Package duplicity :: Package backends :: Module webdavbackend :: Class WebDAVBackend
[hide private]
[frames] | no frames]

Class WebDAVBackend

source code


Backend for accessing a WebDAV repository.

webdav backend contributed in 2006 by Jesper Zedlitz <jesper@zedlitz.de>

Instance Methods [hide private]
 
__init__(self, parsed_url) source code
 
_getText(self, nodelist) source code
 
close(self)
Close the backend, releasing any resources held and invalidating any file objects obtained from the backend.
source code
 
request(self, method, path, data=None)
Wraps the connection.request method to retry once if authentication is required
source code
 
get_authorization(self, response, path)
Fetches the auth header based on the requested method (basic or digest)
source code
 
parse_digest_challenge(self, challenge_string) source code
 
get_basic_authorization(self)
Returns the basic auth header
source code
 
get_digest_authorization(self, path)
Returns the digest auth header
source code
 
list(self)
List files in directory
source code
 
__taste_href(self, href)
Internal helper to taste the given href node and, if it is a duplicity file, collect it as a result file.
source code
 
get(self, remote_filename, local_path)
Get remote filename, saving it to local_path
source code
 
put(self, source_path, remote_filename=None)
Transfer source_path to remote_filename
source code
 
delete(self, filename_list)
Delete files in filename_list
source code

Inherited from backend.Backend: get_data, get_fileobj_read, get_fileobj_write, get_password, move, munge_password, popen, popen_persist, put_data, query_info, run_command, run_command_persist, subprocess_popen, subprocess_popen_persist

Inherited from backend.Backend (private): _subprocess_popen

Class Variables [hide private]
  listbody = "...
Connect to remote store using WebDAV Protocol

Inherited from backend.Backend: popen_persist_breaks, use_getpass

Method Details [hide private]

__init__(self, parsed_url)
(Constructor)

source code 
Overrides: backend.Backend.__init__

close(self)

source code 

Close the backend, releasing any resources held and invalidating any file objects obtained from the backend.

Overrides: backend.Backend.close
(inherited documentation)

list(self)

source code 

List files in directory

Overrides: backend.Backend.list

__taste_href(self, href)

source code 

Internal helper to taste the given href node and, if it is a duplicity file, collect it as a result file.

Returns:
A matching filename, or None if the href did not match.

get(self, remote_filename, local_path)

source code 

Get remote filename, saving it to local_path

Overrides: backend.Backend.get

put(self, source_path, remote_filename=None)

source code 

Transfer source_path to remote_filename

Overrides: backend.Backend.put

delete(self, filename_list)

source code 

Delete files in filename_list

Overrides: backend.Backend.delete

Class Variable Details [hide private]

listbody

Connect to remote store using WebDAV Protocol

Value:
"""\
<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
<D:allprop/>
</D:propfind>

"""