Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a02acbc561 | ||
|
|
74d648b94d | ||
|
|
e9422d70e3 |
+3
-2
@@ -9,6 +9,8 @@ Software Lifecycle Management
|
||||
Installation Guide
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
WARNING: This plugin requires Netbox 3.1.X or higher!
|
||||
|
||||
When using the Docker version of Netbox, first follow the `netbox-docker
|
||||
quickstart <https://github.com/netbox-community/netbox-docker#quickstart>`__
|
||||
instructions to clone the netbox-docker repo and set up the
|
||||
@@ -20,7 +22,7 @@ to install the Netbox SLM plugin:
|
||||
|
||||
1. Add ``netbox_slm`` to the ``PLUGINS`` list in
|
||||
``configuration/extra.py``.
|
||||
2. Create a ``plugin_requirements.txt`` with ``netbox-slm==0.94`` as
|
||||
2. Create a ``plugin_requirements.txt`` with ``netbox-slm==0.95`` as
|
||||
contents.
|
||||
3. Create a ``Dockerfile-SLM`` with contents:
|
||||
|
||||
@@ -96,7 +98,6 @@ Steps
|
||||
|
||||
$ git clone https://github.com/netbox-community/netbox
|
||||
$ cd netbox
|
||||
$ git checkout f5356b8 (to pin 3.0.9)
|
||||
|
||||
install the virtual environment
|
||||
|
||||
|
||||
+6
-16
@@ -14,19 +14,19 @@ quickstart <https://github.com/netbox-community/netbox-docker#quickstart>`__
|
||||
instructions to clone the netbox-docker repo and set up the
|
||||
``docker-compose.override.yml``.
|
||||
|
||||
Next, follow these instructions (based on the generic `Netbox plugin
|
||||
instructions <https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins>`__)
|
||||
Next, follow these instructions (based on the `Netbox docker variant
|
||||
instructions <https://github.com/netbox-community/netbox-docker/wiki/Configuration#custom-configuration-files>`__)
|
||||
to install the Netbox SLM plugin:
|
||||
|
||||
1. Add ``netbox_slm`` to the ``PLUGINS`` list in
|
||||
``configuration/configuration.py``.
|
||||
2. Create a ``plugin_requirements.txt`` with ``netbox-slm==0.93`` as
|
||||
``configuration/extra.py``.
|
||||
2. Create a ``plugin_requirements.txt`` with ``netbox-slm==0.94`` as
|
||||
contents.
|
||||
3. Create a ``Dockerfile-SLM`` with contents:
|
||||
|
||||
.. code:: dockerfile
|
||||
|
||||
FROM netboxcommunity/netbox:v3.0.9 # The Netbox SLM plugin currently only works with v3.0.9 of Netbox due to backwards incompatible changes in newer version of Netbox
|
||||
FROM netboxcommunity/netbox:v3.X.X
|
||||
|
||||
COPY ./plugin_requirements.txt /
|
||||
RUN /opt/netbox/venv/bin/pip install --no-warn-script-location -r /plugin_requirements.txt
|
||||
@@ -63,7 +63,7 @@ directory run
|
||||
|
||||
::
|
||||
|
||||
# make sure to update the version in netbox_slm/__init__.py and setup.cfg
|
||||
# make sure to update the version in netbox_slm/__init__.py
|
||||
$ python setup.py sdist
|
||||
$ twine upload dist/*
|
||||
|
||||
@@ -87,15 +87,6 @@ Netbox Django copy with auto-reload to develop the plugin pointing to
|
||||
the Dockerized postgres and redis instances, basically ignoring the
|
||||
netbox docker runtime server.
|
||||
|
||||
Gotcha’s
|
||||
~~~~~~~~
|
||||
|
||||
*Netbox’s exception handler seems to supress initial Exceptions,
|
||||
obfuscating missing imports or other Django related issues by re-raising
|
||||
an opague error, e.g. netbox_slm plugin namespace doesnotexist. It’s
|
||||
recommended to often check the runtime server or patch Netbox’s global
|
||||
exception handler.*
|
||||
|
||||
Steps
|
||||
~~~~~
|
||||
|
||||
@@ -105,7 +96,6 @@ Steps
|
||||
|
||||
$ git clone https://github.com/netbox-community/netbox
|
||||
$ cd netbox
|
||||
$ git checkout f5356b8 (to pin 3.0.9)
|
||||
|
||||
install the virtual environment
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class SLMConfig(PluginConfig):
|
||||
name = 'netbox_slm'
|
||||
verbose_name = 'Software Lifecycle Management'
|
||||
description = 'Software Lifecycle Management'
|
||||
version = '0.95'
|
||||
version = '0.96'
|
||||
author = 'Hedde van der Heide'
|
||||
author_email = 'hedde.vanderheide@ictu.nl'
|
||||
base_url = 'slm'
|
||||
|
||||
@@ -142,5 +142,13 @@ class SoftwareProductInstallationTable(NetBoxTable):
|
||||
"tags",
|
||||
)
|
||||
|
||||
def order_platform(self, queryset, is_descending):
|
||||
queryset = queryset.order_by(("device" if is_descending else "virtualmachine"))
|
||||
return queryset, True
|
||||
|
||||
def order_type(self, queryset, is_descending):
|
||||
queryset = queryset.order_by(("device" if is_descending else "virtualmachine"))
|
||||
return queryset, True
|
||||
|
||||
def render_software_product(self, value, **kwargs):
|
||||
return f"{kwargs['record'].software_product.manufacturer.name} - {value}"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = netbox-slm
|
||||
version = 0.95
|
||||
version = 0.96
|
||||
description = Software Lifecycle Management Netbox Plugin.
|
||||
# long_description = file: README.rst
|
||||
# long_description_content_type='text/x-rst'
|
||||
|
||||
Reference in New Issue
Block a user