robertcsapo / ciscodnacnetbox

Cisco DNA Center Integration with NetBox
Other
34 stars 14 forks source link

Python issues on Netbox 3.47 #14

Closed dfooksman closed 8 months ago

dfooksman commented 1 year ago

Seem to be running into Python issues with a fresh install of 3.4.7 which I know is not supported but hoping to ask kindly when it will be - thanks.

image

robertcsapo commented 1 year ago

Did you install the plugin correctly? Because it's not finding the plugin in the database.

dfooksman commented 1 year ago

Did you install the plugin correctly? Because it's not finding the plugin in the database.

I hope so -

(venv) [netbox@CL1P-INFNBX01 ~]$ source /opt/netbox/venv/bin/activate
(venv) [netbox@CL1P-INFNBX01 ~]$ /opt/netbox-sync/.venv/bin/pip3.8 install ciscodnacnetbox
Collecting ciscodnacnetbox
  Using cached ciscodnacnetbox-3.2.3-py3-none-any.whl (28 kB)
Requirement already satisfied: dnacentersdk==2.0.2 in /opt/netbox-sync/.venv/lib/python3.8/site-packages (from ciscodnacnetbox) (2.0.2)
Requirement already satisfied: future<0.19.0,>=0.18.2 in /opt/netbox-sync/.venv/lib/python3.8/site-packages (from dnacentersdk==2.0.2->ciscodnacnetbox) (0.18.3)
Requirement already satisfied: requests-toolbelt<0.10.0,>=0.9.1 in /opt/netbox-sync/.venv/lib/python3.8/site-packages (from dnacentersdk==2.0.2->ciscodnacnetbox) (0.9.1)
Requirement already satisfied: requests<3.0.0,>=2.24.0 in /opt/netbox-sync/.venv/lib/python3.8/site-packages (from dnacentersdk==2.0.2->ciscodnacnetbox) (2.27.1)
Requirement already satisfied: fastjsonschema<3.0.0,>=2.14.5 in /opt/netbox-sync/.venv/lib/python3.8/site-packages (from dnacentersdk==2.0.2->ciscodnacnetbox) (2.16.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in /opt/netbox-sync/.venv/lib/python3.8/site-packages (from requests<3.0.0,>=2.24.0->dnacentersdk==2.0.2->ciscodnacnetbox) (2.0.12)
Requirement already satisfied: certifi>=2017.4.17 in /opt/netbox-sync/.venv/lib/python3.8/site-packages (from requests<3.0.0,>=2.24.0->dnacentersdk==2.0.2->ciscodnacnetbox) (2022.12.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/netbox-sync/.venv/lib/python3.8/site-packages (from requests<3.0.0,>=2.24.0->dnacentersdk==2.0.2->ciscodnacnetbox) (1.26.12)
Requirement already satisfied: idna<4,>=2.5 in /opt/netbox-sync/.venv/lib/python3.8/site-packages (from requests<3.0.0,>=2.24.0->dnacentersdk==2.0.2->ciscodnacnetbox) (3.4)
Installing collected packages: ciscodnacnetbox
Successfully installed ciscodnacnetbox-3.2.3

[root@CL1P-INFNBX01 opt]# systemctl stop netbox netbox-rq
[root@CL1P-INFNBX01 opt]# systemctl start netbox netbox-rq

I don't think I am missing any steps but I am open to suggestions.

robertcsapo commented 1 year ago

Because the error is related to the database, it might need a database update.

If the plugin introduces new database models, run the provided schema migrations

(venv) $ cd /opt/netbox/netbox/
(venv) $ python3 manage.py migrate

https://docs.netbox.dev/en/stable/plugins/#plugins

robertcsapo commented 10 months ago

I've made minor changes to support some new NetBox releases pip install ciscodnacnetbox==3.5.0