OPSI.web2.dav.element.rfc2518 module

RFC 2518 (WebDAV) XML Elements

This module provides XML element definitions for use with WebDAV.

See RFC 2518: http://www.ietf.org/rfc/rfc2518.txt

class OPSI.web2.dav.element.rfc2518.ActiveLock(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Describes a lock on a resource. (RFC 2518, section 12.1)

allowed_children = {('DAV:', 'timeout'): (0, 1), ('DAV:', 'owner'): (0, 1), ('DAV:', 'depth'): (1, 1), ('DAV:', 'locktype'): (1, 1), ('DAV:', 'lockscope'): (1, 1), ('DAV:', 'locktoken'): (0, 1)}
name = 'activelock'
class OPSI.web2.dav.element.rfc2518.AllProperties(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVEmptyElement

Specifies that all property names and values on the resource are to be returned. (RFC 2518, section 12.14.1)

name = 'allprop'
class OPSI.web2.dav.element.rfc2518.Collection(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVEmptyElement

Identifies the associated resource as a collection. (RFC 2518, section 12.2)

name = 'collection'
class OPSI.web2.dav.element.rfc2518.CreationDate(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVDateTimeElement

Records the time and date that the resource was created. (RFC 2518, section 13.1)

name = 'creationdate'
protected = True
class OPSI.web2.dav.element.rfc2518.Depth(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

The value of the depth header. (RFC 2518, section 12.1.1)

name = 'depth'
class OPSI.web2.dav.element.rfc2518.DisplayName(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

Provides a name for the resource that is suitable for presentation to a user. (RFC 2518, section 13.2)

name = 'displayname'
class OPSI.web2.dav.element.rfc2518.Exclusive(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVEmptyElement

Indicates an exclusive lock. (RFC 2518, section 12.7.1)

name = 'exclusive'
class OPSI.web2.dav.element.rfc2518.GETContentLanguage(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

Contains the Content-Language header returned by a GET without accept headers. (RFC 2518, section 13.3)

name = 'getcontentlanguage'
class OPSI.web2.dav.element.rfc2518.GETContentLength(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

Contains the Content-Length header returned by a GET without accept headers. (RFC 2518, section 13.4)

name = 'getcontentlength'
protected = True
class OPSI.web2.dav.element.rfc2518.GETContentType(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

Contains the Content-Type header returned by a GET without accept headers. (RFC 2518, section 13.5)

mimeType()
name = 'getcontenttype'
class OPSI.web2.dav.element.rfc2518.GETETag(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

Contains the ETag header returned by a GET without accept headers. (RFC 2518, section 13.6)

name = 'getetag'
protected = True
class OPSI.web2.dav.element.rfc2518.GETLastModified(*children, **attributes)

Bases: OPSI.web2.dav.element.base.DateTimeHeaderElement

Contains the Last-Modified header returned by a GET without accept headers. (RFC 2518, section 13.7)

name = 'getlastmodified'
protected = True
class OPSI.web2.dav.element.rfc2518.HRef(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

Identifies the content of the element as a URI. (RFC 2518, section 12.3)

name = 'href'
class OPSI.web2.dav.element.rfc2518.KeepAlive(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Specifies requirements for the copying/moving or live properties. (RFC 2518, section 12.12.1)

allowed_children = {<class 'OPSI.web2.dav.element.base.PCDATAElement'>: (0, 1), ('DAV:', 'href'): (0, None)}
name = 'keepalive'

Bases: OPSI.web2.dav.element.base.WebDAVElement

Identifies the property as a link and contains the source and destination of that link. (RFC 2518, section 12.4)

allowed_children = {('DAV:', 'src'): (1, None), ('DAV:', 'dst'): (1, None)}
name = 'link'
class OPSI.web2.dav.element.rfc2518.LinkDestination(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

Indicates the destination of a link. (RFC 2518, section 12.4.1)

name = 'dst'
class OPSI.web2.dav.element.rfc2518.LinkSource(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

Indicates the source of a link. (RFC 2518, section 12.4.2)

name = 'src'
class OPSI.web2.dav.element.rfc2518.LockDiscovery(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Describes the active locks on a resource. (RFC 2518, section 13.8)

allowed_children = {('DAV:', 'activelock'): (0, None)}
name = 'lockdiscovery'
protected = True
class OPSI.web2.dav.element.rfc2518.LockEntry(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Defines the types of lock that can be used with the resource. (RFC 2518, section 12.5)

allowed_children = {('DAV:', 'lockscope'): (1, 1), ('DAV:', 'locktype'): (1, 1)}
name = 'lockentry'
class OPSI.web2.dav.element.rfc2518.LockInfo(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Used with a LOCK method to specify the type of lock that the client wishes to have created. (RFC 2518, section 12.6)

allowed_children = {('DAV:', 'lockscope'): (1, 1), ('DAV:', 'locktype'): (1, 1), ('DAV:', 'owner'): (0, 1)}
name = 'lockinfo'
class OPSI.web2.dav.element.rfc2518.LockScope(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVOneShotElement

Specifies whether a lock is an exclusive lock or a shared lock. (RFC 2518, section 12.7)

allowed_children = {('DAV:', 'exclusive'): (0, 1), ('DAV:', 'shared'): (0, 1)}
exclusive = <{DAV:}lockscope {}: (<{DAV:}exclusive {}: ()>,)>
name = 'lockscope'
shared = <{DAV:}lockscope {}: (<{DAV:}shared {}: ()>,)>
class OPSI.web2.dav.element.rfc2518.LockToken(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

The lock token associated with a lock. (RFC 2518, section 12.1.2)

allowed_children = {('DAV:', 'href'): (1, None)}
name = 'locktoken'
class OPSI.web2.dav.element.rfc2518.LockType(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVOneShotElement

Specifies the access type of a lock. (RFC 2518, section 12.8)

allowed_children = {('DAV:', 'write'): (0, 1)}
name = 'locktype'
write = <{DAV:}locktype {}: (<{DAV:}write {}: ()>,)>
class OPSI.web2.dav.element.rfc2518.MultiStatus(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Contains multiple Responses. (RFC 2518, section 12.9)

allowed_children = {('DAV:', 'responsedescription'): (0, 1), ('DAV:', 'response'): (0, None)}
name = 'multistatus'
class OPSI.web2.dav.element.rfc2518.Omit(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVEmptyElement

Instructs the server that it should use best effort to copy properties. (RFC 2518, section 12.12.2)

name = 'omit'
class OPSI.web2.dav.element.rfc2518.Owner(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Property which provides information about the principal taking out a lock. (RFC 2518, section 12.10) Property which identifies a principal as being the owner principal of a resource. (RFC 3744, section 5.1) Note that RFC 2518 allows any content, while RFC 3744 expect zero or one DAV:href element.

allowed_children = {<class 'OPSI.web2.dav.element.base.WebDAVElement'>: (0, None)}
hidden = True
name = 'owner'
class OPSI.web2.dav.element.rfc2518.PropertyBehavior(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Specifies how properties are handled during a COPY or MOVE. (RFC 2518, section 12.12)

allowed_children = {('DAV:', 'keepalive'): (0, 1), ('DAV:', 'omit'): (0, 1)}
name = 'propertybehavior'
class OPSI.web2.dav.element.rfc2518.PropertyContainer(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Contains properties related to a resource. (RFC 2518, section 12.11)

allowed_children = {<class 'OPSI.web2.dav.element.base.WebDAVElement'>: (0, None)}
name = 'prop'
class OPSI.web2.dav.element.rfc2518.PropertyFind(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Specifies the properties to be returned from a PROPFIND method. (RFC 2518, section 12.14)

allowed_children = {('DAV:', 'propname'): (0, 1), ('DAV:', 'prop'): (0, 1), ('DAV:', 'allprop'): (0, 1)}
name = 'propfind'
class OPSI.web2.dav.element.rfc2518.PropertyName(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVEmptyElement

Specifies that only a list of property names on the resource are to be returned. (RFC 2518, section 12.14.2)

name = 'propname'
class OPSI.web2.dav.element.rfc2518.PropertyStatus(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Groups together a Property and Status element that is associated with a particular DAV:href element. (RFC 2518, section 12.9.1.1)

allowed_children = {('DAV:', 'prop'): (1, 1), ('DAV:', 'responsedescription'): (0, 1), ('DAV:', 'status'): (1, 1), ('DAV:', 'error'): (0, 1)}
name = 'propstat'
class OPSI.web2.dav.element.rfc2518.PropertyStatusResponse(*children, **attributes)

Bases: OPSI.web2.dav.element.rfc2518.Response

Specialized derivative of Response for property status.

allowed_children = {('DAV:', 'propstat'): (1, None), ('DAV:', 'error'): (0, 1), ('DAV:', 'responsedescription'): (0, 1), ('DAV:', 'href'): (1, 1)}
unregistered = True
class OPSI.web2.dav.element.rfc2518.PropertyUpdate(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Contains a request to alter the properties on a resource. (RFC 2518, section 12.13)

allowed_children = {('DAV:', 'remove'): (0, None), ('DAV:', 'set'): (0, None)}
name = 'propertyupdate'
class OPSI.web2.dav.element.rfc2518.Remove(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Lists the DAV properties to be removed from a resource. (RFC 2518, section 12.13.1)

allowed_children = {('DAV:', 'prop'): (1, 1)}
name = 'remove'
class OPSI.web2.dav.element.rfc2518.ResourceType(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Specifies the nature of the resource. (RFC 2518, section 13.9)

allowed_children = {<class 'OPSI.web2.dav.element.base.WebDAVElement'>: (0, None)}
collection = <{DAV:}resourcetype {}: (<{DAV:}collection {}: ()>,)>
empty = <{DAV:}resourcetype {}: ()>
name = 'resourcetype'
protected = True
class OPSI.web2.dav.element.rfc2518.Response(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Holds a single response describing the effect of a method on a resource and/or its properties. (RFC 2518, section 12.9.1)

allowed_children = {('DAV:', 'propstat'): (1, None), ('DAV:', 'error'): (0, 1), ('DAV:', 'responsedescription'): (0, 1), ('DAV:', 'status'): (1, 1), ('DAV:', 'href'): (1, None)}
name = 'response'
class OPSI.web2.dav.element.rfc2518.ResponseDescription(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

Contains a message that can be displayed to the user explaining the nature of the response. (RFC 2518, section 12.9.2)

name = 'responsedescription'
class OPSI.web2.dav.element.rfc2518.Set(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Lists the DAV properties to be set for a resource. (RFC 2518, section 12.13.2)

allowed_children = {('DAV:', 'prop'): (1, 1)}
name = 'set'
class OPSI.web2.dav.element.rfc2518.Shared(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVEmptyElement

Indicates a shared lock. (RFC 2518, section 12.7.2)

name = 'shared'
class OPSI.web2.dav.element.rfc2518.Source(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

The destination of the source link identifies the resource that contains the unprocessed source of the link’s source. (RFC 2518, section 13.10)

allowed_children = {('DAV:', 'link'): (0, None)}
name = 'source'
class OPSI.web2.dav.element.rfc2518.Status(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

Holds a single HTTP status line. (RFC 2518, section 12.9.1.2)

classmethod fromResponseCode(clazz, code)

code must be an integer response code in OPSI.web2.responsecode.RESPONSES.keys()

name = 'status'
class OPSI.web2.dav.element.rfc2518.StatusResponse(*children, **attributes)

Bases: OPSI.web2.dav.element.rfc2518.Response

Specialized derivative of Response for resource status.

allowed_children = {('DAV:', 'error'): (0, 1), ('DAV:', 'responsedescription'): (0, 1), ('DAV:', 'status'): (1, 1), ('DAV:', 'href'): (1, None)}
unregistered = True
class OPSI.web2.dav.element.rfc2518.SupportedLock(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVElement

Provides a listing of the lock capabilities supported by the resource. (RFC 2518, section 13.11)

allowed_children = {('DAV:', 'lockentry'): (0, None)}
name = 'supportedlock'
protected = True
class OPSI.web2.dav.element.rfc2518.Timeout(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVTextElement

The timeout associated with a lock. (RFC 2518, section 12.1.3)

name = 'timeout'
class OPSI.web2.dav.element.rfc2518.Write(*children, **attributes)

Bases: OPSI.web2.dav.element.base.WebDAVEmptyElement

Indicates a write lock. (RFC 2518, section 12.8.1) Controls methods that lock a resource or modify the content, dead properties, or (in the case of a collection) membership of a resource. (RFC 3744, section 3.2)

name = 'write'