~bac/charms/precise/juju-gui/unified-ppa

« back to all changes in this revision

Viewing changes to hooks/utils.py

  • Committer: Kapil Thangavelu
  • Date: 2013-04-30 13:53:20 UTC
  • Revision ID: kapil.foss@gmail.com-20130430135320-ph41grn4dust2h4y
read only server side support

Show diffs side-by-side

added added

removed removed

Lines of Context:
297
297
        service_control(IMPROV, START)
298
298
 
299
299
 
300
 
def start_agent(ssl_cert_path, config_path='/etc/init/juju-api-agent.conf'):
 
300
def start_agent(
 
301
        ssl_cert_path, config_path='/etc/init/juju-api-agent.conf', 
 
302
        read_only=False):
301
303
    """Start the Juju agent and connect to the current environment."""
302
304
    # Retrieve the Zookeeper address from the start up script.
303
305
    unit_dir = os.path.realpath(os.path.join(CURRENT_DIR, '..'))
309
311
        'keys': ssl_cert_path,
310
312
        'port': API_PORT,
311
313
        'zookeeper': zookeeper,
 
314
        'read_only': read_only
312
315
    }
313
316
    render_to_file('juju-api-agent.conf.template', context, config_path)
314
317
    log('Starting API agent.')