def configure_node(cluster, node, certnkey, dataset_backend_configuration, provider, logging_config=None):
 setup_action = 'start'
 if (provider == 'managed'):
  setup_action = 'restart'
 return run_remotely(username='root', address=node.address, commands=sequence([task_install_node_certificates(cluster.certificates.cluster.certificate, certnkey.certificate, certnkey.key), task_install_api_certificates(cluster.certificates.user.certificate, cluster.certificates.user.key), task_enable_docker(node.distribution), if_firewall_available(node.distribution, open_firewall_for_docker_api(node.distribution)), task_configure_flocker_agent(control_node=cluster.control_node.address, dataset_backend=cluster.dataset_backend, dataset_backend_configuration=dataset_backend_configuration, logging_config=logging_config), task_enable_docker_plugin(node.distribution), task_enable_flocker_agent(distribution=node.distribution, action=setup_action)]))

def configure_node ( cluster , node , certnkey , dataset_backend_configuration , provider , logging_config = None ) : setup_action = 'start' if ( provider == 'managed' ) : setup_action = 'restart' return run_remotely ( username = 'root' , address = node . address , commands = sequence ( [ task_install_node_certificates ( cluster . certificates . cluster . certificate , certnkey . certificate , certnkey . key ) , task_install_api_certificates ( cluster . certificates . user . certificate , cluster . certificates . user . key ) , task_enable_docker ( node . distribution ) , if_firewall_available ( node . distribution , open_firewall_for_docker_api ( node . distribution ) ) , task_configure_flocker_agent ( control_node = cluster . control_node . address , dataset_backend = cluster . dataset_backend , dataset_backend_configuration = dataset_backend_configuration , logging_config = logging_config ) , task_enable_docker_plugin ( node . distribution ) , task_enable_flocker_agent ( distribution = node . distribution , action = setup_action ) ] ) )
configure flocker-dataset-agent on a node .