Skip to content

Commit 0e6c56d

Browse files
committed
update for NetBox 4.5
1 parent 319afcf commit 0e6c56d

143 files changed

Lines changed: 376 additions & 375 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414

1515
- uses: isort/isort-action@v1
1616
with:
17-
sort-paths: "./netbox_inventory"
17+
sort-paths: "./netbox_inventory_plus"
1818

1919
- uses: astral-sh/ruff-action@v3
2020
with:
21-
src: "./netbox_inventory"
21+
src: "./netbox_inventory_plus"

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ jobs:
5252
- name: Create GitHub Release
5353
run: |
5454
echo "Finding version from dist/ filename..."
55-
VERSION="v$(ls dist/netbox_inventory-*.tar.gz | sed -E 's/.*netbox_inventory-([0-9.]+)\.tar\.gz/\1/')"
55+
VERSION="v$(ls dist/netbox_inventory_plus-*.tar.gz | sed -E 's/.*netbox_inventory_plus-([0-9.]+)\.tar\.gz/\1/')"
5656
echo "Extracted version: $VERSION"
5757
58-
gh release create "$VERSION" dist/netbox_inventory-*.tar.gz dist/netbox_inventory-*.whl \
58+
gh release create "$VERSION" dist/netbox_inventory_plus-*.tar.gz dist/netbox_inventory_plus-*.whl \
5959
--title "NetBox Inventory Plus $VERSION" \
6060
--notes "Release $VERSION"
6161

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
ref: ${{ matrix.netbox-version }}
4444
path: netbox
4545

46-
- name: install netbox_inventory
46+
- name: install netbox_inventory_plus
4747
working-directory: netbox-inventory
4848
run: |
4949
pip install .
@@ -56,4 +56,4 @@ jobs:
5656
- name: Run tests
5757
working-directory: netbox
5858
run: |
59-
python netbox/manage.py test netbox_inventory.tests -v 2
59+
python netbox/manage.py test netbox_inventory_plus.tests -v 2

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
recursive-include netbox_inventory/static *
2-
recursive-include netbox_inventory/templates *.html
1+
recursive-include netbox_inventory_plus/static *
2+
recursive-include netbox_inventory_plus/templates *.html

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ statuses can be set as needed by each NetBox installation.
4242
Two statuses can have a special meaning. One to indicate asset is in storage and one
4343
to indicate asset is in use.
4444

45-
netbox_inventory can automatically set status to the value specified in
45+
netbox_inventory_plus can automatically set status to the value specified in
4646
`used_status_name` configuration item when an asset is assigned to a device, module
4747
or inventory item.
4848

@@ -55,7 +55,7 @@ To disable automatically changing status, set these two config parameters to `No
5555

5656
With `asset_disable_editing_fields_for_tags` and `asset_disable_deletion_for_tags` you can prevent changes to specified asset data for assets that have certain tags attached. Changes are only prevented via web interface. API modifications are allowed.
5757

58-
The idea is that an external system uses some assets stored in netbox_inventory, and you want to prevent accidental changes to data directly in NetBox web interface. Only that external system should modify the data.
58+
The idea is that an external system uses some assets stored in netbox_inventory_plus, and you want to prevent accidental changes to data directly in NetBox web interface. Only that external system should modify the data.
5959

6060
## Compatibility
6161

@@ -70,6 +70,7 @@ support older netbox version as per table below:
7070
| 4.2 | 2.3.x |
7171
| 4.3 | 3.5.x |
7272
| 4.4 | 3.6.x |
73+
| 4.5 | 3.7.x |
7374

7475
## Installing
7576

@@ -103,11 +104,11 @@ After installation, enable the plugin in `/opt/netbox/netbox/netbox/configuratio
103104

104105
```python
105106
PLUGINS = [
106-
'netbox_inventory'
107+
'netbox_inventory_plus'
107108
]
108109

109110
PLUGINS_CONFIG = {
110-
"netbox_inventory": {},
111+
"netbox_inventory_plus": {},
111112
}
112113
```
113114

@@ -131,11 +132,11 @@ If you want to override the defaults for the plugin, you can do so in your via `
131132

132133
```python
133134
PLUGINS = [
134-
'netbox_inventory'
135+
'netbox_inventory_plus'
135136
]
136137

137138
PLUGINS_CONFIG = {
138-
"netbox_inventory": {
139+
"netbox_inventory_plus": {
139140
# Example settings below, see "Available settings"
140141
# in README.md for all possible settings
141142
"used_status_name": "used",
@@ -173,7 +174,7 @@ You can extend or define your own status choices for Asset, via [`FIELD_CHOICES`
173174

174175
```
175176
FIELD_CHOICES = {
176-
'netbox_inventory.Asset.status+': (
177+
'netbox_inventory_plus.Asset.status+': (
177178
('repair', 'In repair', 'orange'),
178179
),
179180
}
@@ -193,20 +194,20 @@ If you really want to store document in netbox itself, then consider using [netb
193194

194195
```python
195196
PLUGINS = [
196-
'netbox_inventory',
197+
'netbox_inventory_plus',
197198
'netbox_attachments',
198199
]
199200

200201
PLUGINS_CONFIG = {
201202
'netbox_attachments': {
202-
'apps': ['netbox_inventory',],
203+
'apps': ['netbox_inventory_plus',],
203204
'display_setting': {
204-
"netbox_inventory.supplier": "left_page",
205-
"netbox_inventory.purchase": "full_width_page",
206-
"netbox_inventory.delivery": "righ_page",
207-
"netbox_inventory.asset": "hidden",
208-
"netbox_inventory.inventoryitemtype": "hidden",
209-
"netbox_inventory.inventoryitemgroup": "hidden",
205+
"netbox_inventory_plus.supplier": "left_page",
206+
"netbox_inventory_plus.purchase": "full_width_page",
207+
"netbox_inventory_plus.delivery": "righ_page",
208+
"netbox_inventory_plus.asset": "hidden",
209+
"netbox_inventory_plus.inventoryitemtype": "hidden",
210+
"netbox_inventory_plus.inventoryitemgroup": "hidden",
210211
},
211212
},
212213
}

netbox_inventory/version.py

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55

66
class NetBoxInventoryConfig(PluginConfig):
7-
name = 'netbox_inventory'
8-
verbose_name = 'NetBox Inventory'
7+
name = 'netbox_inventory_plus'
8+
verbose_name = 'NetBox Inventory Plus'
99
version = __version__
1010
description = 'Inventory asset management in NetBox'
11-
author = 'Matej Vadnjal'
12-
author_email = 'matej.vadnjal@arnes.si'
13-
base_url = 'inventory'
14-
min_version = '4.4.0'
15-
max_version = '4.4.99'
11+
author = 'Sol1'
12+
author_email = 'support@sol1.com.au'
13+
base_url = 'inventory_plus'
14+
min_version = '4.5.0'
15+
max_version = '4.5.99'
1616
default_settings = {
1717
'top_level_menu': True,
1818
'planned_status_name': 'planned',

0 commit comments

Comments
 (0)