importing YAML-defined device type with images #2326
Unanswered
xavbroadcast
asked this question in
Q&A
Replies: 1 comment
-
Just to add, if this can't work, it's not the end of the world as it's a few clicks to manually add the devicetype images, but when I'm doing a fresh NetBox install and have my personal library of devicetype images and YAML files, it would be great to be able to inject all this in a couple of easy steps rather than have to click on the web interface for each devicetype :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was hoping I'd understood a cool feature but I can't get it to work so maybe I've misunderstood.
In the community device-library, the documentation suggests it's possible to define front and rear images by setting the boolean
front_image
andrear_image
totrue
. By default, I understand the filename to be<VALUE_IN_SLUG>.front.<acceptable_format>
and<VALUE_IN_SLUG>.rear.<acceptable_format>
. My images are in PNG format and appear fine if manually uploaded via the web interface.I've defined such a device-type (I took an original yaml file and edited it to make a few changes):
Separately, I've uploaded the png files to the default location:
/opt/netbox/netbox/media/devicetype-images/
What I was hoping was that when I imported the device type YAML file, the link would automatically be made to the PNG images corresponding to the device type slug text, but this doesn't appear to work, the links are not created:
However, I also noticed that if using a CSV import, the
front_image
andrear_image
fields are not present. I thought this might be because a CSV import is just that and there's no means to attach the image files at the same time, but maybe it's because the auto-linking between the media files located in the devicetype-images directory and the YAML file indicating they should be there no longer works?Beta Was this translation helpful? Give feedback.
All reactions