Skip to content

Commit

Permalink
netbox 3.5 update: NetBoxModelCSVForm->NetBoxModelImportForm
Browse files Browse the repository at this point in the history
  • Loading branch information
viroge committed Mar 31, 2023
1 parent dc7fe8e commit bb7a62e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion netbox_storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class NetBoxStorageConfig(PluginConfig):
name = 'netbox_storage'
verbose_name = ' NetBox Storage'
description = 'Netbox Storage Administration Plugin'
version = '0.6.2'
version = '0.6.3'
base_url = 'storage'
min_version = "3.4.0"
author = 'Gabor Somogyvari'
Expand Down
12 changes: 6 additions & 6 deletions netbox_storage/forms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django import forms
from netbox.forms import NetBoxModelForm, NetBoxModelFilterSetForm, NetBoxModelCSVForm
from netbox.forms import NetBoxModelForm, NetBoxModelFilterSetForm, NetBoxModelImportForm
from utilities.forms.fields import DynamicModelChoiceField, CSVModelChoiceField, DynamicModelMultipleChoiceField, CSVModelMultipleChoiceField
from dcim.models import Device
from virtualization.models import Cluster, VirtualMachine
Expand Down Expand Up @@ -154,7 +154,7 @@ class VMDKFilterForm(NetBoxModelFilterSetForm):
# CSV Forms
#

class StoragePoolCSVForm(NetBoxModelCSVForm):
class StoragePoolCSVForm(NetBoxModelImportForm):
device = CSVModelChoiceField(
queryset=Device.objects.all(),
to_field_name='name',
Expand All @@ -165,7 +165,7 @@ class Meta:
fields = ('name', 'size', 'device', 'description')


class LUNCSVForm(NetBoxModelCSVForm):
class LUNCSVForm(NetBoxModelImportForm):
storage_pool = CSVModelChoiceField(
queryset=StoragePool.objects.all(),
to_field_name='name',
Expand All @@ -176,7 +176,7 @@ class Meta:
fields = ('storage_pool', 'name', 'size', 'wwn', 'description')


class DatastoreCSVForm(NetBoxModelCSVForm):
class DatastoreCSVForm(NetBoxModelImportForm):
lun = CSVModelMultipleChoiceField(
queryset=LUN.objects.all(),
to_field_name='name',
Expand All @@ -188,7 +188,7 @@ class Meta:
fields = ('lun', 'name', 'description')


class StorageSessionCSVForm(NetBoxModelCSVForm):
class StorageSessionCSVForm(NetBoxModelImportForm):
cluster = CSVModelChoiceField(
queryset=Cluster.objects.all(),
to_field_name='name',
Expand All @@ -204,7 +204,7 @@ class Meta:
fields = ('cluster', 'datastores', 'name', 'description')


class VMDKCSVForm(NetBoxModelCSVForm):
class VMDKCSVForm(NetBoxModelImportForm):
vm = CSVModelChoiceField(
queryset=VirtualMachine.objects.all(),
to_field_name='name',
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='netbox-storage-plugin',
version='0.6.2',
version='0.6.3',
description='NetBox storage plugin',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit bb7a62e

Please sign in to comment.