Пример #1
0
    def validate_config(self):
        """Verify that all required config settings are present"""

        ServerHeraldNotifyEmail.validate_config(self)

        # Mailgun requires a domain name and API key
        if not self.config_has('mailgun'):
            print ('`mailgun` notification type requires a Mailgun domain and'
                   ' API key to be specified in the config file.')
            sys.exit(1)

        if not self.config_has('mailgun', 'domain'):
            print 'Mailgun requires a domain name in the config file.'
            sys.exit(1)

        if not self.config_has('mailgun', 'apikey'):
            print 'Mailgun requires an API key in the config file'
            sys.exit(1)
Пример #2
0
    def validate_config(self):
        """Verify that all required config settings are present"""

        ServerHeraldNotifyEmail.validate_config(self)

        # Sendgrid requires an API key and API username
        if not self.config_has('sendgrid'):
            print ('`sendgrid` notification type requires an API username'
                   ' and an API key to be specified in the config file.')
            sys.exit(1)

        if not self.config_has('sendgrid', 'apiuser'):
            print 'Sendgrid requires a domain name in the config file.'
            sys.exit(1)

        if not self.config_has('sendgrid', 'apikey'):
            print 'Sendgrid requires an API key in the config file'
            sys.exit(1)
Пример #3
0
    def validate_config(self):
        """Verify that all required config settings are present"""

        ServerHeraldNotifyEmail.validate_config(self)

        # Sendgrid requires an API key and API username
        if not self.config_has("sendgrid"):
            print (
                "`sendgrid` notification type requires an API username"
                " and an API key to be specified in the config file."
            )
            sys.exit(1)

        if not self.config_has("sendgrid", "apiuser"):
            print "Sendgrid requires a domain name in the config file."
            sys.exit(1)

        if not self.config_has("sendgrid", "apikey"):
            print "Sendgrid requires an API key in the config file"
            sys.exit(1)