netbox-atlassian 0.1.0__tar.gz → 0.2.1__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.
Files changed (18) hide show
  1. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/PKG-INFO +29 -5
  2. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/README.md +28 -4
  3. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian/__init__.py +2 -1
  4. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian/atlassian_client.py +22 -7
  5. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian/templates/netbox_atlassian/device_tab.html +5 -5
  6. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian/templates/netbox_atlassian/vm_tab.html +5 -5
  7. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian.egg-info/PKG-INFO +29 -5
  8. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/pyproject.toml +1 -1
  9. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian/forms.py +0 -0
  10. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian/navigation.py +0 -0
  11. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian/templates/netbox_atlassian/settings.html +0 -0
  12. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian/urls.py +0 -0
  13. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian/views.py +0 -0
  14. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian.egg-info/SOURCES.txt +0 -0
  15. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian.egg-info/dependency_links.txt +0 -0
  16. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian.egg-info/requires.txt +0 -0
  17. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/netbox_atlassian.egg-info/top_level.txt +0 -0
  18. {netbox_atlassian-0.1.0 → netbox_atlassian-0.2.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: netbox-atlassian
3
- Version: 0.1.0
3
+ Version: 0.2.1
4
4
  Summary: NetBox plugin to display Jira issues and Confluence pages related to devices
5
5
  Author-email: sieteunoseis <jeremy.worden@gmail.com>
6
6
  License: Apache-2.0
@@ -27,6 +27,11 @@ Requires-Dist: pytest; extra == "dev"
27
27
 
28
28
  # NetBox Atlassian Plugin
29
29
 
30
+ ![NetBox Version](https://img.shields.io/badge/NetBox-4.0+-blue)
31
+ ![Python Version](https://img.shields.io/badge/Python-3.10+-green)
32
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
33
+ [![PyPI](https://img.shields.io/pypi/v/netbox-atlassian)](https://pypi.org/project/netbox-atlassian/)
34
+
30
35
  Display Jira issues and Confluence pages related to devices in NetBox.
31
36
 
32
37
  ## Features
@@ -35,8 +40,10 @@ Display Jira issues and Confluence pages related to devices in NetBox.
35
40
  - **VM Tab** - Same functionality for Virtual Machines
36
41
  - **Configurable Search Fields** - Search by hostname, serial, asset tag, role, IP, etc.
37
42
  - **OR Search Logic** - Finds content matching any configured field
38
- - **On-Premise Support** - Works with Jira Server/Data Center and Confluence Server/Data Center
39
- - **Cloud Ready** - Prepared for Atlassian Cloud (future release)
43
+ - **On-Premise Support** - Works with Jira Server/Data Center and Confluence Server/Data Center (tested)
44
+ - **Cloud Ready** - Prepared for Atlassian Cloud (not yet tested)
45
+ - **Legacy SSL Support** - Works with older servers requiring legacy SSL renegotiation
46
+ - **PAT Authentication** - Supports Personal Access Tokens for Confluence
40
47
  - **Caching** - Results cached to reduce API calls
41
48
  - **Project/Space Filtering** - Limit searches to specific Jira projects or Confluence spaces
42
49
 
@@ -74,8 +81,10 @@ PLUGINS_CONFIG = {
74
81
 
75
82
  # Confluence settings (on-prem)
76
83
  "confluence_url": "https://confluence.example.com",
77
- "confluence_username": "api_user",
78
- "confluence_password": "api_token_or_password",
84
+ "confluence_token": "personal-access-token", # PAT (preferred)
85
+ # OR use username/password:
86
+ # "confluence_username": "api_user",
87
+ # "confluence_password": "api_password",
79
88
  "confluence_verify_ssl": True,
80
89
  "confluence_spaces": [], # Empty = all spaces
81
90
 
@@ -96,6 +105,7 @@ PLUGINS_CONFIG = {
96
105
  "timeout": 30,
97
106
  "cache_timeout": 300,
98
107
  "device_types": [], # Filter by manufacturer (empty = all)
108
+ "enable_legacy_ssl": False, # Enable for older servers
99
109
  }
100
110
  }
101
111
  ```
@@ -151,6 +161,16 @@ The plugin adds these endpoints:
151
161
  3. For on-prem, ensure `verify_ssl` matches your certificate setup
152
162
  4. Check firewall rules allow outbound HTTPS
153
163
 
164
+ ### SSL Renegotiation Errors
165
+
166
+ If you see "unsafe legacy renegotiation disabled" errors, enable legacy SSL:
167
+
168
+ ```python
169
+ "enable_legacy_ssl": True,
170
+ ```
171
+
172
+ This is required for some older Confluence/Jira servers.
173
+
154
174
  ### No Results
155
175
 
156
176
  1. Verify search fields are enabled in configuration
@@ -177,6 +197,10 @@ isort netbox_atlassian/
177
197
  flake8 netbox_atlassian/
178
198
  ```
179
199
 
200
+ ## Changelog
201
+
202
+ See [CHANGELOG.md](CHANGELOG.md) for release history.
203
+
180
204
  ## License
181
205
 
182
206
  Apache 2.0
@@ -1,5 +1,10 @@
1
1
  # NetBox Atlassian Plugin
2
2
 
3
+ ![NetBox Version](https://img.shields.io/badge/NetBox-4.0+-blue)
4
+ ![Python Version](https://img.shields.io/badge/Python-3.10+-green)
5
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
+ [![PyPI](https://img.shields.io/pypi/v/netbox-atlassian)](https://pypi.org/project/netbox-atlassian/)
7
+
3
8
  Display Jira issues and Confluence pages related to devices in NetBox.
4
9
 
5
10
  ## Features
@@ -8,8 +13,10 @@ Display Jira issues and Confluence pages related to devices in NetBox.
8
13
  - **VM Tab** - Same functionality for Virtual Machines
9
14
  - **Configurable Search Fields** - Search by hostname, serial, asset tag, role, IP, etc.
10
15
  - **OR Search Logic** - Finds content matching any configured field
11
- - **On-Premise Support** - Works with Jira Server/Data Center and Confluence Server/Data Center
12
- - **Cloud Ready** - Prepared for Atlassian Cloud (future release)
16
+ - **On-Premise Support** - Works with Jira Server/Data Center and Confluence Server/Data Center (tested)
17
+ - **Cloud Ready** - Prepared for Atlassian Cloud (not yet tested)
18
+ - **Legacy SSL Support** - Works with older servers requiring legacy SSL renegotiation
19
+ - **PAT Authentication** - Supports Personal Access Tokens for Confluence
13
20
  - **Caching** - Results cached to reduce API calls
14
21
  - **Project/Space Filtering** - Limit searches to specific Jira projects or Confluence spaces
15
22
 
@@ -47,8 +54,10 @@ PLUGINS_CONFIG = {
47
54
 
48
55
  # Confluence settings (on-prem)
49
56
  "confluence_url": "https://confluence.example.com",
50
- "confluence_username": "api_user",
51
- "confluence_password": "api_token_or_password",
57
+ "confluence_token": "personal-access-token", # PAT (preferred)
58
+ # OR use username/password:
59
+ # "confluence_username": "api_user",
60
+ # "confluence_password": "api_password",
52
61
  "confluence_verify_ssl": True,
53
62
  "confluence_spaces": [], # Empty = all spaces
54
63
 
@@ -69,6 +78,7 @@ PLUGINS_CONFIG = {
69
78
  "timeout": 30,
70
79
  "cache_timeout": 300,
71
80
  "device_types": [], # Filter by manufacturer (empty = all)
81
+ "enable_legacy_ssl": False, # Enable for older servers
72
82
  }
73
83
  }
74
84
  ```
@@ -124,6 +134,16 @@ The plugin adds these endpoints:
124
134
  3. For on-prem, ensure `verify_ssl` matches your certificate setup
125
135
  4. Check firewall rules allow outbound HTTPS
126
136
 
137
+ ### SSL Renegotiation Errors
138
+
139
+ If you see "unsafe legacy renegotiation disabled" errors, enable legacy SSL:
140
+
141
+ ```python
142
+ "enable_legacy_ssl": True,
143
+ ```
144
+
145
+ This is required for some older Confluence/Jira servers.
146
+
127
147
  ### No Results
128
148
 
129
149
  1. Verify search fields are enabled in configuration
@@ -150,6 +170,10 @@ isort netbox_atlassian/
150
170
  flake8 netbox_atlassian/
151
171
  ```
152
172
 
173
+ ## Changelog
174
+
175
+ See [CHANGELOG.md](CHANGELOG.md) for release history.
176
+
153
177
  ## License
154
178
 
155
179
  Apache 2.0
@@ -7,7 +7,7 @@ Searches by configurable fields (hostname, serial, role, etc.) with OR logic.
7
7
 
8
8
  from netbox.plugins import PluginConfig
9
9
 
10
- __version__ = "0.1.0"
10
+ __version__ = "0.2.1"
11
11
 
12
12
 
13
13
  class AtlassianConfig(PluginConfig):
@@ -31,6 +31,7 @@ class AtlassianConfig(PluginConfig):
31
31
  "jira_url": "", # e.g., "https://jira.example.com"
32
32
  "jira_username": "",
33
33
  "jira_password": "", # or API token
34
+ "jira_token": "", # Personal Access Token (PAT) - preferred for on-prem
34
35
  "jira_verify_ssl": True,
35
36
  # Confluence settings (on-prem)
36
37
  "confluence_url": "", # e.g., "https://confluence.example.com"
@@ -44,6 +44,7 @@ class AtlassianClient:
44
44
  self.jira_url = self.config.get("jira_url", "").rstrip("/")
45
45
  self.jira_username = self.config.get("jira_username", "")
46
46
  self.jira_password = self.config.get("jira_password", "")
47
+ self.jira_token = self.config.get("jira_token", "") # Personal Access Token
47
48
  self.jira_verify_ssl = self.config.get("jira_verify_ssl", True)
48
49
 
49
50
  # Confluence settings
@@ -98,13 +99,24 @@ class AtlassianClient:
98
99
  session = self._get_session()
99
100
 
100
101
  try:
101
- response = session.get(
102
- url,
103
- auth=self._get_jira_auth(),
104
- params=params,
105
- verify=self.jira_verify_ssl,
106
- timeout=self.timeout,
107
- )
102
+ # Use PAT (Bearer token) if available, otherwise basic auth
103
+ if self.jira_token:
104
+ headers = {"Authorization": f"Bearer {self.jira_token}"}
105
+ response = session.get(
106
+ url,
107
+ headers=headers,
108
+ params=params,
109
+ verify=self.jira_verify_ssl,
110
+ timeout=self.timeout,
111
+ )
112
+ else:
113
+ response = session.get(
114
+ url,
115
+ auth=self._get_jira_auth(),
116
+ params=params,
117
+ verify=self.jira_verify_ssl,
118
+ timeout=self.timeout,
119
+ )
108
120
  response.raise_for_status()
109
121
  return response.json()
110
122
  except requests.exceptions.RequestException as e:
@@ -322,6 +334,9 @@ class AtlassianClient:
322
334
  if not self.jira_url:
323
335
  return False, "Jira URL not configured"
324
336
 
337
+ if not self.jira_token and not self.jira_username:
338
+ return False, "Jira credentials not configured (need token or username/password)"
339
+
325
340
  result = self._jira_request("myself")
326
341
  if result:
327
342
  return True, f"Connected as {result.get('displayName', result.get('name', 'Unknown'))}"
@@ -9,7 +9,7 @@
9
9
  <i class="mdi mdi-magnify"></i>
10
10
  <strong>Searching for:</strong>
11
11
  {% for term in search_terms %}
12
- <span class="badge bg-secondary text-white ms-1">{{ term }}</span>{% if not forloop.last %}<span class="text-muted ms-1">OR</span>{% endif %}
12
+ <span class="badge bg-info text-white ms-1">{{ term }}</span>{% if not forloop.last %}<span class="text-muted ms-1">OR</span>{% endif %}
13
13
  {% empty %}
14
14
  <span class="text-muted">No search terms available</span>
15
15
  {% endfor %}
@@ -27,7 +27,7 @@
27
27
  <h5 class="card-title mb-0">
28
28
  <i class="mdi mdi-jira text-primary"></i> Jira Issues
29
29
  {% if jira_results.total > 0 %}
30
- <span class="badge bg-primary text-white">{{ jira_results.total }} issue{{ jira_results.total|pluralize }}</span>
30
+ <span class="badge bg-info text-white">{{ jira_results.total }} issue{{ jira_results.total|pluralize }}</span>
31
31
  {% endif %}
32
32
  </h5>
33
33
  {% if jira_url %}
@@ -71,11 +71,11 @@
71
71
  </td>
72
72
  <td>
73
73
  {% if issue.status_category == 'done' %}
74
- <span class="badge bg-success">{{ issue.status }}</span>
74
+ <span class="badge bg-success text-white">{{ issue.status }}</span>
75
75
  {% elif issue.status_category == 'indeterminate' %}
76
- <span class="badge bg-primary">{{ issue.status }}</span>
76
+ <span class="badge bg-primary text-white">{{ issue.status }}</span>
77
77
  {% else %}
78
- <span class="badge bg-secondary">{{ issue.status }}</span>
78
+ <span class="badge bg-secondary text-white">{{ issue.status }}</span>
79
79
  {% endif %}
80
80
  </td>
81
81
  <td>
@@ -9,7 +9,7 @@
9
9
  <i class="mdi mdi-magnify"></i>
10
10
  <strong>Searching for:</strong>
11
11
  {% for term in search_terms %}
12
- <span class="badge bg-secondary text-white ms-1">{{ term }}</span>{% if not forloop.last %}<span class="text-muted ms-1">OR</span>{% endif %}
12
+ <span class="badge bg-info text-white ms-1">{{ term }}</span>{% if not forloop.last %}<span class="text-muted ms-1">OR</span>{% endif %}
13
13
  {% empty %}
14
14
  <span class="text-muted">No search terms available</span>
15
15
  {% endfor %}
@@ -27,7 +27,7 @@
27
27
  <h5 class="card-title mb-0">
28
28
  <i class="mdi mdi-jira text-primary"></i> Jira Issues
29
29
  {% if jira_results.total > 0 %}
30
- <span class="badge bg-primary text-white">{{ jira_results.total }} issue{{ jira_results.total|pluralize }}</span>
30
+ <span class="badge bg-info text-white">{{ jira_results.total }} issue{{ jira_results.total|pluralize }}</span>
31
31
  {% endif %}
32
32
  </h5>
33
33
  {% if jira_url %}
@@ -71,11 +71,11 @@
71
71
  </td>
72
72
  <td>
73
73
  {% if issue.status_category == 'done' %}
74
- <span class="badge bg-success">{{ issue.status }}</span>
74
+ <span class="badge bg-success text-white">{{ issue.status }}</span>
75
75
  {% elif issue.status_category == 'indeterminate' %}
76
- <span class="badge bg-primary">{{ issue.status }}</span>
76
+ <span class="badge bg-primary text-white">{{ issue.status }}</span>
77
77
  {% else %}
78
- <span class="badge bg-secondary">{{ issue.status }}</span>
78
+ <span class="badge bg-secondary text-white">{{ issue.status }}</span>
79
79
  {% endif %}
80
80
  </td>
81
81
  <td>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: netbox-atlassian
3
- Version: 0.1.0
3
+ Version: 0.2.1
4
4
  Summary: NetBox plugin to display Jira issues and Confluence pages related to devices
5
5
  Author-email: sieteunoseis <jeremy.worden@gmail.com>
6
6
  License: Apache-2.0
@@ -27,6 +27,11 @@ Requires-Dist: pytest; extra == "dev"
27
27
 
28
28
  # NetBox Atlassian Plugin
29
29
 
30
+ ![NetBox Version](https://img.shields.io/badge/NetBox-4.0+-blue)
31
+ ![Python Version](https://img.shields.io/badge/Python-3.10+-green)
32
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
33
+ [![PyPI](https://img.shields.io/pypi/v/netbox-atlassian)](https://pypi.org/project/netbox-atlassian/)
34
+
30
35
  Display Jira issues and Confluence pages related to devices in NetBox.
31
36
 
32
37
  ## Features
@@ -35,8 +40,10 @@ Display Jira issues and Confluence pages related to devices in NetBox.
35
40
  - **VM Tab** - Same functionality for Virtual Machines
36
41
  - **Configurable Search Fields** - Search by hostname, serial, asset tag, role, IP, etc.
37
42
  - **OR Search Logic** - Finds content matching any configured field
38
- - **On-Premise Support** - Works with Jira Server/Data Center and Confluence Server/Data Center
39
- - **Cloud Ready** - Prepared for Atlassian Cloud (future release)
43
+ - **On-Premise Support** - Works with Jira Server/Data Center and Confluence Server/Data Center (tested)
44
+ - **Cloud Ready** - Prepared for Atlassian Cloud (not yet tested)
45
+ - **Legacy SSL Support** - Works with older servers requiring legacy SSL renegotiation
46
+ - **PAT Authentication** - Supports Personal Access Tokens for Confluence
40
47
  - **Caching** - Results cached to reduce API calls
41
48
  - **Project/Space Filtering** - Limit searches to specific Jira projects or Confluence spaces
42
49
 
@@ -74,8 +81,10 @@ PLUGINS_CONFIG = {
74
81
 
75
82
  # Confluence settings (on-prem)
76
83
  "confluence_url": "https://confluence.example.com",
77
- "confluence_username": "api_user",
78
- "confluence_password": "api_token_or_password",
84
+ "confluence_token": "personal-access-token", # PAT (preferred)
85
+ # OR use username/password:
86
+ # "confluence_username": "api_user",
87
+ # "confluence_password": "api_password",
79
88
  "confluence_verify_ssl": True,
80
89
  "confluence_spaces": [], # Empty = all spaces
81
90
 
@@ -96,6 +105,7 @@ PLUGINS_CONFIG = {
96
105
  "timeout": 30,
97
106
  "cache_timeout": 300,
98
107
  "device_types": [], # Filter by manufacturer (empty = all)
108
+ "enable_legacy_ssl": False, # Enable for older servers
99
109
  }
100
110
  }
101
111
  ```
@@ -151,6 +161,16 @@ The plugin adds these endpoints:
151
161
  3. For on-prem, ensure `verify_ssl` matches your certificate setup
152
162
  4. Check firewall rules allow outbound HTTPS
153
163
 
164
+ ### SSL Renegotiation Errors
165
+
166
+ If you see "unsafe legacy renegotiation disabled" errors, enable legacy SSL:
167
+
168
+ ```python
169
+ "enable_legacy_ssl": True,
170
+ ```
171
+
172
+ This is required for some older Confluence/Jira servers.
173
+
154
174
  ### No Results
155
175
 
156
176
  1. Verify search fields are enabled in configuration
@@ -177,6 +197,10 @@ isort netbox_atlassian/
177
197
  flake8 netbox_atlassian/
178
198
  ```
179
199
 
200
+ ## Changelog
201
+
202
+ See [CHANGELOG.md](CHANGELOG.md) for release history.
203
+
180
204
  ## License
181
205
 
182
206
  Apache 2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "netbox-atlassian"
7
- version = "0.1.0"
7
+ version = "0.2.1"
8
8
  description = "NetBox plugin to display Jira issues and Confluence pages related to devices"
9
9
  readme = "README.md"
10
10
  license = {text = "Apache-2.0"}