netbox-atlassian 0.1.0__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.
@@ -0,0 +1,186 @@
1
+ Metadata-Version: 2.4
2
+ Name: netbox-atlassian
3
+ Version: 0.1.0
4
+ Summary: NetBox plugin to display Jira issues and Confluence pages related to devices
5
+ Author-email: sieteunoseis <jeremy.worden@gmail.com>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/sieteunoseis/netbox-atlassian
8
+ Project-URL: Repository, https://github.com/sieteunoseis/netbox-atlassian
9
+ Project-URL: Issues, https://github.com/sieteunoseis/netbox-atlassian/issues
10
+ Keywords: netbox,jira,confluence,atlassian,plugin
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Framework :: Django
13
+ Classifier: Intended Audience :: System Administrators
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: requests>=2.28.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: black; extra == "dev"
24
+ Requires-Dist: flake8; extra == "dev"
25
+ Requires-Dist: isort; extra == "dev"
26
+ Requires-Dist: pytest; extra == "dev"
27
+
28
+ # NetBox Atlassian Plugin
29
+
30
+ Display Jira issues and Confluence pages related to devices in NetBox.
31
+
32
+ ## Features
33
+
34
+ - **Device Tab** - Shows Jira issues and Confluence pages mentioning device attributes
35
+ - **VM Tab** - Same functionality for Virtual Machines
36
+ - **Configurable Search Fields** - Search by hostname, serial, asset tag, role, IP, etc.
37
+ - **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)
40
+ - **Caching** - Results cached to reduce API calls
41
+ - **Project/Space Filtering** - Limit searches to specific Jira projects or Confluence spaces
42
+
43
+ ## Requirements
44
+
45
+ - NetBox 4.0+
46
+ - Python 3.10+
47
+ - Access to Jira and/or Confluence REST APIs
48
+
49
+ ## Installation
50
+
51
+ ```bash
52
+ pip install netbox-atlassian
53
+ ```
54
+
55
+ Add to `configuration.py`:
56
+
57
+ ```python
58
+ PLUGINS = [
59
+ "netbox_atlassian",
60
+ ]
61
+ ```
62
+
63
+ ## Configuration
64
+
65
+ ```python
66
+ PLUGINS_CONFIG = {
67
+ "netbox_atlassian": {
68
+ # Jira settings (on-prem)
69
+ "jira_url": "https://jira.example.com",
70
+ "jira_username": "api_user",
71
+ "jira_password": "api_token_or_password",
72
+ "jira_verify_ssl": True,
73
+ "jira_projects": [], # Empty = all projects
74
+
75
+ # Confluence settings (on-prem)
76
+ "confluence_url": "https://confluence.example.com",
77
+ "confluence_username": "api_user",
78
+ "confluence_password": "api_token_or_password",
79
+ "confluence_verify_ssl": True,
80
+ "confluence_spaces": [], # Empty = all spaces
81
+
82
+ # Search configuration
83
+ "search_fields": [
84
+ {"name": "Hostname", "attribute": "name", "enabled": True},
85
+ {"name": "Serial", "attribute": "serial", "enabled": True},
86
+ {"name": "Asset Tag", "attribute": "asset_tag", "enabled": False},
87
+ {"name": "Role", "attribute": "role.name", "enabled": False},
88
+ {"name": "Primary IP", "attribute": "primary_ip4.address", "enabled": False},
89
+ ],
90
+
91
+ # Results limits
92
+ "jira_max_results": 10,
93
+ "confluence_max_results": 10,
94
+
95
+ # General
96
+ "timeout": 30,
97
+ "cache_timeout": 300,
98
+ "device_types": [], # Filter by manufacturer (empty = all)
99
+ }
100
+ }
101
+ ```
102
+
103
+ ## Search Fields
104
+
105
+ The `search_fields` configuration defines which device attributes are searched. Searches use **OR logic** - content matching any enabled field will be returned.
106
+
107
+ | Field | Attribute Path | Description |
108
+ |-------|---------------|-------------|
109
+ | Hostname | `name` | Device name |
110
+ | Serial | `serial` | Serial number |
111
+ | Asset Tag | `asset_tag` | Asset tag |
112
+ | Role | `role.name` | Device role name |
113
+ | Primary IP | `primary_ip4.address` | Primary IPv4 address |
114
+ | Site | `site.name` | Site name |
115
+ | Tenant | `tenant.name` | Tenant name |
116
+
117
+ ### Custom Fields
118
+
119
+ You can search custom fields using dot notation:
120
+
121
+ ```python
122
+ {"name": "CMDB ID", "attribute": "custom_field_data.cmdb_id", "enabled": True}
123
+ ```
124
+
125
+ ## Screenshots
126
+
127
+ ### Device Tab
128
+ Shows Jira issues and Confluence pages in a split view:
129
+ - Left: Jira issues with key, summary, status, and type
130
+ - Right: Confluence pages with title, space, and breadcrumb
131
+
132
+ ### Settings Page
133
+ View current configuration and test connections to Jira/Confluence.
134
+
135
+ ## API Endpoints
136
+
137
+ The plugin adds these endpoints:
138
+
139
+ | Endpoint | Method | Description |
140
+ |----------|--------|-------------|
141
+ | `/plugins/atlassian/settings/` | GET | View settings |
142
+ | `/plugins/atlassian/test-jira/` | POST | Test Jira connection |
143
+ | `/plugins/atlassian/test-confluence/` | POST | Test Confluence connection |
144
+
145
+ ## Troubleshooting
146
+
147
+ ### Connection Errors
148
+
149
+ 1. Verify URLs are correct and accessible from NetBox server
150
+ 2. Check username/password or API token
151
+ 3. For on-prem, ensure `verify_ssl` matches your certificate setup
152
+ 4. Check firewall rules allow outbound HTTPS
153
+
154
+ ### No Results
155
+
156
+ 1. Verify search fields are enabled in configuration
157
+ 2. Check that Jira/Confluence content contains the device attributes
158
+ 3. Review project/space filters if configured
159
+ 4. Check API user has read permissions
160
+
161
+ ### Slow Performance
162
+
163
+ 1. Increase `cache_timeout` to reduce API calls
164
+ 2. Reduce `max_results` values
165
+ 3. Use project/space filters to limit search scope
166
+
167
+ ## Development
168
+
169
+ ```bash
170
+ git clone https://github.com/sieteunoseis/netbox-atlassian.git
171
+ cd netbox-atlassian
172
+ pip install -e ".[dev]"
173
+
174
+ # Run linting
175
+ black netbox_atlassian/
176
+ isort netbox_atlassian/
177
+ flake8 netbox_atlassian/
178
+ ```
179
+
180
+ ## License
181
+
182
+ Apache 2.0
183
+
184
+ ## Author
185
+
186
+ sieteunoseis
@@ -0,0 +1,159 @@
1
+ # NetBox Atlassian Plugin
2
+
3
+ Display Jira issues and Confluence pages related to devices in NetBox.
4
+
5
+ ## Features
6
+
7
+ - **Device Tab** - Shows Jira issues and Confluence pages mentioning device attributes
8
+ - **VM Tab** - Same functionality for Virtual Machines
9
+ - **Configurable Search Fields** - Search by hostname, serial, asset tag, role, IP, etc.
10
+ - **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)
13
+ - **Caching** - Results cached to reduce API calls
14
+ - **Project/Space Filtering** - Limit searches to specific Jira projects or Confluence spaces
15
+
16
+ ## Requirements
17
+
18
+ - NetBox 4.0+
19
+ - Python 3.10+
20
+ - Access to Jira and/or Confluence REST APIs
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ pip install netbox-atlassian
26
+ ```
27
+
28
+ Add to `configuration.py`:
29
+
30
+ ```python
31
+ PLUGINS = [
32
+ "netbox_atlassian",
33
+ ]
34
+ ```
35
+
36
+ ## Configuration
37
+
38
+ ```python
39
+ PLUGINS_CONFIG = {
40
+ "netbox_atlassian": {
41
+ # Jira settings (on-prem)
42
+ "jira_url": "https://jira.example.com",
43
+ "jira_username": "api_user",
44
+ "jira_password": "api_token_or_password",
45
+ "jira_verify_ssl": True,
46
+ "jira_projects": [], # Empty = all projects
47
+
48
+ # Confluence settings (on-prem)
49
+ "confluence_url": "https://confluence.example.com",
50
+ "confluence_username": "api_user",
51
+ "confluence_password": "api_token_or_password",
52
+ "confluence_verify_ssl": True,
53
+ "confluence_spaces": [], # Empty = all spaces
54
+
55
+ # Search configuration
56
+ "search_fields": [
57
+ {"name": "Hostname", "attribute": "name", "enabled": True},
58
+ {"name": "Serial", "attribute": "serial", "enabled": True},
59
+ {"name": "Asset Tag", "attribute": "asset_tag", "enabled": False},
60
+ {"name": "Role", "attribute": "role.name", "enabled": False},
61
+ {"name": "Primary IP", "attribute": "primary_ip4.address", "enabled": False},
62
+ ],
63
+
64
+ # Results limits
65
+ "jira_max_results": 10,
66
+ "confluence_max_results": 10,
67
+
68
+ # General
69
+ "timeout": 30,
70
+ "cache_timeout": 300,
71
+ "device_types": [], # Filter by manufacturer (empty = all)
72
+ }
73
+ }
74
+ ```
75
+
76
+ ## Search Fields
77
+
78
+ The `search_fields` configuration defines which device attributes are searched. Searches use **OR logic** - content matching any enabled field will be returned.
79
+
80
+ | Field | Attribute Path | Description |
81
+ |-------|---------------|-------------|
82
+ | Hostname | `name` | Device name |
83
+ | Serial | `serial` | Serial number |
84
+ | Asset Tag | `asset_tag` | Asset tag |
85
+ | Role | `role.name` | Device role name |
86
+ | Primary IP | `primary_ip4.address` | Primary IPv4 address |
87
+ | Site | `site.name` | Site name |
88
+ | Tenant | `tenant.name` | Tenant name |
89
+
90
+ ### Custom Fields
91
+
92
+ You can search custom fields using dot notation:
93
+
94
+ ```python
95
+ {"name": "CMDB ID", "attribute": "custom_field_data.cmdb_id", "enabled": True}
96
+ ```
97
+
98
+ ## Screenshots
99
+
100
+ ### Device Tab
101
+ Shows Jira issues and Confluence pages in a split view:
102
+ - Left: Jira issues with key, summary, status, and type
103
+ - Right: Confluence pages with title, space, and breadcrumb
104
+
105
+ ### Settings Page
106
+ View current configuration and test connections to Jira/Confluence.
107
+
108
+ ## API Endpoints
109
+
110
+ The plugin adds these endpoints:
111
+
112
+ | Endpoint | Method | Description |
113
+ |----------|--------|-------------|
114
+ | `/plugins/atlassian/settings/` | GET | View settings |
115
+ | `/plugins/atlassian/test-jira/` | POST | Test Jira connection |
116
+ | `/plugins/atlassian/test-confluence/` | POST | Test Confluence connection |
117
+
118
+ ## Troubleshooting
119
+
120
+ ### Connection Errors
121
+
122
+ 1. Verify URLs are correct and accessible from NetBox server
123
+ 2. Check username/password or API token
124
+ 3. For on-prem, ensure `verify_ssl` matches your certificate setup
125
+ 4. Check firewall rules allow outbound HTTPS
126
+
127
+ ### No Results
128
+
129
+ 1. Verify search fields are enabled in configuration
130
+ 2. Check that Jira/Confluence content contains the device attributes
131
+ 3. Review project/space filters if configured
132
+ 4. Check API user has read permissions
133
+
134
+ ### Slow Performance
135
+
136
+ 1. Increase `cache_timeout` to reduce API calls
137
+ 2. Reduce `max_results` values
138
+ 3. Use project/space filters to limit search scope
139
+
140
+ ## Development
141
+
142
+ ```bash
143
+ git clone https://github.com/sieteunoseis/netbox-atlassian.git
144
+ cd netbox-atlassian
145
+ pip install -e ".[dev]"
146
+
147
+ # Run linting
148
+ black netbox_atlassian/
149
+ isort netbox_atlassian/
150
+ flake8 netbox_atlassian/
151
+ ```
152
+
153
+ ## License
154
+
155
+ Apache 2.0
156
+
157
+ ## Author
158
+
159
+ sieteunoseis
@@ -0,0 +1,73 @@
1
+ """
2
+ NetBox Atlassian Plugin
3
+
4
+ Display Jira issues and Confluence pages related to devices in NetBox.
5
+ Searches by configurable fields (hostname, serial, role, etc.) with OR logic.
6
+ """
7
+
8
+ from netbox.plugins import PluginConfig
9
+
10
+ __version__ = "0.1.0"
11
+
12
+
13
+ class AtlassianConfig(PluginConfig):
14
+ """Plugin configuration for NetBox Atlassian integration."""
15
+
16
+ name = "netbox_atlassian"
17
+ verbose_name = "Atlassian"
18
+ description = "Display Jira issues and Confluence pages related to devices"
19
+ version = __version__
20
+ author = "sieteunoseis"
21
+ author_email = "sieteunoseis@github.com"
22
+ base_url = "atlassian"
23
+ min_version = "4.0.0"
24
+
25
+ # Required settings - plugin won't load without these
26
+ required_settings = []
27
+
28
+ # Default configuration values
29
+ default_settings = {
30
+ # Jira settings (on-prem)
31
+ "jira_url": "", # e.g., "https://jira.example.com"
32
+ "jira_username": "",
33
+ "jira_password": "", # or API token
34
+ "jira_verify_ssl": True,
35
+ # Confluence settings (on-prem)
36
+ "confluence_url": "", # e.g., "https://confluence.example.com"
37
+ "confluence_username": "",
38
+ "confluence_password": "", # or API token
39
+ "confluence_token": "", # Personal Access Token (PAT) - preferred for on-prem
40
+ "confluence_verify_ssl": True,
41
+ # Cloud settings (for future use)
42
+ "use_cloud": False,
43
+ "cloud_api_token": "",
44
+ "cloud_email": "",
45
+ # Search configuration
46
+ # Fields to search - values are device attribute paths
47
+ # Searches use OR logic - matches any field
48
+ "search_fields": [
49
+ {"name": "Hostname", "attribute": "name", "enabled": True},
50
+ {"name": "Serial", "attribute": "serial", "enabled": True},
51
+ {"name": "Asset Tag", "attribute": "asset_tag", "enabled": False},
52
+ {"name": "Role", "attribute": "role.name", "enabled": False},
53
+ {"name": "Primary IP", "attribute": "primary_ip4.address", "enabled": False},
54
+ ],
55
+ # Jira search settings
56
+ "jira_max_results": 10,
57
+ "jira_projects": [], # Empty = search all projects
58
+ "jira_issue_types": [], # Empty = all types
59
+ # Confluence search settings
60
+ "confluence_max_results": 10,
61
+ "confluence_spaces": [], # Empty = search all spaces
62
+ # General settings
63
+ "timeout": 30,
64
+ "cache_timeout": 300, # Cache results for 5 minutes
65
+ # Enable legacy SSL renegotiation for older servers (required for OHSU wiki)
66
+ "enable_legacy_ssl": False,
67
+ # Device type filtering (like catalyst-center)
68
+ # Empty list = show tab for all devices
69
+ "device_types": [], # e.g., ["cisco", "juniper"]
70
+ }
71
+
72
+
73
+ config = AtlassianConfig