artyomovs / netbox-plugin-config-officer

NetBox plugin that stores configuration diffs and checks templates compliance
Apache License 2.0
101 stars 7 forks source link

installation instructions for non-docker - ImportError NameSlugSearchFilterSet #16

Open tigerz931 opened 1 year ago

tigerz931 commented 1 year ago

using non-docker NetBox v3.5.4 trying to solve the right installation steps which returns this error: ImportError: cannot import name 'NameSlugSearchFilterSet' from 'utilities.filters' (/opt/netbox/netbox/utilities/filters.py)

same error which i was found in closed issue #5 without any information how it solved

installation steps made:

$ source /opt/netbox/venv/bin/activate
(venv) $ pip install netbox-plugin-config-officer

added to configuration.py

PLUGINS = [
    "config_officer"
]

plugin configuration as it is from the guide: (tried also without plugin configuration)

PLUGINS_CONFIG = {
    "config_officer": {
        # Credentials to cisco devices:
        "DEVICE_USERNAME": "cisco",
        "DEVICE_PASSWORD": "cisco",
        #"DEVICE_SSH_PORT" : 1234 #default - 22

        # Mount this directory to NetBox on docker-compose.yml
        "NETBOX_DEVICES_CONFIGS_DIR": "/device_configs",

        # Add these custom fields to NetBox in advance.
        "CF_NAME_SW_VERSION": "version",
        "CF_NAME_SSH": "ssh",
        "CF_NAME_LAST_COLLECT_DATE": "last_collect_date",
        "CF_NAME_LAST_COLLECT_TIME": "last_collect_time",
        "CF_NAME_COLLECTION_STATUS": "collection_status"
    }
}

run database migration gives an error:

(venv) $ cd /opt/netbox/netbox/
(venv) $ python3 manage.py migrate
..<continuous output>...
ImportError: cannot import name 'NameSlugSearchFilterSet' from 'utilities.filters' (/opt/netbox/netbox/utilities/filters.py)

appreciate for any instructions

Thank you

artyomovs commented 1 year ago

Sorry, I've just started working on plugin that supports 3.x Netbox version. I hope will finish it till mid of August.

steelo22 commented 10 months ago

Hello, Any info about this I want to used it for version 3.6.4

shachlo10 commented 7 months ago

Sorry, I've just started working on plugin that supports 3.x Netbox version. I hope will finish it till mid of August.

i see you finish a plugin for docker installation , can you add a plugin in pip? Or can i replace a filters.py script from you git to my installation?

fedetrabu commented 5 months ago

Any news about the 3.x version? I tried a non-docker installation but I still get the ImportError: cannot import name 'NameSlugSearchFilterSet' from 'utilities.filters' (/opt/netbox/netbox/utilities/filters.py) error.