Changeset 76330 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Dec 21, 2018 9:01:04 AM (6 years ago)
- Location:
- trunk/src/VBox/ValidationKit/testmanager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/batch/virtual_test_sheriff.py
r76325 r76330 45 45 import subprocess; 46 46 import smtplib 47 from email.mime.multipart import MIMEMultipart 48 from email.mime.text import MIMEText 49 from email.utils import COMMASPACE 50 47 51 if sys.version_info[0] >= 3: 48 52 from io import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module … … 51 55 from optparse import OptionParser; # pylint: disable=deprecated-module 52 56 from PIL import Image; # pylint: disable=import-error 53 54 from email.mime.multipart import MIMEMultipart55 from email.mime.text import MIMEText56 from email.utils import COMMASPACE57 57 58 58 # Add Test Manager's modules path … … 71 71 from testmanager.core.testresultfailures import TestResultFailureLogic, TestResultFailureData; 72 72 from testmanager.core.useraccount import UserAccountLogic; 73 from testmanager.config import g_ksSmtpHost, g_kcSmtpPort, g_ksAlertSubject, g_asAlertList; 73 from testmanager.config import g_ksSmtpHost, g_kcSmtpPort, g_ksAlertFrom, \ 74 g_ksAlertSubject, g_asAlertList, g_ksLomPassword; 74 75 75 76 # Python 3 hacks: … … 375 376 sFrom = sFrom[0]; 376 377 else: 377 sFrom = '[email protected]';378 sFrom = g_ksAlertFrom; 378 379 379 380 for sUser in g_asAlertList: … … 517 518 continue; 518 519 ## @todo get iLOM credentials from a table? 519 sCmd = 'sshpass -p changeme ssh -oStrictHostKeyChecking=no root@%s show /SP && reset /SYS' % (oTestBox.ipLom,);520 sCmd = 'sshpass -p%s ssh -oStrictHostKeyChecking=no root@%s show /SP && reset /SYS' % (g_ksLomPassword, oTestBox.ipLom,); 520 521 try: 521 522 oPs = subprocess.Popen(sCmd, stdout=subprocess.PIPE, shell=True); … … 528 529 sComment = u'Reset testbox #%u (%s) - iRC=%u sStduot=%s' % ( idTestBox, oTestBox.sName, iRC, sStdout); 529 530 self.vprint(sComment); 530 531 531 self.emailAlert(self.uidSelf, sComment); 532 532 -
trunk/src/VBox/ValidationKit/testmanager/config.py
r76325 r76330 193 193 ## SMTP server port number. 194 194 g_kcSmtpPort = 25; 195 ## Default email 'From' for email alert. 196 g_ksAlertFrom = '[email protected]'; 195 197 ## Subject for email alert. 196 198 g_ksAlertSubject = 'Virtual Sheriff alert'; 197 199 ## List of users to send alerts. 198 200 g_asAlertList = ['lelik', 'werner']; 199 200 ## @} 201 ## iLOM password. 202 g_ksLomPassword = 'password'; 203 204 ## @}
Note:
See TracChangeset
for help on using the changeset viewer.