def agent_execute_clean_step(task, step):
    client = agent_client.AgentClient()
    ports = objects.Port.list_by_node_id(
        task.context, task.node.id)
    result = client.execute_clean_step(step, task.node, ports)
    if not result.get('command_status'):
        raise exception.NodeCleaningFailure(_(
            'Agent on node %(node)s returned bad command result: '
            '%(result)s') % {'node': task.node.uuid,
                             'result': result.get('command_error')})
    return states.CLEANWAIT
Execute a clean step asynchronously on the agent.
dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/deploy_utils.py/agent_execute_clean_step