netbox-docker-plugin 2.5.0__tar.gz → 2.6.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.5.0/netbox_docker_plugin.egg-info → netbox_docker_plugin-2.6.0}/PKG-INFO +1 -1
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/__init__.py +1 -1
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/api/serializers.py +2 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/container.py +7 -1
- netbox_docker_plugin-2.6.0/netbox_docker_plugin/migrations/0031_container_cap_add.py +29 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/container.py +30 -10
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tables.py +1 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container.html +4 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/container/test_container_api.py +2 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/container/test_container_views.py +1 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0/netbox_docker_plugin.egg-info}/PKG-INFO +1 -1
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin.egg-info/SOURCES.txt +1 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/pyproject.toml +1 -1
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/LICENSE +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/MANIFEST.in +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/README.md +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/api/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/api/renderers.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/api/urls.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/api/views.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/filtersets.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/bind.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/env.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/host.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/image.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/label.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/mount.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/network.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/network_setting.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/port.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/registry.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/volume.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0001_initial.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0002_image.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0003_image_size.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0004_volume.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0005_network.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0006_container_port_mount_label_env_and_more.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0007_remove_container_netbox_docker_plugin_container_unique_name_host__and_more.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0008_alter_network_unique_together_network_networkid_and_more.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0009_remove_container_network_networksettings_and_more.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0010_container_containerid_and_more.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0011_host_token.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0012_host_state.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0013_host_netbox_url.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0014_container_operation.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0015_remove_mount_netbox_docker_plugin_mount_unique_volume_and_more.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0016_alter_env_value.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0017_network_state.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0018_alter_mount_volume_alter_networksetting_network.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0019_host_agent_version_host_docker_api_version.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0020_container_hostname.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0021_registry_and_more.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0022_bind_bind_netbox_docker_plugin_bind_unique_bind.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0023_delete_hosts.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0024_registry_host_alter_registry_name_and_more.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0025_alter_image_version.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0026_image_digest.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0027_container_restart_policy.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0028_mount_and_bind_read_only.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0029_alter_container_state.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/0030_alter_container_containerid_alter_container_hostname_and_more.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/migrations/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/host.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/image.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/network.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/registry.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/volume.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/navigation.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/signals.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-exec.html +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-layout.html +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-logs.html +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templates/netbox_docker_plugin/host-graph.html +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templates/netbox_docker_plugin/host.html +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templates/netbox_docker_plugin/image.html +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templates/netbox_docker_plugin/network.html +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templates/netbox_docker_plugin/registry.html +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templates/netbox_docker_plugin/volume.html +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templatetags/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templatetags/host.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/base.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/container/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/container/test_container_actions.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/container/test_container_api_exec.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/container/test_container_operation_view.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/container/test_container_validation.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/host/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/host/test_host_api.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/host/test_host_views.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/host/test_replace_password.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/image/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/image/test_image_api.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/image/test_image_views.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/network/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/network/test_network_api.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/network/test_network_views.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/registry/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/registry/test_registry_api.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/registry/test_registry_views.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/test_init.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/volume/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/volume/test_volume_api.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/volume/test_volume_views.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/urls.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/utilities/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/__init__.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/bind.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/container.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/env.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/host.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/image.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/label.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/mount.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/network.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/network_setting.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/port.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/registry.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/volume.py +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin.egg-info/dependency_links.txt +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin.egg-info/top_level.txt +0 -0
- {netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/setup.cfg +0 -0
{netbox_docker_plugin-2.5.0/netbox_docker_plugin.egg-info → netbox_docker_plugin-2.6.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.6.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
|
|
@@ -10,7 +10,7 @@ class NetBoxDockerConfig(PluginConfig):
|
|
|
10
10
|
name = "netbox_docker_plugin"
|
|
11
11
|
verbose_name = " NetBox Docker Plugin"
|
|
12
12
|
description = "Manage Docker"
|
|
13
|
-
version = "2.
|
|
13
|
+
version = "2.6.0"
|
|
14
14
|
base_url = "docker"
|
|
15
15
|
min_version = "4.0.0"
|
|
16
16
|
author= "Vincent Simonin <vincent@saashup.com>, David Delassus <david.jose.delassus@gmail.com>"
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/api/serializers.py
RENAMED
|
@@ -146,6 +146,7 @@ class NestedContainerSerializer(WritableNestedSerializer):
|
|
|
146
146
|
"restart_policy",
|
|
147
147
|
"operation",
|
|
148
148
|
"hostname",
|
|
149
|
+
"cap_add",
|
|
149
150
|
)
|
|
150
151
|
|
|
151
152
|
|
|
@@ -406,6 +407,7 @@ class ContainerSerializer(NetBoxModelSerializer):
|
|
|
406
407
|
"ContainerID",
|
|
407
408
|
"hostname",
|
|
408
409
|
"restart_policy",
|
|
410
|
+
"cap_add",
|
|
409
411
|
"ports",
|
|
410
412
|
"env",
|
|
411
413
|
"labels",
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/container.py
RENAMED
|
@@ -15,7 +15,7 @@ from netbox.forms import (
|
|
|
15
15
|
)
|
|
16
16
|
from ..models.volume import Volume
|
|
17
17
|
from ..models.host import Host
|
|
18
|
-
from ..models.container import Container, ContainerRestartPolicyChoices
|
|
18
|
+
from ..models.container import Container, ContainerRestartPolicyChoices, ContainerCapAddChoices
|
|
19
19
|
from ..models.image import Image
|
|
20
20
|
|
|
21
21
|
|
|
@@ -31,6 +31,7 @@ class ContainerForm(NetBoxModelForm):
|
|
|
31
31
|
required=True,
|
|
32
32
|
query_params={"host_id": "$host"},
|
|
33
33
|
)
|
|
34
|
+
cap_add = forms.MultipleChoiceField(choices=ContainerCapAddChoices, required=False)
|
|
34
35
|
|
|
35
36
|
class Meta:
|
|
36
37
|
"""Container form definition Meta class"""
|
|
@@ -42,6 +43,7 @@ class ContainerForm(NetBoxModelForm):
|
|
|
42
43
|
"name",
|
|
43
44
|
"hostname",
|
|
44
45
|
"restart_policy",
|
|
46
|
+
"cap_add",
|
|
45
47
|
"tags",
|
|
46
48
|
)
|
|
47
49
|
labels = {
|
|
@@ -50,6 +52,7 @@ class ContainerForm(NetBoxModelForm):
|
|
|
50
52
|
"image": "Image",
|
|
51
53
|
"hostname": "Hostname",
|
|
52
54
|
"restart_policy": "Restart Policy",
|
|
55
|
+
"cap_add": "Add Host capabilities",
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
|
|
@@ -62,6 +65,7 @@ class ContainerEditForm(NetBoxModelForm):
|
|
|
62
65
|
required=True,
|
|
63
66
|
query_params={"host_id": "$host"},
|
|
64
67
|
)
|
|
68
|
+
cap_add = forms.MultipleChoiceField(choices=ContainerCapAddChoices, required=False)
|
|
65
69
|
|
|
66
70
|
class Meta:
|
|
67
71
|
"""Container form definition Meta class"""
|
|
@@ -72,6 +76,7 @@ class ContainerEditForm(NetBoxModelForm):
|
|
|
72
76
|
"name",
|
|
73
77
|
"hostname",
|
|
74
78
|
"restart_policy",
|
|
79
|
+
"cap_add",
|
|
75
80
|
"tags",
|
|
76
81
|
)
|
|
77
82
|
labels = {
|
|
@@ -79,6 +84,7 @@ class ContainerEditForm(NetBoxModelForm):
|
|
|
79
84
|
"image": "Image",
|
|
80
85
|
"hostname": "Hostname",
|
|
81
86
|
"restart_policy": "Restart Policy",
|
|
87
|
+
"cap_add": "Add Host capabilities",
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# pylint: disable=C0103
|
|
2
|
+
"""Migration file"""
|
|
3
|
+
|
|
4
|
+
import django.contrib.postgres.fields
|
|
5
|
+
from django.db import migrations, models
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Migration(migrations.Migration):
|
|
9
|
+
"""Migration file"""
|
|
10
|
+
|
|
11
|
+
dependencies = [
|
|
12
|
+
(
|
|
13
|
+
"netbox_docker_plugin",
|
|
14
|
+
"0030_alter_container_containerid_alter_container_hostname_and_more",
|
|
15
|
+
),
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
operations = [
|
|
19
|
+
migrations.AddField(
|
|
20
|
+
model_name="container",
|
|
21
|
+
name="cap_add",
|
|
22
|
+
field=django.contrib.postgres.fields.ArrayField(
|
|
23
|
+
base_field=models.CharField(blank=True, max_length=32, null=True),
|
|
24
|
+
blank=True,
|
|
25
|
+
null=True,
|
|
26
|
+
size=None,
|
|
27
|
+
),
|
|
28
|
+
),
|
|
29
|
+
]
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/container.py
RENAMED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# pylint: disable=E1101
|
|
4
4
|
|
|
5
|
+
from django.contrib.postgres.fields import ArrayField
|
|
5
6
|
from django.core.exceptions import ValidationError
|
|
6
7
|
from django.db import models
|
|
7
8
|
from django.db.models.functions import Lower
|
|
@@ -84,6 +85,16 @@ class PortTypeChoices(ChoiceSet):
|
|
|
84
85
|
]
|
|
85
86
|
|
|
86
87
|
|
|
88
|
+
class ContainerCapAddChoices(ChoiceSet):
|
|
89
|
+
"""cap-add choices definition class"""
|
|
90
|
+
|
|
91
|
+
key = "Container.cap_add"
|
|
92
|
+
|
|
93
|
+
CHOICES = [
|
|
94
|
+
("NET_ADMIN", "NET_ADMIN"),
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
|
|
87
98
|
class Container(NetBoxModel):
|
|
88
99
|
"""Container definition class"""
|
|
89
100
|
|
|
@@ -134,39 +145,48 @@ class Container(NetBoxModel):
|
|
|
134
145
|
choices=ContainerRestartPolicyChoices,
|
|
135
146
|
default=ContainerRestartPolicyChoices.DEFAULT_VALUE,
|
|
136
147
|
)
|
|
148
|
+
cap_add = ArrayField(
|
|
149
|
+
models.CharField(
|
|
150
|
+
max_length=32, blank=True, null=True, choices=ContainerCapAddChoices
|
|
151
|
+
),
|
|
152
|
+
null=True,
|
|
153
|
+
blank=True,
|
|
154
|
+
)
|
|
137
155
|
|
|
138
156
|
@property
|
|
139
157
|
def can_create(self) -> bool:
|
|
140
|
-
"""
|
|
158
|
+
"""Check if the container can be created"""
|
|
141
159
|
return self.state == "none"
|
|
142
160
|
|
|
143
161
|
@property
|
|
144
162
|
def can_start(self) -> bool:
|
|
145
|
-
"""
|
|
163
|
+
"""Check if the container can be started"""
|
|
146
164
|
return self.state in ["created", "exited", "dead"]
|
|
147
165
|
|
|
148
166
|
@property
|
|
149
167
|
def can_stop(self) -> bool:
|
|
150
|
-
"""
|
|
168
|
+
"""Check if the container can be stopped"""
|
|
151
169
|
return self.state in ["running"]
|
|
152
170
|
|
|
153
171
|
@property
|
|
154
172
|
def can_restart(self) -> bool:
|
|
155
|
-
"""
|
|
173
|
+
"""Check if the container can be restarted"""
|
|
156
174
|
return self.state in ["running"]
|
|
157
175
|
|
|
158
176
|
@property
|
|
159
177
|
def can_recreate(self) -> bool:
|
|
160
|
-
"""
|
|
178
|
+
"""Check if the container can be recreated"""
|
|
161
179
|
return self.state in ["created", "running", "exited", "dead"]
|
|
162
180
|
|
|
163
181
|
@property
|
|
164
182
|
def can_delete(self) -> bool:
|
|
165
|
-
"""
|
|
166
|
-
return
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
183
|
+
"""Check if the container can be deleted"""
|
|
184
|
+
return self.host.state == HostStateChoices.STATE_DELETED or self.state in [
|
|
185
|
+
"created",
|
|
186
|
+
"paused",
|
|
187
|
+
"exited",
|
|
188
|
+
"dead",
|
|
189
|
+
]
|
|
170
190
|
|
|
171
191
|
class Meta:
|
|
172
192
|
"""Image Model Meta Class"""
|
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
<th scope="row">Restart Policy</th>
|
|
38
38
|
<td>{{ object.get_restart_policy_display }}</td>
|
|
39
39
|
</tr>
|
|
40
|
+
<tr>
|
|
41
|
+
<th scope="row">Host Capacities added</th>
|
|
42
|
+
<td>{{ object.cap_add }}</td>
|
|
43
|
+
</tr>
|
|
40
44
|
<tr>
|
|
41
45
|
<th scope="row">Status</th>
|
|
42
46
|
<td>{{ object.status|placeholder }}</td>
|
|
@@ -29,6 +29,7 @@ class ContainerApiTestCase(
|
|
|
29
29
|
model = Container
|
|
30
30
|
brief_fields = [
|
|
31
31
|
"ContainerID",
|
|
32
|
+
"cap_add",
|
|
32
33
|
"display",
|
|
33
34
|
"hostname",
|
|
34
35
|
"id",
|
|
@@ -168,6 +169,7 @@ class ContainerApiTestCase(
|
|
|
168
169
|
"ports": [],
|
|
169
170
|
"env": [{"var_name": "ENV", "value": ""}],
|
|
170
171
|
"labels": [],
|
|
172
|
+
"cap_add": ["NET_ADMIN"],
|
|
171
173
|
},
|
|
172
174
|
]
|
|
173
175
|
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.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.6.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.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin.egg-info/SOURCES.txt
RENAMED
|
@@ -60,6 +60,7 @@ netbox_docker_plugin/migrations/0027_container_restart_policy.py
|
|
|
60
60
|
netbox_docker_plugin/migrations/0028_mount_and_bind_read_only.py
|
|
61
61
|
netbox_docker_plugin/migrations/0029_alter_container_state.py
|
|
62
62
|
netbox_docker_plugin/migrations/0030_alter_container_containerid_alter_container_hostname_and_more.py
|
|
63
|
+
netbox_docker_plugin/migrations/0031_container_cap_add.py
|
|
63
64
|
netbox_docker_plugin/migrations/__init__.py
|
|
64
65
|
netbox_docker_plugin/models/__init__.py
|
|
65
66
|
netbox_docker_plugin/models/container.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/api/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/api/renderers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/filtersets.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/bind.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/host.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/label.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/mount.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/network.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/port.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/forms/registry.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.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
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/host.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/network.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/registry.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/models/volume.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.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
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/templatetags/host.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.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.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/tests/test_init.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/utilities/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/bind.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/container.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/host.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/label.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/mount.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/network.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/port.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/registry.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-2.5.0 → netbox_docker_plugin-2.6.0}/netbox_docker_plugin/views/volume.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|