Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf63046edb | ||
|
|
72274e59b5 |
+2
-1
@@ -20,7 +20,7 @@ to install the Netbox SLM plugin:
|
|||||||
|
|
||||||
1. Add ``netbox_slm`` to the ``PLUGINS`` list in
|
1. Add ``netbox_slm`` to the ``PLUGINS`` list in
|
||||||
``configuration/configuration.py``.
|
``configuration/configuration.py``.
|
||||||
2. Create a ``plugin_requirements.txt`` with ``netbox-slm==0.9`` as
|
2. Create a ``plugin_requirements.txt`` with ``netbox-slm==0.93`` as
|
||||||
contents.
|
contents.
|
||||||
3. Create a ``Dockerfile-SLM`` with contents:
|
3. Create a ``Dockerfile-SLM`` with contents:
|
||||||
|
|
||||||
@@ -63,6 +63,7 @@ directory run
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
# make sure to update the version in netbox_slm/__init__.py
|
||||||
$ python setup.py sdist
|
$ python setup.py sdist
|
||||||
$ twine upload dist/*
|
$ twine upload dist/*
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class SLMConfig(PluginConfig):
|
|||||||
name = 'netbox_slm'
|
name = 'netbox_slm'
|
||||||
verbose_name = 'Software Lifecycle Management'
|
verbose_name = 'Software Lifecycle Management'
|
||||||
description = 'Software Lifecycle Management'
|
description = 'Software Lifecycle Management'
|
||||||
version = '0.1'
|
version = '0.93'
|
||||||
author = 'Hedde van der Heide'
|
author = 'Hedde van der Heide'
|
||||||
author_email = 'hedde.vanderheide@ictu.nl'
|
author_email = 'hedde.vanderheide@ictu.nl'
|
||||||
base_url = 'slm'
|
base_url = 'slm'
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ class SoftwareProductVersionForm(BootstrapMixin, CustomFieldModelForm):
|
|||||||
|
|
||||||
software_product = DynamicModelChoiceField(
|
software_product = DynamicModelChoiceField(
|
||||||
queryset=SoftwareProduct.objects.all(),
|
queryset=SoftwareProduct.objects.all(),
|
||||||
required=False,
|
|
||||||
widget=APISelect(
|
widget=APISelect(
|
||||||
attrs={"data-url": reverse_lazy("plugins-api:netbox_slm-api:softwareproduct-list")}
|
attrs={"data-url": reverse_lazy("plugins-api:netbox_slm-api:softwareproduct-list")}
|
||||||
),
|
),
|
||||||
@@ -171,9 +170,10 @@ class SoftwareProductInstallationForm(BootstrapMixin, CustomFieldModelForm):
|
|||||||
model = SoftwareProductInstallation
|
model = SoftwareProductInstallation
|
||||||
fields = ("device", "virtualmachine", "software_product", "version",) # "tags")
|
fields = ("device", "virtualmachine", "software_product", "version",) # "tags")
|
||||||
|
|
||||||
# def clean(self):
|
def clean(self):
|
||||||
# import pdb;pdb.set_trace()
|
if not any([self.cleaned_data['device'], self.cleaned_data['virtualmachine']]):
|
||||||
# return super(SoftwareProductInstallationForm, self).clean()
|
raise forms.ValidationError(_("Installation requires atleast one virtualmachine or device destination."))
|
||||||
|
return super(SoftwareProductInstallationForm, self).clean()
|
||||||
|
|
||||||
|
|
||||||
class SoftwareProductInstallationFilterForm(BootstrapMixin, CustomFieldModelFilterForm):
|
class SoftwareProductInstallationFilterForm(BootstrapMixin, CustomFieldModelFilterForm):
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Generated by Django 3.2.9 on 2022-01-24 08:05
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('dcim', '0133_port_colors'),
|
||||||
|
('netbox_slm', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='softwareproduct',
|
||||||
|
name='manufacturer',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='software_products', to='dcim.manufacturer'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -17,7 +17,8 @@ class SoftwareProduct(PrimaryModel):
|
|||||||
manufacturer = models.ForeignKey(
|
manufacturer = models.ForeignKey(
|
||||||
to='dcim.Manufacturer',
|
to='dcim.Manufacturer',
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
related_name='software_products'
|
related_name='software_products',
|
||||||
|
null=True, blank=True
|
||||||
)
|
)
|
||||||
|
|
||||||
objects = RestrictedQuerySet.as_manager()
|
objects = RestrictedQuerySet.as_manager()
|
||||||
|
|||||||
+3
-1
@@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = netbox-slm
|
name = netbox-slm
|
||||||
version = 0.92
|
version = 0.93
|
||||||
description = Software Lifecycle Management Netbox Plugin.
|
description = Software Lifecycle Management Netbox Plugin.
|
||||||
# long_description = file: README.rst
|
# long_description = file: README.rst
|
||||||
# long_description_content_type='text/x-rst'
|
# long_description_content_type='text/x-rst'
|
||||||
@@ -16,6 +16,8 @@ classifiers =
|
|||||||
Programming Language :: Python
|
Programming Language :: Python
|
||||||
Programming Language :: Python :: 3
|
Programming Language :: Python :: 3
|
||||||
Programming Language :: Python :: 3 :: Only
|
Programming Language :: Python :: 3 :: Only
|
||||||
|
Programming Language :: Python :: 3.6
|
||||||
|
Programming Language :: Python :: 3.7
|
||||||
Programming Language :: Python :: 3.8
|
Programming Language :: Python :: 3.8
|
||||||
Programming Language :: Python :: 3.9
|
Programming Language :: Python :: 3.9
|
||||||
Topic :: Internet :: WWW/HTTP
|
Topic :: Internet :: WWW/HTTP
|
||||||
|
|||||||
Reference in New Issue
Block a user