Пример #1
0
 def updateMachine(self, userId="free"):
     #r = self.__query("SELECT * FROM machine WHERE address = %s", self.__macAddress)
     
     _hostname = socket.gethostname()
     try:
         _ip_address = globalProperty.getIpAddress()
     except Exception, e:
         self.logger.error(e)
         return
Пример #2
0
 def updateMachineInfo(self):
     _hostnameConfig = globalProperty.getMachineName()
     _hostname = socket.gethostname()
     try:
         _ip_address = globalProperty.getIpAddress()
     except Exception, e:
         print e
         self.logger.error(e)
         return
Пример #3
0
 def formatReportSummary(self):
     self.htmlSummary = '''
 <body>
 <h2>Basic Information</h2>
 <table class="details" border="0" cellpadding="5" cellspacing="2" width="98%">
 <tr>
 <th>Machine Name</th>
 <th>Current IP</th>
 <th>Job ID</th>
 <th>Execution ID</th>
 </tr>
 <tr align="center">
 '''
     self.htmlSummary += "<td><strong>%s<strong></td>" % socket.gethostname()
     self.htmlSummary += "<td><strong>%s<strong></td>" % globalProperty.getIpAddress()
     self.htmlSummary += "<td><strong>%s<strong></td>" % self.jobId
     self.htmlSummary += "<td><strong>%s<strong></td>" % self.exeId
     self.htmlSummary += '''
 </tr>
 </table>
 '''
     return self.htmlSummary