netbox-docker-plugin 2.7.0__tar.gz → 2.9.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.7.0/netbox_docker_plugin.egg-info → netbox_docker_plugin-2.9.0}/PKG-INFO +1 -1
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/__init__.py +5 -4
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/api/serializers.py +2 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/host.py +10 -0
- netbox_docker_plugin-2.9.0/netbox_docker_plugin/migrations/0033_host_operation.py +20 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/container.py +10 -1
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/host.py +29 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/signals.py +1 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-layout.html +14 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templates/netbox_docker_plugin/host.html +50 -40
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/container/test_container_actions.py +66 -10
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/host/test_host_api.py +1 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/urls.py +5 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/utilities/__init__.py +14 -1
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/host.py +11 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0/netbox_docker_plugin.egg-info}/PKG-INFO +1 -1
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin.egg-info/SOURCES.txt +1 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/pyproject.toml +1 -1
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/LICENSE +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/MANIFEST.in +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/README.md +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/api/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/api/renderers.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/api/urls.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/api/views.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/filtersets.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/bind.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/container.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/device.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/env.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/image.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/label.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/mount.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/network.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/network_setting.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/port.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/registry.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/volume.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0001_initial.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0002_image.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0003_image_size.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0004_volume.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0005_network.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0006_container_port_mount_label_env_and_more.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0007_remove_container_netbox_docker_plugin_container_unique_name_host__and_more.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0008_alter_network_unique_together_network_networkid_and_more.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0009_remove_container_network_networksettings_and_more.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0010_container_containerid_and_more.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0011_host_token.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0012_host_state.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0013_host_netbox_url.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0014_container_operation.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0015_remove_mount_netbox_docker_plugin_mount_unique_volume_and_more.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0016_alter_env_value.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0017_network_state.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0018_alter_mount_volume_alter_networksetting_network.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0019_host_agent_version_host_docker_api_version.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0020_container_hostname.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0021_registry_and_more.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0022_bind_bind_netbox_docker_plugin_bind_unique_bind.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0023_delete_hosts.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0024_registry_host_alter_registry_name_and_more.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0025_alter_image_version.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0026_image_digest.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0027_container_restart_policy.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0028_mount_and_bind_read_only.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0029_alter_container_state.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0030_alter_container_containerid_alter_container_hostname_and_more.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0031_container_cap_add.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/0032_device_and_more.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/migrations/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/image.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/network.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/registry.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/volume.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/navigation.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tables.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-exec.html +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-logs.html +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container.html +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templates/netbox_docker_plugin/host-graph.html +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templates/netbox_docker_plugin/image.html +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templates/netbox_docker_plugin/network.html +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templates/netbox_docker_plugin/registry.html +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templates/netbox_docker_plugin/volume.html +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templatetags/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templatetags/host.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/base.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/container/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/container/test_container_api.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/container/test_container_api_exec.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/container/test_container_operation_view.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/container/test_container_validation.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/container/test_container_views.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/host/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/host/test_host_views.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/host/test_replace_password.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/image/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/image/test_image_api.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/image/test_image_views.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/network/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/network/test_network_api.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/network/test_network_views.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/registry/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/registry/test_registry_api.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/registry/test_registry_views.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/test_init.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/volume/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/volume/test_volume_api.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/volume/test_volume_views.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/__init__.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/bind.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/container.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/device.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/env.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/image.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/label.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/mount.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/network.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/network_setting.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/port.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/registry.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/volume.py +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin.egg-info/dependency_links.txt +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin.egg-info/top_level.txt +0 -0
- {netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/setup.cfg +0 -0
{netbox_docker_plugin-2.7.0/netbox_docker_plugin.egg-info → netbox_docker_plugin-2.9.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netbox-docker-plugin
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.9.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
|
|
@@ -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 = "2.
|
|
14
|
+
version = "2.9.0"
|
|
14
15
|
base_url = "docker"
|
|
15
16
|
min_version = "4.0.0"
|
|
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"
|
|
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.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/api/serializers.py
RENAMED
|
@@ -43,6 +43,7 @@ class NestedHostSerializer(WritableNestedSerializer):
|
|
|
43
43
|
"state",
|
|
44
44
|
"agent_version",
|
|
45
45
|
"docker_api_version",
|
|
46
|
+
"operation",
|
|
46
47
|
)
|
|
47
48
|
|
|
48
49
|
|
|
@@ -615,6 +616,7 @@ class HostSerializer(NetBoxModelSerializer):
|
|
|
615
616
|
"netbox_base_url",
|
|
616
617
|
"agent_version",
|
|
617
618
|
"docker_api_version",
|
|
619
|
+
"operation",
|
|
618
620
|
"custom_fields",
|
|
619
621
|
"created",
|
|
620
622
|
"last_updated",
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.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.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/container.py
RENAMED
|
@@ -53,6 +53,7 @@ class ContainerOperationChoices(ChoiceSet):
|
|
|
53
53
|
("restart", "Restart", "blue"),
|
|
54
54
|
("stop", "Stop", "blue"),
|
|
55
55
|
("recreate", "Recreate", "blue"),
|
|
56
|
+
("kill", "Kill", "red"),
|
|
56
57
|
("none", "None", "white"),
|
|
57
58
|
]
|
|
58
59
|
|
|
@@ -181,13 +182,21 @@ class Container(NetBoxModel):
|
|
|
181
182
|
@property
|
|
182
183
|
def can_delete(self) -> bool:
|
|
183
184
|
"""Check if the container can be deleted"""
|
|
184
|
-
return self.host.state
|
|
185
|
+
return self.host.state in [
|
|
186
|
+
HostStateChoices.STATE_DELETED,
|
|
187
|
+
HostStateChoices.STATE_REFRESHING,
|
|
188
|
+
] or self.state in [
|
|
185
189
|
"created",
|
|
186
190
|
"paused",
|
|
187
191
|
"exited",
|
|
188
192
|
"dead",
|
|
189
193
|
]
|
|
190
194
|
|
|
195
|
+
@property
|
|
196
|
+
def can_kill(self) -> bool:
|
|
197
|
+
"""Check if the container can be killed"""
|
|
198
|
+
return self.state in ["created", "restarting", "running", "exited", "dead"]
|
|
199
|
+
|
|
191
200
|
class Meta:
|
|
192
201
|
"""Image Model Meta Class"""
|
|
193
202
|
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.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)
|
|
@@ -42,6 +42,7 @@ def restrict_container_actions(instance, **_kwargs):
|
|
|
42
42
|
instance.operation == "restart" and not instance.can_restart,
|
|
43
43
|
instance.operation == "stop" and not instance.can_stop,
|
|
44
44
|
instance.operation == "recreate" and not instance.can_recreate,
|
|
45
|
+
instance.operation == "kill" and not instance.can_kill,
|
|
45
46
|
]
|
|
46
47
|
):
|
|
47
48
|
raise AbortRequest(
|
|
@@ -45,6 +45,20 @@
|
|
|
45
45
|
</button>
|
|
46
46
|
</form>
|
|
47
47
|
|
|
48
|
+
<form action="{% url 'plugins:netbox_docker_plugin:container_operation' pk=object.id operation='kill' %}" method="post">
|
|
49
|
+
{% csrf_token %}
|
|
50
|
+
<input type="hidden" name="operation" value="kill">
|
|
51
|
+
<button
|
|
52
|
+
type="submit"
|
|
53
|
+
class="btn btn-dark"
|
|
54
|
+
{% if not object.can_kill %}
|
|
55
|
+
disabled
|
|
56
|
+
{% endif %}
|
|
57
|
+
>
|
|
58
|
+
<i class="mdi mdi-skull"></i> Kill
|
|
59
|
+
</button>
|
|
60
|
+
</form>
|
|
61
|
+
|
|
48
62
|
<form action="{% url 'plugins:netbox_docker_plugin:container_operation' pk=object.id operation='recreate' %}" method="post">
|
|
49
63
|
{% csrf_token %}
|
|
50
64
|
<input type="hidden" name="operation" value="recreate">
|
|
@@ -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 %}
|
|
@@ -10,12 +10,12 @@ from netbox_docker_plugin.models.registry import Registry
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class ContainerActionTestCase(TestCase):
|
|
13
|
-
"""
|
|
13
|
+
"""Test the various scenarii of container actions"""
|
|
14
14
|
|
|
15
15
|
objects = {}
|
|
16
16
|
|
|
17
17
|
def test_allowed_operations(self):
|
|
18
|
-
"""
|
|
18
|
+
"""Test that only specific operations are allowed according to a state"""
|
|
19
19
|
|
|
20
20
|
cases = [
|
|
21
21
|
("create", ["none"]),
|
|
@@ -23,7 +23,19 @@ class ContainerActionTestCase(TestCase):
|
|
|
23
23
|
("stop", ["running"]),
|
|
24
24
|
("restart", ["running"]),
|
|
25
25
|
("recreate", ["created", "exited", "dead", "running"]),
|
|
26
|
-
("
|
|
26
|
+
("kill", ["created", "restarting", "running", "exited", "dead"]),
|
|
27
|
+
(
|
|
28
|
+
"noop",
|
|
29
|
+
[
|
|
30
|
+
"created",
|
|
31
|
+
"restarting",
|
|
32
|
+
"running",
|
|
33
|
+
"paused",
|
|
34
|
+
"exited",
|
|
35
|
+
"dead",
|
|
36
|
+
"none",
|
|
37
|
+
],
|
|
38
|
+
),
|
|
27
39
|
]
|
|
28
40
|
|
|
29
41
|
for operation, states in cases:
|
|
@@ -48,14 +60,18 @@ class ContainerActionTestCase(TestCase):
|
|
|
48
60
|
)
|
|
49
61
|
|
|
50
62
|
def test_forbidden_operations(self):
|
|
51
|
-
"""
|
|
63
|
+
"""Test that forbidden operations raise an AbortRequest"""
|
|
52
64
|
|
|
53
65
|
cases = [
|
|
54
|
-
(
|
|
66
|
+
(
|
|
67
|
+
"create",
|
|
68
|
+
["created", "restarting", "running", "paused", "exited", "dead"],
|
|
69
|
+
),
|
|
55
70
|
("start", ["running", "restarting", "paused", "none"]),
|
|
56
71
|
("stop", ["created", "restarting", "paused", "exited", "dead", "none"]),
|
|
57
72
|
("restart", ["created", "restarting", "paused", "exited", "dead", "none"]),
|
|
58
73
|
("recreate", ["restarting", "paused", "none"]),
|
|
74
|
+
("kill", ["paused", "none"]),
|
|
59
75
|
]
|
|
60
76
|
|
|
61
77
|
for operation, states in cases:
|
|
@@ -79,7 +95,7 @@ class ContainerActionTestCase(TestCase):
|
|
|
79
95
|
obj.save()
|
|
80
96
|
|
|
81
97
|
def test_delete_non_running_container(self):
|
|
82
|
-
"""
|
|
98
|
+
"""Test that a non running container can be deleted"""
|
|
83
99
|
|
|
84
100
|
for state in ["created", "paused", "exited", "dead"]:
|
|
85
101
|
with self.subTest(operation="delete", state=state):
|
|
@@ -98,7 +114,7 @@ class ContainerActionTestCase(TestCase):
|
|
|
98
114
|
self.assertFalse(Container.objects.filter(name=name).exists())
|
|
99
115
|
|
|
100
116
|
def test_delete_running_container(self):
|
|
101
|
-
"""
|
|
117
|
+
"""Test that a running container cannot be deleted"""
|
|
102
118
|
|
|
103
119
|
for state in ["running", "restarting", "none"]:
|
|
104
120
|
with self.subTest(operation="delete", state=state):
|
|
@@ -119,9 +135,17 @@ class ContainerActionTestCase(TestCase):
|
|
|
119
135
|
obj.delete()
|
|
120
136
|
|
|
121
137
|
def test_delete_container_on_deleted_host(self):
|
|
122
|
-
"""
|
|
123
|
-
|
|
124
|
-
for state in [
|
|
138
|
+
"""Test that a container on a deleted host can be deleted"""
|
|
139
|
+
|
|
140
|
+
for state in [
|
|
141
|
+
"created",
|
|
142
|
+
"running",
|
|
143
|
+
"restarted",
|
|
144
|
+
"paused",
|
|
145
|
+
"exited",
|
|
146
|
+
"dead",
|
|
147
|
+
"none",
|
|
148
|
+
]:
|
|
125
149
|
with self.subTest(operation="delete", state=state):
|
|
126
150
|
with transaction.atomic():
|
|
127
151
|
name = f"container-delete-{state}"
|
|
@@ -137,6 +161,33 @@ class ContainerActionTestCase(TestCase):
|
|
|
137
161
|
|
|
138
162
|
self.assertFalse(Container.objects.filter(name=name).exists())
|
|
139
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
|
+
|
|
140
191
|
@classmethod
|
|
141
192
|
def setUpTestData(cls):
|
|
142
193
|
cls.objects["host1"] = Host.objects.create(
|
|
@@ -169,3 +220,8 @@ class ContainerActionTestCase(TestCase):
|
|
|
169
220
|
registry=cls.objects["registry2"],
|
|
170
221
|
name="image2",
|
|
171
222
|
)
|
|
223
|
+
cls.objects["host3"] = Host.objects.create(
|
|
224
|
+
endpoint="http://localhost:8080",
|
|
225
|
+
name="host3",
|
|
226
|
+
state=HostStateChoices.STATE_REFRESHING,
|
|
227
|
+
)
|
|
@@ -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.7.0 → netbox_docker_plugin-2.9.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",
|
|
@@ -198,7 +211,7 @@ def create_webhook(app_config, **kwargs):
|
|
|
198
211
|
type_job_start=webhook["type_job_start"],
|
|
199
212
|
type_job_end=webhook["type_job_end"],
|
|
200
213
|
action_object_id=obj.pk,
|
|
201
|
-
action_object_type=wh_content_type
|
|
214
|
+
action_object_type=wh_content_type,
|
|
202
215
|
)
|
|
203
216
|
eventrule.save()
|
|
204
217
|
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.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.7.0 → netbox_docker_plugin-2.9.0/netbox_docker_plugin.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netbox-docker-plugin
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.9.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
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/api/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/api/renderers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/filtersets.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/bind.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/container.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/device.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/label.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/mount.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/network.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/port.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/forms/registry.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.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.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/network.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/registry.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/models/volume.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.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
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/templatetags/host.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/tests/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.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.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/bind.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/container.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/device.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/label.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/mount.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/network.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/port.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/registry.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.7.0 → netbox_docker_plugin-2.9.0}/netbox_docker_plugin/views/volume.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|