Giter Club home page Giter Club logo

netbox-software-manager's People

Contributors

alsigna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

netbox-software-manager's Issues

config to hide/disable scheduled_tasks and upgrade_devices

If using this to track multivendor images and you use no automated upgrade process in netbox or you have an external automated process, it would be ideal to allow the admin to disable the upgrade process links and API targets for Scheduled Tasks and Upgrade Devices.

The other option would be to enable/disable the process per platform.

Internal Server Error

When I run netbox with software manager i got this error in log:
from utilities.tables import BaseTable, ToggleColumn, ColoredLabelColumn, TagColumn gunicorn[2836854]: ImportError: cannot import name 'BaseTable' from 'utilities.tables' (/opt/netbox/netbox/utilities/tables.py)

cat /opt/netbox/netbox/utilities/tables.py
def linkify_phone(value):
    """
    Render a telephone number as a hyperlink.
    """
    if value is None:
        return None
    return f"tel:{value}"

Allow for custom file extensions

Given the shift to multi-vendor support, in the plugin config, you should be able to provide a list of file extensions.

We could likely create another issue to set a filte extension check for each platform.

For now, we should focus on allowing the list to be edited.

As an example:
Arista: ".swi"
Cisco: ".bin"
Fortinet: ".out"
Palo Alto: no extension (might be challenging, but most use the UI)
Cumulus: ".bin"
Sonic: looks like no file extension
Juniper: I cannot remember
Opengear: ".flash"

Typing this out, we may want to allow any filename/extension. Thoughts?

Feature Request: Allow for HTTP/HTTPS Server in place of FTP

I personally already run an HTTP/S container on the NetBox Host systems list all our golden firmware. Currently, I link to said URLs for each device model. I just prefer HTTP/HTTPS to download over FTP and SCP. Would you be open to a toggle to allow multiple transfer protocols?

Request for update to work with Netbox Version 3.7

Hey! would like to request an update to the plugin to run on netbox 3.7, tried to install and got the following error

(venv) user@snetbox1:/opt/netbox/netbox$ python3 manage.py migrate
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/core/management/init.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 100, in handle
self.check(databases=[database])
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/core/management/base.py", line 485, in check
all_issues = checks.run_checks(
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/core/checks/registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 24, in check_resolver
return check_method()
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 494, in check
for pattern in self.url_patterns:
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/utils/functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 715, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/utils/functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 708, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/opt/netbox-3.7.0/netbox/netbox/urls.py", line 12, in
from netbox.plugins.urls import plugin_admin_patterns, plugin_patterns, plugin_api_patterns
File "/opt/netbox-3.7.0/netbox/netbox/plugins/urls.py", line 31, in
urlpatterns = import_string(f"{plugin_path}.urls.urlpatterns")
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/utils/module_loading.py", line 30, in import_string
return cached_import(module_path, class_name)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/django/utils/module_loading.py", line 15, in cached_import
module = import_module(module_path)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/software_manager/urls.py", line 2, in
from . import views
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/software_manager/views.py", line 20, in
from .tables import SoftwareListTable, GoldenImageListTable, UpgradeDeviceListTable, ScheduledTaskTable
File "/opt/netbox-3.7.0/venv/lib/python3.8/site-packages/software_manager/tables.py", line 5, in
from utilities.tables import BaseTable, ToggleColumn, ColoredLabelColumn, TagColumn
ImportError: cannot import name 'BaseTable' from 'utilities.tables' (/opt/netbox-3.7.0/netbox/utilities/tables.py)

0.0.4 migration issues with upload_to

I am testing the new 0.0.4 release using pip

It looks like you have a migration issue:

/opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py migrate
🧬 loaded config '/etc/netbox/config/configuration.py'
🧬 loaded config '/etc/netbox/config/logging.py'
🧬 loaded config '/etc/netbox/config/plugins.py'
SystemCheckError: System check identified some issues:

ERRORS:
software_manager.SoftwareImage.image: (fields.E202) FileField's 'upload_to' argument must be a relative path, not an absolute path.
        HINT: Remove the leading slash.

Remove the need for a custom field for sw_version

Instead of adding custom fields to the device model, you can create a new model that models host software version.

I do something similar with ACL to interface assignments. It is not 100% like your model because I have an ACL linked to only 1 host(vm, device, virtual_cluster), and than that said ACL can be assigned any interface assigned to that "host"

https://github.com/ryanmerolle/netbox-acls/blob/dev/netbox_acls/models/access_lists.py#L90-L155

Feature Request: Disable Upgrade Process per OS

I would love this model to be extended to more OS in order to track golden firmware drift.

Would you have any interest in being able to allow a user to disable the upgrade process and track software versions for more platform/NOS'?

Given standard NAPALM drivers already leveraged in NetBox and included in the netbox-docker, you could use NAPALM to get the software version from the device using the already set NAPALM user and password settings in NetBox.

With those model, more users could leverage the plugin for SoT type functionality, but leverage their existing workflows to upgrade their devices (ansible, python, salt, vendor specific platforms).

Provide default config values

The following config values should have default config:

        # Default transport method, [tfp|http]
        "DEFAULT_TRANSFER_METHOD": "http",
        # Log file
        "UPGRADE_LOG_FILE": "/var/log/upgrade.log",
        # Queue name. Check step 1 (dockerfile). Should be the same
        "UPGRADE_QUEUE": "software_manager",
        # Custom field name which is used for store current SW version
        "CF_NAME_SW_VERSION": "sw_version",
        # folder name for image storing. located in netbox media.
        "IMAGE_FOLDER": "software-images",
        # Threshold for non-ACK check
        "UPGRADE_THRESHOLD": 2,
        # Number of tries to connect to device before declare that we lost it.
        "UPGRADE_MAX_ATTEMPTS_AFTER_RELOAD": 10,
        # Hold timer between tries
        "UPGRADE_SECONDS_BETWEEN_ATTEMPTS": 60,

You can assign this to me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.