netbox-docker-plugin 2.8.0__tar.gz → 3.0.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.
- {netbox_docker_plugin-2.8.0/netbox_docker_plugin.egg-info → netbox_docker_plugin-3.0.0}/PKG-INFO +10 -2
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/README.md +8 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/__init__.py +6 -5
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/api/serializers.py +12 -1
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/host.py +10 -0
- netbox_docker_plugin-3.0.0/netbox_docker_plugin/migrations/0033_host_operation.py +20 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/container.py +4 -1
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/host.py +29 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templates/netbox_docker_plugin/host.html +50 -40
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/container/test_container_actions.py +32 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/container/test_container_operation_view.py +2 -2
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/container/test_container_views.py +1 -1
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/host/test_host_api.py +3 -2
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/host/test_host_views.py +2 -2
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/urls.py +5 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/utilities/__init__.py +32 -6
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/host.py +11 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0/netbox_docker_plugin.egg-info}/PKG-INFO +10 -2
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin.egg-info/SOURCES.txt +1 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/pyproject.toml +2 -2
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/LICENSE +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/MANIFEST.in +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/api/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/api/renderers.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/api/urls.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/api/views.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/filtersets.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/bind.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/container.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/device.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/env.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/image.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/label.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/mount.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/network.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/network_setting.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/port.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/registry.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/volume.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0001_initial.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0002_image.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0003_image_size.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0004_volume.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0005_network.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0006_container_port_mount_label_env_and_more.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0007_remove_container_netbox_docker_plugin_container_unique_name_host__and_more.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0008_alter_network_unique_together_network_networkid_and_more.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0009_remove_container_network_networksettings_and_more.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0010_container_containerid_and_more.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0011_host_token.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0012_host_state.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0013_host_netbox_url.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0014_container_operation.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0015_remove_mount_netbox_docker_plugin_mount_unique_volume_and_more.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0016_alter_env_value.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0017_network_state.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0018_alter_mount_volume_alter_networksetting_network.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0019_host_agent_version_host_docker_api_version.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0020_container_hostname.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0021_registry_and_more.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0022_bind_bind_netbox_docker_plugin_bind_unique_bind.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0023_delete_hosts.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0024_registry_host_alter_registry_name_and_more.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0025_alter_image_version.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0026_image_digest.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0027_container_restart_policy.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0028_mount_and_bind_read_only.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0029_alter_container_state.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0030_alter_container_containerid_alter_container_hostname_and_more.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0031_container_cap_add.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/0032_device_and_more.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/migrations/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/image.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/network.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/registry.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/volume.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/navigation.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/signals.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tables.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-exec.html +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-layout.html +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-logs.html +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container.html +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templates/netbox_docker_plugin/host-graph.html +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templates/netbox_docker_plugin/image.html +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templates/netbox_docker_plugin/network.html +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templates/netbox_docker_plugin/registry.html +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templates/netbox_docker_plugin/volume.html +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templatetags/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templatetags/host.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/base.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/container/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/container/test_container_api.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/container/test_container_api_exec.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/container/test_container_validation.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/host/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/host/test_replace_password.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/image/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/image/test_image_api.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/image/test_image_views.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/network/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/network/test_network_api.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/network/test_network_views.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/registry/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/registry/test_registry_api.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/registry/test_registry_views.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/test_init.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/volume/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/volume/test_volume_api.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/volume/test_volume_views.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/__init__.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/bind.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/container.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/device.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/env.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/image.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/label.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/mount.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/network.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/network_setting.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/port.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/registry.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/volume.py +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin.egg-info/dependency_links.txt +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin.egg-info/top_level.txt +0 -0
- {netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/setup.cfg +0 -0
{netbox_docker_plugin-2.8.0/netbox_docker_plugin.egg-info → netbox_docker_plugin-3.0.0}/PKG-INFO
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netbox-docker-plugin
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: Manage Docker with Netbox & style.
|
|
5
5
|
Author-email: Vincent Simonin <vincent@saashup.com>, David Delassus <david.jose.delassus@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/SaaShup/netbox-docker-plugin
|
|
7
7
|
Project-URL: Bug Tracker, https://github.com/SaaShup/netbox-docker-plugin/issues
|
|
8
8
|
Keywords: netbox,netbox-plugin,docker
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
13
|
|
|
@@ -40,6 +40,14 @@ Once the plugin and webhooks are installed, you can:
|
|
|
40
40
|
|
|
41
41
|
## Installation
|
|
42
42
|
|
|
43
|
+
Below the compatibility list of the Netbox Docker PLugin and Netbox. Please chose the right version of the plugin depending of the Netbox version you use:
|
|
44
|
+
|
|
45
|
+
| Netbox Version | Netbox Docker Plugin Version |
|
|
46
|
+
| -------------- | ---------------------------- |
|
|
47
|
+
| 3.\* | 1.\* |
|
|
48
|
+
| 4.0.\* | 2.\* |
|
|
49
|
+
| 4.1.\* | 3.\* |
|
|
50
|
+
|
|
43
51
|
You can follow [the official plugins installation
|
|
44
52
|
instructions](https://docs.netbox.dev/en/stable/plugins/#installing-plugins).
|
|
45
53
|
|
|
@@ -27,6 +27,14 @@ Once the plugin and webhooks are installed, you can:
|
|
|
27
27
|
|
|
28
28
|
## Installation
|
|
29
29
|
|
|
30
|
+
Below the compatibility list of the Netbox Docker PLugin and Netbox. Please chose the right version of the plugin depending of the Netbox version you use:
|
|
31
|
+
|
|
32
|
+
| Netbox Version | Netbox Docker Plugin Version |
|
|
33
|
+
| -------------- | ---------------------------- |
|
|
34
|
+
| 3.\* | 1.\* |
|
|
35
|
+
| 4.0.\* | 2.\* |
|
|
36
|
+
| 4.1.\* | 3.\* |
|
|
37
|
+
|
|
30
38
|
You can follow [the official plugins installation
|
|
31
39
|
instructions](https://docs.netbox.dev/en/stable/plugins/#installing-plugins).
|
|
32
40
|
|
|
@@ -4,20 +4,21 @@ from django.db.models.signals import post_migrate
|
|
|
4
4
|
from netbox.plugins import PluginConfig
|
|
5
5
|
from .utilities import create_webhook
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
class NetBoxDockerConfig(PluginConfig):
|
|
8
9
|
"""Plugin Config Class"""
|
|
9
10
|
|
|
10
11
|
name = "netbox_docker_plugin"
|
|
11
12
|
verbose_name = " NetBox Docker Plugin"
|
|
12
13
|
description = "Manage Docker"
|
|
13
|
-
version = "
|
|
14
|
+
version = "3.0.0"
|
|
14
15
|
base_url = "docker"
|
|
15
|
-
min_version = "4.
|
|
16
|
-
author= "Vincent Simonin <vincent@saashup.com>, David Delassus <david.jose.delassus@gmail.com>"
|
|
17
|
-
author_email= "vincent@saashup.com, david.jose.delassus@gmail.com"
|
|
16
|
+
min_version = "4.1.0"
|
|
17
|
+
author = "Vincent Simonin <vincent@saashup.com>, David Delassus <david.jose.delassus@gmail.com>"
|
|
18
|
+
author_email = "vincent@saashup.com, david.jose.delassus@gmail.com"
|
|
18
19
|
|
|
19
20
|
def ready(self):
|
|
20
|
-
from . import signals
|
|
21
|
+
from . import signals # pylint: disable=unused-import, import-outside-toplevel
|
|
21
22
|
|
|
22
23
|
post_migrate.connect(create_webhook)
|
|
23
24
|
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/api/serializers.py
RENAMED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
from rest_framework import serializers
|
|
6
6
|
from utilities.query import dict_to_filter_params
|
|
7
|
-
from users.
|
|
7
|
+
from users.models import Token
|
|
8
8
|
from netbox.api.serializers import NetBoxModelSerializer, WritableNestedSerializer
|
|
9
9
|
from ..models.host import Host
|
|
10
10
|
from ..models.image import Image
|
|
@@ -23,6 +23,15 @@ from ..models.container import (
|
|
|
23
23
|
from ..models.registry import Registry
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
class NestedTokenSerializer(WritableNestedSerializer):
|
|
27
|
+
"""Nested Token Serializer class"""
|
|
28
|
+
|
|
29
|
+
class Meta:
|
|
30
|
+
"""Nested Token Serializer Meta class"""
|
|
31
|
+
model = Token
|
|
32
|
+
fields = ["id", "url", "display_url", "display", "key", "write_enabled"]
|
|
33
|
+
|
|
34
|
+
|
|
26
35
|
class NestedHostSerializer(WritableNestedSerializer):
|
|
27
36
|
"""Nested Host Serializer class"""
|
|
28
37
|
|
|
@@ -43,6 +52,7 @@ class NestedHostSerializer(WritableNestedSerializer):
|
|
|
43
52
|
"state",
|
|
44
53
|
"agent_version",
|
|
45
54
|
"docker_api_version",
|
|
55
|
+
"operation",
|
|
46
56
|
)
|
|
47
57
|
|
|
48
58
|
|
|
@@ -615,6 +625,7 @@ class HostSerializer(NetBoxModelSerializer):
|
|
|
615
625
|
"netbox_base_url",
|
|
616
626
|
"agent_version",
|
|
617
627
|
"docker_api_version",
|
|
628
|
+
"operation",
|
|
618
629
|
"custom_fields",
|
|
619
630
|
"created",
|
|
620
631
|
"last_updated",
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/host.py
RENAMED
|
@@ -72,3 +72,13 @@ class HostBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
72
72
|
|
|
73
73
|
model = Host
|
|
74
74
|
fieldsets = (FieldSet("endpoint", name="General"),)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class HostOperationForm(NetBoxModelForm):
|
|
78
|
+
"""Host Operation form definition class"""
|
|
79
|
+
|
|
80
|
+
class Meta:
|
|
81
|
+
"""Host form definition Meta class"""
|
|
82
|
+
|
|
83
|
+
model = Host
|
|
84
|
+
fields = ("operation",)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# pylint: disable=C0103
|
|
2
|
+
"""Migration file"""
|
|
3
|
+
|
|
4
|
+
from django.db import migrations, models
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
"""Migration file"""
|
|
9
|
+
|
|
10
|
+
dependencies = [
|
|
11
|
+
("netbox_docker_plugin", "0032_device_and_more"),
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
operations = [
|
|
15
|
+
migrations.AddField(
|
|
16
|
+
model_name="host",
|
|
17
|
+
name="operation",
|
|
18
|
+
field=models.CharField(default="none", max_length=32),
|
|
19
|
+
),
|
|
20
|
+
]
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/container.py
RENAMED
|
@@ -182,7 +182,10 @@ class Container(NetBoxModel):
|
|
|
182
182
|
@property
|
|
183
183
|
def can_delete(self) -> bool:
|
|
184
184
|
"""Check if the container can be deleted"""
|
|
185
|
-
return self.host.state
|
|
185
|
+
return self.host.state in [
|
|
186
|
+
HostStateChoices.STATE_DELETED,
|
|
187
|
+
HostStateChoices.STATE_REFRESHING,
|
|
188
|
+
] or self.state in [
|
|
186
189
|
"created",
|
|
187
190
|
"paused",
|
|
188
191
|
"exited",
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/host.py
RENAMED
|
@@ -20,11 +20,27 @@ class HostStateChoices(ChoiceSet):
|
|
|
20
20
|
STATE_CREATED = "created"
|
|
21
21
|
STATE_DELETED = "deleted"
|
|
22
22
|
STATE_RUNNING = "running"
|
|
23
|
+
STATE_REFRESHING = "refreshing"
|
|
23
24
|
|
|
24
25
|
CHOICES = [
|
|
25
26
|
(STATE_CREATED, "Created", "dark"),
|
|
26
27
|
(STATE_RUNNING, "Running", "blue"),
|
|
27
28
|
(STATE_DELETED, "Deleted", "blue"),
|
|
29
|
+
(STATE_REFRESHING, "Refreshing", "blue"),
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class HostOperationChoices(ChoiceSet):
|
|
34
|
+
"""Host operation choices definition class"""
|
|
35
|
+
|
|
36
|
+
key = "Host.operation"
|
|
37
|
+
|
|
38
|
+
OPERATION_REFRESH = "refresh"
|
|
39
|
+
OPERATION_NONE = "none"
|
|
40
|
+
|
|
41
|
+
CHOICES = [
|
|
42
|
+
(OPERATION_REFRESH, "Refresh", "blue"),
|
|
43
|
+
(OPERATION_NONE, "None", "white"),
|
|
28
44
|
]
|
|
29
45
|
|
|
30
46
|
|
|
@@ -62,6 +78,11 @@ class Host(NetBoxModel):
|
|
|
62
78
|
null=True,
|
|
63
79
|
blank=True,
|
|
64
80
|
)
|
|
81
|
+
operation = models.CharField(
|
|
82
|
+
max_length=32,
|
|
83
|
+
choices=HostOperationChoices,
|
|
84
|
+
default=HostOperationChoices.OPERATION_NONE,
|
|
85
|
+
)
|
|
65
86
|
|
|
66
87
|
class Meta:
|
|
67
88
|
"""Host Model Meta Class"""
|
|
@@ -80,3 +101,11 @@ class Host(NetBoxModel):
|
|
|
80
101
|
self.save()
|
|
81
102
|
|
|
82
103
|
return super().delete(using, keep_parents)
|
|
104
|
+
|
|
105
|
+
def save(
|
|
106
|
+
self, force_insert=False, force_update=False, using=None, update_fields=None
|
|
107
|
+
):
|
|
108
|
+
if self.operation == HostOperationChoices.OPERATION_REFRESH:
|
|
109
|
+
self.state = HostStateChoices.STATE_REFRESHING
|
|
110
|
+
|
|
111
|
+
return super().save(force_insert, force_update, using, update_fields)
|
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
{% load plugins %}
|
|
4
4
|
{% load host %}
|
|
5
5
|
|
|
6
|
+
{% block extra_controls %}
|
|
7
|
+
<form action="{% url 'plugins:netbox_docker_plugin:host_operation' pk=object.id operation='refresh' %}" method="post">
|
|
8
|
+
{% csrf_token %}
|
|
9
|
+
<input type="hidden" name="operation" value="refresh">
|
|
10
|
+
<button type="submit" class="btn btn-warning">
|
|
11
|
+
<i class="mdi mdi-cog-refresh"></i> Refresh
|
|
12
|
+
</button>
|
|
13
|
+
</form>
|
|
14
|
+
{% endblock extra_controls %}
|
|
15
|
+
|
|
6
16
|
{% block content %}
|
|
7
17
|
<div class="row mb-3">
|
|
8
18
|
<div class="col col-md-6">
|
|
@@ -30,6 +40,10 @@
|
|
|
30
40
|
<th scope="row">Docker API Version</th>
|
|
31
41
|
<td>{{ object.docker_api_version|placeholder }}</td>
|
|
32
42
|
</tr>
|
|
43
|
+
<tr>
|
|
44
|
+
<th scope="row">Operation</th>
|
|
45
|
+
<td>{{ object.get_operation_display }}</td>
|
|
46
|
+
</tr>
|
|
33
47
|
</table>
|
|
34
48
|
</div>
|
|
35
49
|
</div>
|
|
@@ -47,15 +61,14 @@
|
|
|
47
61
|
<div class="card">
|
|
48
62
|
<h5 class="card-header">Registry</h5>
|
|
49
63
|
<div class="card-body htmx-container table-responsive"
|
|
50
|
-
hx-get="{% url 'plugins:netbox_docker_plugin:registry_list' %}?host_id={{ object.pk }}"
|
|
51
|
-
hx-trigger="load"
|
|
52
|
-
></div>
|
|
64
|
+
hx-get="{% url 'plugins:netbox_docker_plugin:registry_list' %}?host_id={{ object.pk }}" hx-trigger="load"></div>
|
|
53
65
|
{% if perms.netbox_docker_plugin.add_container %}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</
|
|
66
|
+
<div class="card-footer text-end noprint">
|
|
67
|
+
<a href="{% url 'plugins:netbox_docker_plugin:registry_add' %}?host={{ object.pk }}&return_url={{ object.get_absolute_url }}"
|
|
68
|
+
class="btn btn-primary">
|
|
69
|
+
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add a Registry
|
|
70
|
+
</a>
|
|
71
|
+
</div>
|
|
59
72
|
{% endif %}
|
|
60
73
|
</div>
|
|
61
74
|
{% plugin_full_width_page object %}
|
|
@@ -64,15 +77,15 @@
|
|
|
64
77
|
<div class="card">
|
|
65
78
|
<h5 class="card-header">Container</h5>
|
|
66
79
|
<div class="card-body htmx-container table-responsive"
|
|
67
|
-
hx-get="{% url 'plugins:netbox_docker_plugin:container_list' %}?host_id={{ object.pk }}"
|
|
68
|
-
|
|
69
|
-
></div>
|
|
80
|
+
hx-get="{% url 'plugins:netbox_docker_plugin:container_list' %}?host_id={{ object.pk }}" hx-trigger="load">
|
|
81
|
+
</div>
|
|
70
82
|
{% if perms.netbox_docker_plugin.add_container %}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
</
|
|
83
|
+
<div class="card-footer text-end noprint">
|
|
84
|
+
<a href="{% url 'plugins:netbox_docker_plugin:container_add' %}?host={{ object.pk }}&return_url={{ object.get_absolute_url }}"
|
|
85
|
+
class="btn btn-primary">
|
|
86
|
+
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add a Container
|
|
87
|
+
</a>
|
|
88
|
+
</div>
|
|
76
89
|
{% endif %}
|
|
77
90
|
</div>
|
|
78
91
|
{% plugin_full_width_page object %}
|
|
@@ -81,15 +94,14 @@
|
|
|
81
94
|
<div class="card">
|
|
82
95
|
<h5 class="card-header">Images</h5>
|
|
83
96
|
<div class="card-body htmx-container table-responsive"
|
|
84
|
-
hx-get="{% url 'plugins:netbox_docker_plugin:image_list' %}?host_id={{ object.pk }}"
|
|
85
|
-
hx-trigger="load"
|
|
86
|
-
></div>
|
|
97
|
+
hx-get="{% url 'plugins:netbox_docker_plugin:image_list' %}?host_id={{ object.pk }}" hx-trigger="load"></div>
|
|
87
98
|
{% if perms.netbox_docker_plugin.add_image %}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</
|
|
99
|
+
<div class="card-footer text-end noprint">
|
|
100
|
+
<a href="{% url 'plugins:netbox_docker_plugin:image_add' %}?host={{ object.pk }}&return_url={{ object.get_absolute_url }}"
|
|
101
|
+
class="btn btn-primary">
|
|
102
|
+
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add an Image
|
|
103
|
+
</a>
|
|
104
|
+
</div>
|
|
93
105
|
{% endif %}
|
|
94
106
|
</div>
|
|
95
107
|
{% plugin_full_width_page object %}
|
|
@@ -98,15 +110,14 @@
|
|
|
98
110
|
<div class="card">
|
|
99
111
|
<h5 class="card-header">Volumes</h5>
|
|
100
112
|
<div class="card-body htmx-container table-responsive"
|
|
101
|
-
hx-get="{% url 'plugins:netbox_docker_plugin:volume_list' %}?host_id={{ object.pk }}"
|
|
102
|
-
hx-trigger="load"
|
|
103
|
-
></div>
|
|
113
|
+
hx-get="{% url 'plugins:netbox_docker_plugin:volume_list' %}?host_id={{ object.pk }}" hx-trigger="load"></div>
|
|
104
114
|
{% if perms.netbox_docker_plugin.add_volume %}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
</
|
|
115
|
+
<div class="card-footer text-end noprint">
|
|
116
|
+
<a href="{% url 'plugins:netbox_docker_plugin:volume_add' %}?host={{ object.pk }}&return_url={{ object.get_absolute_url }}"
|
|
117
|
+
class="btn btn-primary">
|
|
118
|
+
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add a Volume
|
|
119
|
+
</a>
|
|
120
|
+
</div>
|
|
110
121
|
{% endif %}
|
|
111
122
|
</div>
|
|
112
123
|
{% plugin_full_width_page object %}
|
|
@@ -115,15 +126,14 @@
|
|
|
115
126
|
<div class="card">
|
|
116
127
|
<h5 class="card-header">Networks</h5>
|
|
117
128
|
<div class="card-body htmx-container table-responsive"
|
|
118
|
-
hx-get="{% url 'plugins:netbox_docker_plugin:network_list' %}?host_id={{ object.pk }}"
|
|
119
|
-
hx-trigger="load"
|
|
120
|
-
></div>
|
|
129
|
+
hx-get="{% url 'plugins:netbox_docker_plugin:network_list' %}?host_id={{ object.pk }}" hx-trigger="load"></div>
|
|
121
130
|
{% if perms.netbox_docker_plugin.add_network %}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
</
|
|
131
|
+
<div class="card-footer text-end noprint">
|
|
132
|
+
<a href="{% url 'plugins:netbox_docker_plugin:network_add' %}?host={{ object.pk }}&return_url={{ object.get_absolute_url }}"
|
|
133
|
+
class="btn btn-primary">
|
|
134
|
+
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add a Network
|
|
135
|
+
</a>
|
|
136
|
+
</div>
|
|
127
137
|
{% endif %}
|
|
128
138
|
</div>
|
|
129
139
|
{% plugin_full_width_page object %}
|
|
@@ -161,6 +161,33 @@ class ContainerActionTestCase(TestCase):
|
|
|
161
161
|
|
|
162
162
|
self.assertFalse(Container.objects.filter(name=name).exists())
|
|
163
163
|
|
|
164
|
+
def test_delete_container_on_refreshing_host(self):
|
|
165
|
+
"""Test that a container on a refreshing host can be deleted"""
|
|
166
|
+
|
|
167
|
+
for state in [
|
|
168
|
+
"created",
|
|
169
|
+
"running",
|
|
170
|
+
"restarted",
|
|
171
|
+
"paused",
|
|
172
|
+
"exited",
|
|
173
|
+
"dead",
|
|
174
|
+
"none",
|
|
175
|
+
]:
|
|
176
|
+
with self.subTest(operation="delete", state=state):
|
|
177
|
+
with transaction.atomic():
|
|
178
|
+
name = f"container-delete-{state}"
|
|
179
|
+
obj = Container.objects.create(
|
|
180
|
+
host=self.objects["host3"],
|
|
181
|
+
image=self.objects["image2"],
|
|
182
|
+
name=name,
|
|
183
|
+
operation="none",
|
|
184
|
+
state=state,
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
obj.delete()
|
|
188
|
+
|
|
189
|
+
self.assertFalse(Container.objects.filter(name=name).exists())
|
|
190
|
+
|
|
164
191
|
@classmethod
|
|
165
192
|
def setUpTestData(cls):
|
|
166
193
|
cls.objects["host1"] = Host.objects.create(
|
|
@@ -193,3 +220,8 @@ class ContainerActionTestCase(TestCase):
|
|
|
193
220
|
registry=cls.objects["registry2"],
|
|
194
221
|
name="image2",
|
|
195
222
|
)
|
|
223
|
+
cls.objects["host3"] = Host.objects.create(
|
|
224
|
+
endpoint="http://localhost:8080",
|
|
225
|
+
name="host3",
|
|
226
|
+
state=HostStateChoices.STATE_REFRESHING,
|
|
227
|
+
)
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
from django.urls import reverse
|
|
5
5
|
from django.test import override_settings
|
|
6
6
|
from core.models import ObjectType
|
|
7
|
+
from core.models import ObjectChange
|
|
8
|
+
from core.choices import ObjectChangeActionChoices
|
|
7
9
|
from utilities.testing import ModelViewTestCase
|
|
8
10
|
from utilities.testing.utils import disable_warnings, post_data
|
|
9
11
|
from users.models import ObjectPermission
|
|
10
|
-
from extras.choices import ObjectChangeActionChoices
|
|
11
|
-
from extras.models import ObjectChange
|
|
12
12
|
from netbox_docker_plugin.models.host import Host
|
|
13
13
|
from netbox_docker_plugin.models.container import Container
|
|
14
14
|
from netbox_docker_plugin.models.image import Image
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Host API Test Case"""
|
|
2
2
|
|
|
3
3
|
from core.models import ObjectType
|
|
4
|
-
from
|
|
5
|
-
from
|
|
4
|
+
from core.choices import ObjectChangeActionChoices
|
|
5
|
+
from core.models import ObjectChange
|
|
6
6
|
from users.models import ObjectPermission
|
|
7
7
|
from rest_framework import status
|
|
8
8
|
from utilities.testing import APIViewTestCases
|
|
@@ -29,6 +29,7 @@ class HostApiTestCase(
|
|
|
29
29
|
"endpoint",
|
|
30
30
|
"id",
|
|
31
31
|
"name",
|
|
32
|
+
"operation",
|
|
32
33
|
"state",
|
|
33
34
|
"url",
|
|
34
35
|
]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""Host Views Test Case"""
|
|
2
2
|
|
|
3
3
|
from core.models import ObjectType
|
|
4
|
+
from core.choices import ObjectChangeActionChoices
|
|
5
|
+
from core.models import ObjectChange
|
|
4
6
|
from django.core.exceptions import ObjectDoesNotExist
|
|
5
|
-
from extras.choices import ObjectChangeActionChoices
|
|
6
|
-
from extras.models import ObjectChange
|
|
7
7
|
from users.models import ObjectPermission
|
|
8
8
|
from utilities.testing import ViewTestCases, post_data
|
|
9
9
|
from netbox_docker_plugin.models.host import Host
|
|
@@ -42,6 +42,11 @@ urlpatterns = (
|
|
|
42
42
|
host_views.HostDeleteView.as_view(),
|
|
43
43
|
name="host_delete",
|
|
44
44
|
),
|
|
45
|
+
path(
|
|
46
|
+
"hosts/<int:pk>/operation/<str:operation>/",
|
|
47
|
+
host_views.HostOperationView.as_view(),
|
|
48
|
+
name="host_operation",
|
|
49
|
+
),
|
|
45
50
|
path(
|
|
46
51
|
"hosts/<int:pk>/graph/",
|
|
47
52
|
host_views.HostGraphView.as_view(),
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/utilities/__init__.py
RENAMED
|
@@ -132,6 +132,19 @@ webhooks = [
|
|
|
132
132
|
"payload_url": "{{ data.host.endpoint }}/api/engine/volumes",
|
|
133
133
|
"ssl_verification": False,
|
|
134
134
|
},
|
|
135
|
+
{
|
|
136
|
+
"name": "[Docker] Modify host",
|
|
137
|
+
"content_types": "host",
|
|
138
|
+
"enabled": True,
|
|
139
|
+
"type_create": False,
|
|
140
|
+
"type_update": True,
|
|
141
|
+
"type_delete": False,
|
|
142
|
+
"type_job_start": False,
|
|
143
|
+
"type_job_end": False,
|
|
144
|
+
"http_method": "POST",
|
|
145
|
+
"payload_url": "{{ data.endpoint }}/api/engine/endpoint",
|
|
146
|
+
"ssl_verification": False,
|
|
147
|
+
},
|
|
135
148
|
{
|
|
136
149
|
"name": "[Docker] Modify image",
|
|
137
150
|
"content_types": "image",
|
|
@@ -189,16 +202,29 @@ def create_webhook(app_config, **kwargs):
|
|
|
189
202
|
)
|
|
190
203
|
obj.save()
|
|
191
204
|
|
|
205
|
+
event_types = []
|
|
206
|
+
|
|
207
|
+
if webhook["type_create"]:
|
|
208
|
+
event_types.append("object_created")
|
|
209
|
+
|
|
210
|
+
if webhook["type_update"]:
|
|
211
|
+
event_types.append("object_updated")
|
|
212
|
+
|
|
213
|
+
if webhook["type_delete"]:
|
|
214
|
+
event_types.append("object_deleted")
|
|
215
|
+
|
|
216
|
+
if webhook["type_job_start"]:
|
|
217
|
+
event_types.append("job_started")
|
|
218
|
+
|
|
219
|
+
if webhook["type_job_end"]:
|
|
220
|
+
event_types.append("job_completed")
|
|
221
|
+
|
|
192
222
|
eventrule = EventRule(
|
|
193
223
|
name=webhook["name"],
|
|
194
224
|
description="Added automatically by the Netbox Docker Plugin",
|
|
195
|
-
|
|
196
|
-
type_update=webhook["type_update"],
|
|
197
|
-
type_delete=webhook["type_delete"],
|
|
198
|
-
type_job_start=webhook["type_job_start"],
|
|
199
|
-
type_job_end=webhook["type_job_end"],
|
|
225
|
+
event_types=event_types,
|
|
200
226
|
action_object_id=obj.pk,
|
|
201
|
-
action_object_type=wh_content_type
|
|
227
|
+
action_object_type=wh_content_type,
|
|
202
228
|
)
|
|
203
229
|
eventrule.save()
|
|
204
230
|
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/host.py
RENAMED
|
@@ -130,3 +130,14 @@ class HostBulkDeleteView(generic.BulkDeleteView):
|
|
|
130
130
|
queryset = Host.objects.all()
|
|
131
131
|
filterset = filtersets.HostFilterSet
|
|
132
132
|
table = tables.HostTable
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class HostOperationView(generic.ObjectEditView):
|
|
136
|
+
"""Host operation view definition"""
|
|
137
|
+
|
|
138
|
+
def get_object(self, **kwargs):
|
|
139
|
+
new_kwargs = {"pk": kwargs["pk"]}
|
|
140
|
+
return super().get_object(**new_kwargs)
|
|
141
|
+
|
|
142
|
+
queryset = Host.objects.all()
|
|
143
|
+
form = host.HostOperationForm
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0/netbox_docker_plugin.egg-info}/PKG-INFO
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netbox-docker-plugin
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: Manage Docker with Netbox & style.
|
|
5
5
|
Author-email: Vincent Simonin <vincent@saashup.com>, David Delassus <david.jose.delassus@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/SaaShup/netbox-docker-plugin
|
|
7
7
|
Project-URL: Bug Tracker, https://github.com/SaaShup/netbox-docker-plugin/issues
|
|
8
8
|
Keywords: netbox,netbox-plugin,docker
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
13
|
|
|
@@ -40,6 +40,14 @@ Once the plugin and webhooks are installed, you can:
|
|
|
40
40
|
|
|
41
41
|
## Installation
|
|
42
42
|
|
|
43
|
+
Below the compatibility list of the Netbox Docker PLugin and Netbox. Please chose the right version of the plugin depending of the Netbox version you use:
|
|
44
|
+
|
|
45
|
+
| Netbox Version | Netbox Docker Plugin Version |
|
|
46
|
+
| -------------- | ---------------------------- |
|
|
47
|
+
| 3.\* | 1.\* |
|
|
48
|
+
| 4.0.\* | 2.\* |
|
|
49
|
+
| 4.1.\* | 3.\* |
|
|
50
|
+
|
|
43
51
|
You can follow [the official plugins installation
|
|
44
52
|
instructions](https://docs.netbox.dev/en/stable/plugins/#installing-plugins).
|
|
45
53
|
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin.egg-info/SOURCES.txt
RENAMED
|
@@ -63,6 +63,7 @@ netbox_docker_plugin/migrations/0029_alter_container_state.py
|
|
|
63
63
|
netbox_docker_plugin/migrations/0030_alter_container_containerid_alter_container_hostname_and_more.py
|
|
64
64
|
netbox_docker_plugin/migrations/0031_container_cap_add.py
|
|
65
65
|
netbox_docker_plugin/migrations/0032_device_and_more.py
|
|
66
|
+
netbox_docker_plugin/migrations/0033_host_operation.py
|
|
66
67
|
netbox_docker_plugin/migrations/__init__.py
|
|
67
68
|
netbox_docker_plugin/models/__init__.py
|
|
68
69
|
netbox_docker_plugin/models/container.py
|
|
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "netbox-docker-plugin"
|
|
7
|
-
version = "
|
|
7
|
+
version = "3.0.0"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Vincent Simonin", email="vincent@saashup.com" },
|
|
10
10
|
{ name="David Delassus", email="david.jose.delassus@gmail.com" }
|
|
11
11
|
]
|
|
12
12
|
description = "Manage Docker with Netbox & style."
|
|
13
13
|
readme = "README.md"
|
|
14
|
-
requires-python = ">=3.
|
|
14
|
+
requires-python = ">=3.11"
|
|
15
15
|
classifiers = [
|
|
16
16
|
"Programming Language :: Python :: 3",
|
|
17
17
|
]
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/api/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/api/renderers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/filtersets.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/bind.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/container.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/device.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/label.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/mount.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/network.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/port.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/registry.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/forms/volume.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/network.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/registry.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/models/volume.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/navigation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/templatetags/host.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/tests/test_init.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/bind.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/container.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/device.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/label.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/mount.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/network.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/port.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/registry.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.8.0 → netbox_docker_plugin-3.0.0}/netbox_docker_plugin/views/volume.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|