Skip to content

Commit 3ea1832

Browse files
authored
Merge pull request #80 from tobiasge/prepare-3.7
Prepare release 3.7.0
2 parents 04fbb73 + 842ec6b commit 3ea1832

File tree

6 files changed

+8
-37
lines changed

6 files changed

+8
-37
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Load data from YAML files into Netbox
66

77
First activate your virtual environment where Netbox is installed, the install the plugin version correspondig to your Netbox version.
88
```bash
9-
pip install "netbox-initializers==3.6.*"
9+
pip install "netbox-initializers==3.7.*"
1010
```
1111
Then you need to add the plugin to the `PLUGINS` array in the Netbox configuration.
1212
```python
@@ -36,6 +36,6 @@ The initializers where a part of the Docker image and where then extracted into
3636
To use the new plugin in a the Netbox Docker image, it musst be installad into the image. To this, the following example can be used as a starting point:
3737

3838
```dockerfile
39-
FROM netboxcommunity/netbox:v3.6
40-
RUN /opt/netbox/venv/bin/pip install "netbox-initializers==3.6.*"
39+
FROM netboxcommunity/netbox:v3.7
40+
RUN /opt/netbox/venv/bin/pip install "netbox-initializers==3.7.*"
4141
```

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license = "Apache-2.0"
1111
name = "netbox-initializers"
1212
readme = "README.md"
1313
repository = "https://github.com/tobiasge/netbox-initializers"
14-
version = "3.6.0"
14+
version = "3.7.0"
1515

1616
[tool.poetry.dependencies]
1717
python = "^3.8"

src/netbox_initializers/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ class NetBoxInitializersConfig(PluginConfig):
55
name = "netbox_initializers"
66
verbose_name = "NetBox Initializers"
77
description = "Load initial data into Netbox"
8-
version = "3.6.0"
8+
version = "3.7.0"
99
base_url = "initializers"
10-
min_version = "3.6.0"
11-
max_version = "3.6.99"
10+
min_version = "3.7.0"
11+
max_version = "3.7.99"
1212

1313

1414
config = NetBoxInitializersConfig

src/netbox_initializers/initializers/webhooks.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,10 @@ def load_data(self):
2020
if webhooks is None:
2121
return
2222
for hook in webhooks:
23-
obj_types = hook.pop("object_types")
24-
25-
try:
26-
obj_type_ids = [get_content_type_id(hook["name"], obj) for obj in obj_types]
27-
except ContentType.DoesNotExist:
28-
continue
29-
3023
matching_params, defaults = self.split_params(hook)
3124
webhook, created = Webhook.objects.get_or_create(**matching_params, defaults=defaults)
3225

3326
if created:
34-
webhook.content_types.set(obj_type_ids)
35-
webhook.save()
36-
3727
print("🪝 Created Webhook {0}".format(webhook.name))
3828

3929

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,8 @@
1-
## Possible Choices:
2-
## object_types:
3-
## - device
4-
## - site
5-
## - any-other-content-type
6-
## types:
7-
## - type_create
8-
## - type_update
9-
## - type_delete
101
## Examples:
112

123
# - name: device_creation
134
# payload_url: 'http://localhost:8080'
14-
# object_types:
15-
# - device
16-
# - cable
17-
# type_create: True
185
# - name: device_update
196
# payload_url: 'http://localhost:8080'
20-
# object_types:
21-
# - device
22-
# type_update: True
237
# - name: device_delete
248
# payload_url: 'http://localhost:8080'
25-
# object_types:
26-
# - device
27-
# type_delete: True

test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM netboxcommunity/netbox:v3.6
1+
FROM netboxcommunity/netbox:v3.7
22

33
COPY ../ /opt/netbox-initializers/
44
COPY ./test/config/plugins.py /etc/netbox/config/

0 commit comments

Comments
 (0)