~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/features/__init__.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-19 08:49:39 UTC
  • mfrom: (13960.2.17 feature-flag-xmlrpc)
  • Revision ID: launchpad@pqm.canonical.com-20110919084939-doa6wrbb251ak815
[r=lifeless][bug=853635] Add a private XML-RPC interface to query
        feature flags

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
     if value:
126
126
        print value
127
127
 
 
128
Checking flags without access to the database
 
129
=============================================
 
130
 
 
131
Feature flags can also be checked without access to the database by making use
 
132
of the 'getFeatureFlag' XML-RPC method.
 
133
 
 
134
    server_proxy = xmlrpclib.ServerProxy(
 
135
        config.launchpad.feature_flags_endpoint, allow_none=True)
 
136
    if server_proxy.getFeatureFlag(
 
137
        'codehosting.use_forking_server', ['user:' + user_name]):
 
138
        pass
 
139
 
128
140
Debugging feature usage
129
141
=======================
130
142