--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/16facfdd-8225-4722-a1a1-eab35eb94990%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Here's one to kick off: checking for devices and VMs which should have a primary IP address but don't (i.e. they have one or more active, non-management addresses, but none selected as primary)
Since I run into the exact same issue – here’s mine. The errors are the same if I use the documentation’s devices example. Also: My reports directory is in /opt/Netbox_reports, and I’ve set the REPORTS_ROOT accordingly.
# python3 manage.py runreport addresses
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/opt/netbox-2.2.4/netbox/extras/management/commands/runreport.py", line 19, in handle
reports = get_reports()
File "/opt/netbox-2.2.4/netbox/extras/reports.py", line 49, in get_reports
module = importlib.import_module('reports.{}'.format(module_name))
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'reports.addresses'
However, if I stick the reports in /opt/netbox/netbox/reports and uncomment the REPORT_ROOT variable in the config, it all looks pretty good
Is it a bug or did I do something stupid?
Frank
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/59ca3c16-62ac-47a4-be34-175a476c979d%40googlegroups.com.
However, if I stick the reports in /opt/netbox/netbox/reports and uncomment the REPORT_ROOT variable in the config, it all looks pretty good
Is it a bug or did I do something stupid?
Yes, I did. And if I don’t have any .py files in my own reports directory, I do get the appropriate “there are no reports here” message.
I just know that if I don’t stick them in a separate directory, the day will come where I forget to copy them out on a Netbox update ;)
Frank
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/a03c7e98-606b-494a-9b02-21c3b23bb1b3%40googlegroups.com.
Are they docs on the syntax or is that covered by understand the constructs of python?
Does the API contain the constants that are used in the reports?