netbox-docker-plugin 3.0.0__tar.gz → 3.1.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-3.0.0/netbox_docker_plugin.egg-info → netbox_docker_plugin-3.1.0}/PKG-INFO +1 -1
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/__init__.py +1 -1
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/api/serializers.py +7 -1
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/filtersets.py +1 -1
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/volume.py +5 -1
- netbox_docker_plugin-3.1.0/netbox_docker_plugin/migrations/0034_volume_max_size.py +24 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/volume.py +5 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tables.py +21 -2
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-logs.html +1 -1
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templates/netbox_docker_plugin/volume.html +10 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/volume/test_volume_api.py +1 -1
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0/netbox_docker_plugin.egg-info}/PKG-INFO +1 -1
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin.egg-info/SOURCES.txt +1 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/pyproject.toml +1 -1
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/LICENSE +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/MANIFEST.in +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/README.md +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/api/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/api/renderers.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/api/urls.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/api/views.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/bind.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/container.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/device.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/env.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/host.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/image.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/label.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/mount.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/network.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/network_setting.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/port.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/registry.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0001_initial.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0002_image.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0003_image_size.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0004_volume.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0005_network.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0006_container_port_mount_label_env_and_more.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0007_remove_container_netbox_docker_plugin_container_unique_name_host__and_more.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0008_alter_network_unique_together_network_networkid_and_more.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0009_remove_container_network_networksettings_and_more.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0010_container_containerid_and_more.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0011_host_token.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0012_host_state.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0013_host_netbox_url.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0014_container_operation.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0015_remove_mount_netbox_docker_plugin_mount_unique_volume_and_more.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0016_alter_env_value.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0017_network_state.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0018_alter_mount_volume_alter_networksetting_network.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0019_host_agent_version_host_docker_api_version.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0020_container_hostname.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0021_registry_and_more.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0022_bind_bind_netbox_docker_plugin_bind_unique_bind.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0023_delete_hosts.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0024_registry_host_alter_registry_name_and_more.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0025_alter_image_version.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0026_image_digest.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0027_container_restart_policy.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0028_mount_and_bind_read_only.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0029_alter_container_state.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0030_alter_container_containerid_alter_container_hostname_and_more.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0031_container_cap_add.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0032_device_and_more.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/0033_host_operation.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/migrations/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/container.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/host.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/image.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/network.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/registry.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/navigation.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/signals.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-exec.html +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container-layout.html +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templates/netbox_docker_plugin/container.html +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templates/netbox_docker_plugin/host-graph.html +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templates/netbox_docker_plugin/host.html +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templates/netbox_docker_plugin/image.html +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templates/netbox_docker_plugin/network.html +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templates/netbox_docker_plugin/registry.html +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templatetags/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templatetags/host.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/base.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/container/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/container/test_container_actions.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/container/test_container_api.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/container/test_container_api_exec.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/container/test_container_operation_view.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/container/test_container_validation.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/container/test_container_views.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/host/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/host/test_host_api.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/host/test_host_views.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/host/test_replace_password.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/image/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/image/test_image_api.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/image/test_image_views.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/network/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/network/test_network_api.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/network/test_network_views.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/registry/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/registry/test_registry_api.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/registry/test_registry_views.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/test_init.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/volume/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/volume/test_volume_views.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/urls.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/utilities/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/__init__.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/bind.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/container.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/device.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/env.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/host.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/image.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/label.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/mount.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/network.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/network_setting.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/port.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/registry.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/volume.py +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin.egg-info/dependency_links.txt +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin.egg-info/top_level.txt +0 -0
- {netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/setup.cfg +0 -0
{netbox_docker_plugin-3.0.0/netbox_docker_plugin.egg-info → netbox_docker_plugin-3.1.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netbox-docker-plugin
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.1.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
|
|
@@ -11,7 +11,7 @@ class NetBoxDockerConfig(PluginConfig):
|
|
|
11
11
|
name = "netbox_docker_plugin"
|
|
12
12
|
verbose_name = " NetBox Docker Plugin"
|
|
13
13
|
description = "Manage Docker"
|
|
14
|
-
version = "3.
|
|
14
|
+
version = "3.1.0"
|
|
15
15
|
base_url = "docker"
|
|
16
16
|
min_version = "4.1.0"
|
|
17
17
|
author = "Vincent Simonin <vincent@saashup.com>, David Delassus <david.jose.delassus@gmail.com>"
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/api/serializers.py
RENAMED
|
@@ -95,6 +95,7 @@ class NestedVolumeSerializer(WritableNestedSerializer):
|
|
|
95
95
|
"url",
|
|
96
96
|
"display",
|
|
97
97
|
"name",
|
|
98
|
+
"max_size",
|
|
98
99
|
"driver",
|
|
99
100
|
)
|
|
100
101
|
|
|
@@ -106,7 +107,11 @@ class NestedVolumeSerializer(WritableNestedSerializer):
|
|
|
106
107
|
params = dict_to_filter_params(data)
|
|
107
108
|
if Volume.objects.filter(**params).count() == 0:
|
|
108
109
|
host = Host.objects.get(pk=params["host"])
|
|
109
|
-
volume = Volume(
|
|
110
|
+
volume = Volume(
|
|
111
|
+
host=host,
|
|
112
|
+
name=params["name"],
|
|
113
|
+
max_size=params.get("max_size"),
|
|
114
|
+
)
|
|
110
115
|
volume.save()
|
|
111
116
|
return volume
|
|
112
117
|
|
|
@@ -263,6 +268,7 @@ class VolumeSerializer(NetBoxModelSerializer):
|
|
|
263
268
|
"display",
|
|
264
269
|
"host",
|
|
265
270
|
"name",
|
|
271
|
+
"max_size",
|
|
266
272
|
"driver",
|
|
267
273
|
"custom_fields",
|
|
268
274
|
"created",
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/filtersets.py
RENAMED
|
@@ -113,7 +113,7 @@ class VolumeFilterSet(NetBoxModelFilterSet):
|
|
|
113
113
|
"""Volume filterset definition meta class"""
|
|
114
114
|
|
|
115
115
|
model = Volume
|
|
116
|
-
fields = ("id", "name", "driver", "mounts")
|
|
116
|
+
fields = ("id", "name", "max_size", "driver", "mounts")
|
|
117
117
|
|
|
118
118
|
# pylint: disable=W0613
|
|
119
119
|
def search(self, queryset, name, value):
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/volume.py
RENAMED
|
@@ -21,11 +21,13 @@ class VolumeForm(NetBoxModelForm):
|
|
|
21
21
|
fields = (
|
|
22
22
|
"host",
|
|
23
23
|
"name",
|
|
24
|
+
"max_size",
|
|
24
25
|
"driver",
|
|
25
26
|
"tags",
|
|
26
27
|
)
|
|
27
28
|
labels = {
|
|
28
29
|
"name": "Name",
|
|
30
|
+
"max_size": "Optional Maximum Size of Volume (in MB)",
|
|
29
31
|
"host": "Host",
|
|
30
32
|
"driver": "Driver",
|
|
31
33
|
}
|
|
@@ -36,6 +38,7 @@ class VolumeFilterForm(NetBoxModelFilterSetForm):
|
|
|
36
38
|
|
|
37
39
|
model = Volume
|
|
38
40
|
name = forms.CharField(label="Name", max_length=256, min_length=1, required=False)
|
|
41
|
+
max_size = forms.IntegerField(label="Max Size (MB)", required=False)
|
|
39
42
|
driver = forms.ChoiceField(
|
|
40
43
|
label="Driver",
|
|
41
44
|
choices=VolumeDriverChoices,
|
|
@@ -58,9 +61,10 @@ class VolumeImportForm(NetBoxModelImportForm):
|
|
|
58
61
|
"""Volume importation form definition Meta class"""
|
|
59
62
|
|
|
60
63
|
model = Volume
|
|
61
|
-
fields = ("name", "driver", "host")
|
|
64
|
+
fields = ("name", "max_size", "driver", "host")
|
|
62
65
|
labels = {
|
|
63
66
|
"name": "Unique Image name",
|
|
67
|
+
"max_size": "Optional Maximum Size of Volume (in MB)",
|
|
64
68
|
"driver": 'Volume provider. Can be "local"',
|
|
65
69
|
"host": "Host identifier",
|
|
66
70
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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", "0033_host_operation"),
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
operations = [
|
|
15
|
+
migrations.AddField(
|
|
16
|
+
model_name="volume",
|
|
17
|
+
name="max_size",
|
|
18
|
+
field=models.PositiveIntegerField(
|
|
19
|
+
null=True,
|
|
20
|
+
blank=True,
|
|
21
|
+
default=None,
|
|
22
|
+
),
|
|
23
|
+
),
|
|
24
|
+
]
|
|
@@ -166,12 +166,31 @@ class VolumeTable(NetBoxTable):
|
|
|
166
166
|
)
|
|
167
167
|
tags = columns.TagColumn()
|
|
168
168
|
|
|
169
|
+
def render_max_size(self, value):
|
|
170
|
+
"""Render the volume max size with unity"""
|
|
171
|
+
return f"{value} MB"
|
|
172
|
+
|
|
169
173
|
class Meta(NetBoxTable.Meta):
|
|
170
174
|
"""Volume Table definition Meta class"""
|
|
171
175
|
|
|
172
176
|
model = Volume
|
|
173
|
-
fields = (
|
|
174
|
-
|
|
177
|
+
fields = (
|
|
178
|
+
"pk",
|
|
179
|
+
"id",
|
|
180
|
+
"host",
|
|
181
|
+
"name",
|
|
182
|
+
"max_size",
|
|
183
|
+
"driver",
|
|
184
|
+
"mount_count",
|
|
185
|
+
"tags",
|
|
186
|
+
)
|
|
187
|
+
default_columns = (
|
|
188
|
+
"name",
|
|
189
|
+
"max_size",
|
|
190
|
+
"driver",
|
|
191
|
+
"host",
|
|
192
|
+
"mount_count",
|
|
193
|
+
)
|
|
175
194
|
|
|
176
195
|
|
|
177
196
|
class NetworkTable(NetBoxTable):
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
{% block head %}
|
|
29
29
|
<script type="application/javascript">
|
|
30
|
-
|
|
30
|
+
document.addEventListener("htmx:load", function (elt) {
|
|
31
31
|
const logPanel = document.getElementById("container-logs-panel")
|
|
32
32
|
const followButton = document.getElementById("container-logs-button")
|
|
33
33
|
const checkbox = document.getElementById("container-logs-cb")
|
|
@@ -21,6 +21,16 @@
|
|
|
21
21
|
<th scope="row">Driver</th>
|
|
22
22
|
<td>{{ object.get_driver_display }}</td>
|
|
23
23
|
</tr>
|
|
24
|
+
<tr>
|
|
25
|
+
<th scope="row">Max size</th>
|
|
26
|
+
<td>
|
|
27
|
+
{% if object.max_size is None %}
|
|
28
|
+
{{ object.max_size|placeholder }}
|
|
29
|
+
{% else %}
|
|
30
|
+
{{ object.max_size }} MByte
|
|
31
|
+
{% endif %}
|
|
32
|
+
</td>
|
|
33
|
+
</tr>
|
|
24
34
|
</table>
|
|
25
35
|
</div>
|
|
26
36
|
</div>
|
|
@@ -24,7 +24,7 @@ class VolumeApiTestCase(
|
|
|
24
24
|
"""Volume Test Case Class"""
|
|
25
25
|
|
|
26
26
|
model = Volume
|
|
27
|
-
brief_fields = ["display", "driver", "id", "name", "url"]
|
|
27
|
+
brief_fields = ["display", "driver", "id", "max_size", "name", "url"]
|
|
28
28
|
|
|
29
29
|
@classmethod
|
|
30
30
|
def setUpTestData(cls) -> None:
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.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: 3.
|
|
3
|
+
Version: 3.1.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-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin.egg-info/SOURCES.txt
RENAMED
|
@@ -64,6 +64,7 @@ netbox_docker_plugin/migrations/0030_alter_container_containerid_alter_container
|
|
|
64
64
|
netbox_docker_plugin/migrations/0031_container_cap_add.py
|
|
65
65
|
netbox_docker_plugin/migrations/0032_device_and_more.py
|
|
66
66
|
netbox_docker_plugin/migrations/0033_host_operation.py
|
|
67
|
+
netbox_docker_plugin/migrations/0034_volume_max_size.py
|
|
67
68
|
netbox_docker_plugin/migrations/__init__.py
|
|
68
69
|
netbox_docker_plugin/models/__init__.py
|
|
69
70
|
netbox_docker_plugin/models/container.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/api/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/api/renderers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/bind.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/container.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/device.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/host.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/label.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/mount.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/network.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/port.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/forms/registry.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
|
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/container.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/host.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/network.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/models/registry.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.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-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/templatetags/host.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.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
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/tests/test_init.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/utilities/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/__init__.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/bind.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/container.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/device.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/host.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/image.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/label.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/mount.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/network.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/port.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/registry.py
RENAMED
|
File without changes
|
{netbox_docker_plugin-3.0.0 → netbox_docker_plugin-3.1.0}/netbox_docker_plugin/views/volume.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|