Package buildbot :: Package status :: Package web :: Module change_hook :: Class ChangeHookResource
[frames] | no frames]

Class ChangeHookResource

source code

twisted.web.resource.Resource --+
                                |
                               ChangeHookResource

Nested Classes

Inherited from twisted.web.resource.Resource: entityType

Instance Methods
 
__init__(self, dialects={})
The keys of 'dialects' select a modules to load under master/buildbot/status/web/hooks/ The value is passed to the module's getChanges function, providing configuration options to the dialect.
source code
 
getChild(self, name, request)
Retrieve a 'child' resource from me.
source code
 
render_GET(self, request)
Reponds to events and starts the build process...
source code
 
render_POST(self, request)
Reponds to events and starts the build process different implementations can decide on what methods they will accept
source code
 
getChanges(self, request)
Take the logic from the change hook, and then delegate it to the proper handler http://localhost/change_hook/DIALECT will load up buildmaster/status/web/hooks/DIALECT.py
source code
 
submitChanges(self, changes, request) source code

Inherited from twisted.web.resource.Resource: __providedBy__, delEntity, getChildForRequest, getChildWithDefault, getDynamicEntity, getStaticEntity, listDynamicEntities, listDynamicNames, listEntities, listNames, listStaticEntities, listStaticNames, putChild, reallyPutEntity, render, render_HEAD

Class Variables
  contentType = 'text/html; charset=utf-8'
  children = {}

Inherited from twisted.web.resource.Resource: __implemented__, __provides__, isLeaf, server

Method Details

__init__(self, dialects={})
(Constructor)

source code 

The keys of 'dialects' select a modules to load under master/buildbot/status/web/hooks/ The value is passed to the module's getChanges function, providing configuration options to the dialect.

Overrides: twisted.web.resource.Resource.__init__

getChild(self, name, request)

source code 

Retrieve a 'child' resource from me.

Implement this to create dynamic resource generation -- resources which are always available may be registered with self.putChild().

This will not be called if the class-level variable 'isLeaf' is set in your subclass; instead, the 'postpath' attribute of the request will be left as a list of the remaining path elements.

For example, the URL /foo/bar/baz will normally be:

 | site.resource.getChild('foo').getChild('bar').getChild('baz').

However, if the resource returned by 'bar' has isLeaf set to true, then the getChild call will never be made on it.

Parameters:
  • path - a string, describing the child
  • request - a twisted.web.server.Request specifying meta-information about the request that is being made for this child.
Overrides: twisted.web.resource.Resource.getChild
(inherited documentation)

render_GET(self, request)

source code 

Reponds to events and starts the build process
  different implementations can decide on what methods they will accept

render_POST(self, request)

source code 

Reponds to events and starts the build process
  different implementations can decide on what methods they will accept

:arguments:
    request
        the http request object

getChanges(self, request)

source code 

Take the logic from the change hook, and then delegate it to the proper handler http://localhost/change_hook/DIALECT will load up buildmaster/status/web/hooks/DIALECT.py

and call getChanges()

the return value is a list of changes

if DIALECT is unspecified, a sample implementation is provided