def _update_central_plugins(): if not update_plugins: return sequence = graph.sequence() add_plugins_to_uninstall(ctx, central_plugins_to_uninstall, sequence) add_plugins_to_install(ctx, central_plugins_to_install, sequence) graph.execute()
def test_add_plugin_to_install_adds_to_sequence(self): plugins_list = ['something'] utils.add_plugins_to_install(self.ctx_mock, plugins_list, self.sequence_mock) self.ctx_mock.send_event.assert_called() self.ctx_mock.execute_task.assert_called_with( task_name='cloudify_agent.operations.install_plugins', kwargs={'plugins': plugins_list}) self.sequence_mock.add.assert_called_with('send_event', 'execute_task')
def generate_create_dep_tasks_graph(ctx, deployment_plugins_to_install, workflow_plugins_to_install, policy_configuration=None): graph = ctx.graph_mode() sequence = graph.sequence() plugins_to_install = extract_and_merge_plugins( deployment_plugins_to_install, workflow_plugins_to_install) add_plugins_to_install(ctx, plugins_to_install, sequence) sequence.add( ctx.send_event('Creating deployment work directory'), ctx.local_task(_create_deployment_workdir, kwargs={ 'deployment_id': ctx.deployment.id, 'tenant': ctx.tenant_name, 'logger': ctx.logger })) return graph
def test_install_task_not_executed(self): utils.add_plugins_to_install(None, False, None)
def _update_plugins(): sequence = graph.sequence() add_plugins_to_uninstall(ctx, plugins_to_uninstall, sequence) add_plugins_to_install(ctx, plugins_to_install, sequence) graph.execute()