python-jira-plus 1.0.4__tar.gz → 1.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_jira_plus-1.0.4/python_jira_plus.egg-info → python_jira_plus-1.0.5}/PKG-INFO +1 -1
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/python_jira_plus/jira_plus.py +18 -7
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5/python_jira_plus.egg-info}/PKG-INFO +1 -1
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/setup.py +1 -1
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/LICENSE +0 -0
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/MANIFEST.in +0 -0
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/README.md +0 -0
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/pyproject.toml +0 -0
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/python_jira_plus/__init__.py +0 -0
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/python_jira_plus/describe_allowed_value.py +0 -0
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/python_jira_plus.egg-info/SOURCES.txt +0 -0
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/python_jira_plus.egg-info/dependency_links.txt +0 -0
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/python_jira_plus.egg-info/requires.txt +0 -0
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/python_jira_plus.egg-info/top_level.txt +0 -0
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/requirements.txt +0 -0
- {python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/setup.cfg +0 -0
|
@@ -25,7 +25,9 @@ class JiraPlus:
|
|
|
25
25
|
server_type: ServerType = ServerType.CLOUD,
|
|
26
26
|
urllib3_log_level: int = logging.WARNING,
|
|
27
27
|
jira_username: Optional[str] = None,
|
|
28
|
-
jira_token: Optional[str] = None
|
|
28
|
+
jira_token: Optional[str] = None, # Use API token (not PAT)
|
|
29
|
+
verify_ssl: bool = True,
|
|
30
|
+
sso: bool = False
|
|
29
31
|
) -> None:
|
|
30
32
|
self.logger = logging.getLogger()
|
|
31
33
|
logging.getLogger("urllib3").setLevel(urllib3_log_level)
|
|
@@ -36,17 +38,26 @@ class JiraPlus:
|
|
|
36
38
|
|
|
37
39
|
self.server_type = server_type
|
|
38
40
|
self.server = f'https://{self.base_url}'
|
|
41
|
+
self.verify_ssl = verify_ssl
|
|
42
|
+
self.sso = sso
|
|
39
43
|
|
|
40
44
|
self.jira_client = self.create_connection()
|
|
41
45
|
self.check_client_connection()
|
|
42
46
|
|
|
43
47
|
@retry(stop_max_attempt_number=3, wait_fixed=180000) # Retry 3 times with a 3-min (180000) delay between each attempt
|
|
44
|
-
def create_connection(self) -> Optional[JIRA]:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
def create_connection(self, timeout=580) -> Optional[JIRA]:
|
|
49
|
+
if self.server_type == ServerType.ON_PREMISE and not self.sso:
|
|
50
|
+
jira_client = JIRA(
|
|
51
|
+
token_auth=self.jira_token,
|
|
52
|
+
options={'server': self.server},
|
|
53
|
+
timeout=timeout
|
|
54
|
+
)
|
|
55
|
+
else:
|
|
56
|
+
jira_client = JIRA(
|
|
57
|
+
basic_auth=(self.jira_username, self.jira_token),
|
|
58
|
+
options={'server': self.server},
|
|
59
|
+
timeout=timeout
|
|
60
|
+
)
|
|
50
61
|
|
|
51
62
|
if jira_client.projects():
|
|
52
63
|
self.logger.info(f"Jira Connection Successful")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/python_jira_plus/describe_allowed_value.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_jira_plus-1.0.4 → python_jira_plus-1.0.5}/python_jira_plus.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|