# tentacle_xml

**Descripción**

Envía un archivo usando el protocolo tentacle.

**Parámetros**

<table border="1" id="bkmrk-module-acepta-el-tip" style="border-collapse: collapse; width: 100%; height: 169px;"><tbody><tr style="height: 29px;"><td style="width: 12.5%; height: 29px;"><div><div>**Nombre**</div></div></td><td style="width: 6.25%; height: 29px;"><div><div>**Tipo**</div></div></td><td style="width: 8.47222%;"><div><div>**Requerido**</div></div></td><td style="width: 47.7778%; height: 29px;">**Descripción**</td></tr><tr style="height: 24px;"><td style="width: 12.5%; height: 24px;"><div><div>data_file</div></div></td><td style="width: 6.25%; height: 24px;"><div><div>str</div></div></td><td style="width: 8.47222%;"><div><div>Si</div></div></td><td style="width: 47.7778%; height: 24px;">Archivo a enviar. Se necesita la ruta completa del archivo</td></tr><tr style="height: 29px;"><td style="width: 12.5%; height: 29px;"><div><div>tentacle_ops</div></div></td><td style="width: 6.25%; height: 29px;"><div><div>dict</div></div></td><td style="width: 8.47222%;"><div><div>No</div></div></td><td style="width: 47.7778%; height: 29px;">Debe ser un dict con las opciones de tentacle (dirección \[contraseña\] \[puerto\])</td></tr><tr style="height: 29px;"><td style="width: 12.5%; height: 29px;"><div><div>tentacle_path</div></div></td><td style="width: 6.25%; height: 29px;"><div><div>str</div></div></td><td style="width: 8.47222%;">No</td><td style="width: 47.7778%; height: 29px;">Permite definir una ruta personalizada para el cliente tentacle en caso de que no esté en sys path)</td></tr><tr style="height: 29px;"><td style="width: 12.5%; height: 29px;">debug</td><td style="width: 6.25%; height: 29px;">int</td><td style="width: 8.47222%;">No</td><td style="width: 47.7778%; height: 29px;">Si está habilitado, el fichero de datos no será eliminado después de ser enviado</td></tr><tr style="height: 29px;"><td style="width: 12.5%; height: 29px;">print\_errors</td><td style="width: 6.25%; height: 29px;">bool</td><td style="width: 8.47222%;">No</td><td style="width: 47.7778%; height: 29px;">Si se habilita con True, imprimirá todos los mensajes de error</td></tr></tbody></table>

**Return**

<table border="1" id="bkmrk-module_xml-m%C3%B3dulo-en" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 50%;">bool</td><td style="width: 50%;">Devuelve 0 para OK y 1 para errores</td></tr></tbody></table>

**Requisitos**

- sys
- os
- datetime.datetime
- <div><div>subprocess.Popen</div></div><div>  
    </div><div>  
    </div>

**Versión**

- 1.0.0

Ejemplo

```
import pandoraPlugintools as pt

# Define the path to the data file to be sent
data_file = '/tmp/agent.data'

# Define tentacle options as a dictionary
tentacle_ops = {
    'address': '192.168.1.100',
    'port': 41121
}

# Send the file using the tentacle protocol
success = pt.transfer.tentacle_xml(data_file, tentacle_ops, tentacle_path, debug, print_errors)

# Check if the file was sent successfully
if success:
    print("File sent successfully using tentacle protocol.")
else:
    print("Failed to send file using tentacle protocol.")
```