def task_install_api_certificates(api_cert, api_key):
 return sequence([run('mkdir -p /etc/flocker'), run('chmod u=rwX,g=,o= /etc/flocker'), put(path='/etc/flocker/plugin.crt', content=api_cert.getContent()), put(path='/etc/flocker/plugin.key', content=api_key.getContent(), log_content_filter=_remove_private_key)])

def task_install_api_certificates ( api_cert , api_key ) : return sequence ( [ run ( 'mkdir -p /etc/flocker' ) , run ( 'chmod u=rwX,g=,o= /etc/flocker' ) , put ( path = '/etc/flocker/plugin.crt' , content = api_cert . getContent ( ) ) , put ( path = '/etc/flocker/plugin.key' , content = api_key . getContent ( ) , log_content_filter = _remove_private_key ) ] )
install certificate and private key required by docker plugin to access the flocker rest api .