~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/doc/xmlrpc-codehosting.txt

  • Committer: Michael Hudson
  • Date: 2010-04-19 06:35:23 UTC
  • mto: (7675.623.118 launchpad) (9590.16.1)
  • mto: This revision was merged to the branch mainline in revision 10828.
  • Revision ID: michael.hudson@canonical.com-20100419063523-4uy5n83u11t4wiyq
a start at combining the puller and filesystem endpoints

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
= The BranchPuller application =
 
2
 
 
3
The codehosting application is an XMLRPC service that allows the
 
4
codehosting service and puller to find and update the status of
 
5
branches.  It is available as the codehosting attribute of our private
 
6
XMLRPC instance.
 
7
 
 
8
    >>> from canonical.launchpad.interfaces import (
 
9
    ...     IPrivateApplication)
 
10
    >>> from lp.code.interfaces.codehosting import (
 
11
    ...     ICodehostingApplication)
 
12
    >>> from canonical.launchpad.webapp.testing import verifyObject
 
13
 
 
14
    >>> private_root = getUtility(IPrivateApplication)
 
15
    >>> verifyObject(
 
16
    ...     ICodehostingApplication,
 
17
    ...     private_root.codehosting)
 
18
    True
 
19
 
 
20
The CodeHosting view provides the ICodehosting XML-RPC API:
 
21
 
 
22
    >>> from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 
23
    >>> from lp.code.interfaces.codehosting import ICodehosting
 
24
    >>> from lp.code.xmlrpc.codehosting import Codehosting
 
25
 
 
26
    >>> codehosting_api = Codehosting(
 
27
    ...     private_root.codehosting, LaunchpadTestRequest())
 
28
    >>> verifyObject(ICodehosting, codehosting_api)
 
29
    True
 
30
 
 
31
The ICodehosting interface defines some methods, for which see the
 
32
unit tests.