def _serve_activation_run(activation_id, is_running=False): """Serialize the activation response.""" links = [] if is_running: links.append( constructors.link_endpoint( 'cmk.gui.plugins.openapi.endpoints.activate_changes', 'cmk/wait-for-completion', parameters={'activation_id': activation_id})) return constructors.domain_object( domain_type='activation_run', identifier=activation_id, title='Activation %s was started.' % (activation_id, ), deletable=False, editable=False, links=links, )
def _completion_link(activation_id: str) -> LinkType: return constructors.link_endpoint( 'cmk.gui.plugins.openapi.endpoints.activate_changes', 'cmk/wait-for-completion', parameters={'activation_id': activation_id})
def _completion_link(activation_id: str) -> LinkType: return constructors.link_endpoint( "cmk.gui.plugins.openapi.endpoints.activate_changes", "cmk/wait-for-completion", parameters={"activation_id": activation_id}, )