예제 #1
0
    def jira(self):
        if self._jira is None:

            try:
                data = Secrets(self.secrets_id).value_from_json_string()
                server = data.get('server')  #''https://jira.photobox.com'
                username = data.get('username')  #'gsbot'
                password = data.get(
                    'password')  # Secrets('GS_BOT_GS_JIRA').value()
                self._jira = JIRA({'server': server},
                                  basic_auth=(username, password))
            except Exception as error:
                print(
                    '[API_JIRA] [error creating jira connection]: {0}'.format(
                        error))

        return self._jira
예제 #2
0
 def config(self):
     if self._config is None:
         data = Secrets(self.secrets_id).value_from_json_string()
         self._config = (data.get('server'), data.get('username'),
                         data.get('password'))
     return self._config