CiscoTestAutomation / pyats

Cisco DevNet pyATS Test Framework Bug Tracker
Apache License 2.0
148 stars 31 forks source link

EMAIL notification on pyATS #238

Closed luisantoniovillalobos closed 3 months ago

luisantoniovillalobos commented 3 months ago

Hello Community: I have a question regarding EMAIL notification on pyATS. I have already configured my own SMTP host, I defined the next:

`# Example

-------

#

pyATS configuration file

[email] smtp.host = outbound.cisco.com default_domain = cisco.com smtp.ssl = True

[interaction]

Address to bind server to

server.host = outbound.cisco.com email.disable = False

May require authentication for SMTP

email.from = xxx@cisco.com email.to = xxxx@cisco.com,xxxx@cisco.com

This is formatted by jinja2. section_name is one argument that will be

populated in a template format.

email.subject = Reporte `

Checking the logs when I run my job file, I am seeing the next:

`pyats run job HC_ASR.py --customer_param HC_param.yml --nodes Claro_Argentina_Cordoba.yaml --hc_type staros_basic_healthcheck.py --html-logs -vvv

2024-05-04T19:40:11: %EASYPY-INFO: -- disconnect_from_devices PASSED 2024-05-04T19:40:11: %EASYPY-INFO: Sending report email... 2024-05-04T19:40:11: %UTILS-DEBUG: Sending messaging to outbound.cisco.com:None 2024-05-04T19:40:13: %UTILS-DEBUG: ---------- Email Content ---------- 2024-05-04T19:40:13: %UTILS-DEBUG: 2024-05-04T19:40:13: %UTILS-DEBUG: From: root@cisco.com 2024-05-04T19:40:13: %UTILS-DEBUG: To: root@cisco.com 2024-05-04T19:40:13: %UTILS-DEBUG: Subject: pyATS Report - job: Claro Argentina by: root, total: 9 (P:1, PX:0, F:0 ...) 2024-05-04T19:40:13: %UTILS-DEBUG: Content-Type: text/plain; charset="utf-8" 2024-05-04T19:40:13: %UTILS-DEBUG: Content-Transfer-Encoding: 7bit 2024-05-04T19:40:13: %UTILS-DEBUG: MIME-Version: 1.0

Do you know, why pyATS is not taking the configuration defined below "interaction" section regarding email.from and email.to?

Harishv01 commented 3 months ago

Ensure that your configuration file is correctly formatted and in the expected location.

Harishv01 commented 3 months ago

Ensure that your configuration file is correctly formatted and in the expected location.

Harishv01 commented 3 months ago

Hi,

Kindly provide an update on the above.

Thank you.

Harishv01 commented 3 months ago

Hi,

Kindly provide an update on the above.

Harishv01 commented 3 months ago

Hi,

I haven't received any update on the issue. Hence, I am closing it. If you see any issue related to pyats, kindly raise a new ticket.

Thank you.