You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your only option is to make a small change to the code (which effectively negates the "if not module, skip") and thus installs all the module types or filter by vendor, only.
I can think of a few ways around this:
use regex instead of slug. Match on the file path. This would be the most powerful method since you can specify the manufacturer name as part of the path and might not require that much refactoring... especially if you remove the --slug filter altogether. If slug: for module-types does not come to netbox in future versions,
introduce a slug: to the module-type yaml files and remove it from the parsed dict before sending it to the server
Right now, the importer script checks to see if you have netbox 4.3. If yes, module support is enabled.
Later, a check for
modules=Trueis done and if yes, module types are imported.The problem is that you can't use
--slugto filter modules because those files do not have a slug.Your only option is to make a small change to the code (which effectively negates the "if not module, skip") and thus installs all the module types or filter by vendor, only.
I can think of a few ways around this:
regexinstead ofslug. Match on the file path. This would be the most powerful method since you can specify the manufacturer name as part of the path and might not require that much refactoring... especially if you remove the--slugfilter altogether. Ifslug:for module-types does not come to netbox in future versions,slug:to the module-type yaml files and remove it from the parsed dict before sending it to the server