Replies: 1 comment
-
I don't think so. I note that for Devices, the Export option is "All Data (CSV)", not "Add Data (YAML)". In the source code, DeviceType and ModuleType have Similarly, in the relevant import code, there are related_object_forms for DeviceTypeImportView and ModuleTypeImportView, but not for DeviceBulkImportView. I'm not sure how useful the facility would be to import a device with its components in one step, which is probably why it wasn't implemented. I can also see complexities around what you'd do with virtual chassis, where the master device inherits all the interfaces of the rest of the VC. In principle, I think it would be useful to be able to import Device + interfaces + IP Addresses (because this would also allow you to import the Device's Primary IP address, which is not currently possible) - but that would add a lot more implementation complexity. What I can offer is a script, where after you import a Device, you can run the script to create all the missing components - it copies them from the corresponding DeviceType: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When exporting a device type via the All data option, it allows you to export all the information about the device type via a file, including the components attached (interfaces, rear-ports, front-ports, etc.). Then, if importing that YAML file to another Netbox instance correctly creates the device type along with the component templates as well.
Is there a way to import a YAML containing Device information INCLUDING interface/port information? I have tried to format a YAML file to achieve this, which I based off the device type YAML, however when the import finishes the device is created without any of its components that were provided in the file.
Any help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions