Ejemplo n.º 1
0
 def send_device_notification_sms(
         self, _active_alert_phone_number_misoperation, _sms_subject):
     print "INSIDE send_device_notification_sms"
     print _active_alert_phone_number_misoperation
     smsService = SMSService()
     smsService.sendSMS(email_fromaddr,
                        _active_alert_phone_number_misoperation,
                        email_username, email_password, _sms_subject,
                        email_mailServer)
Ejemplo n.º 2
0
node_name = multinode_data['this_node']

myips = find_own_ip.getIPs()
_email_subject = node_name+'@'+str(myips[0])
emailService = EmailService()

#email settings
email_fromaddr = settings.NOTIFICATION['email']['fromaddr']
email_recipients = settings.NOTIFICATION['email']['recipients']
email_username = settings.NOTIFICATION['email']['username']
email_password = settings.NOTIFICATION['email']['password']
email_mailServer = settings.NOTIFICATION['email']['mailServer']


smsService = SMSService()
notify_heartbeat = settings.NOTIFICATION['heartbeat']

#Offline variables initialized

platform_table = 'platform_event'
platform_log_variables = {'agent_id':'text','start_time':'TIMESTAMP','event_id':'UUID','date_id':'text','end_time':'TIMESTAMP'}
platform_log_partition_keys = ['agent_id']
platform_log_clustering_keys = ['start_time','event_id']
#Start_time made the clustering key so that we can order the result by start_time and sort in desc order to find the latest entry
platform_variables=dict()

notification_table = 'email_sent'
notification_log_variables = {'agent_id': 'text', 'date_id': 'text', 'last_event_log_time': 'TIMESTAMP', 'email_sent_time': 'TIMESTAMP'}
notification_log_partition_keys = ['date_id']
notification_log_clustering_keys = ['last_event_log_time']
Ejemplo n.º 3
0
 def send_device_notification_sms(self, _active_alert_phone_number_misoperation, _sms_subject):
     print "INSIDE send_device_notification_sms"
     print _active_alert_phone_number_misoperation
     smsService = SMSService()
     smsService.sendSMS(email_fromaddr, _active_alert_phone_number_misoperation, email_username, email_password, _sms_subject, email_mailServer)