netbox-community / customizations

A collection of community submitted and maintained customizations including reports, scripts, validators and export templates
MIT License
206 stars 55 forks source link

Add script to flip a rack while preserving physical positions #95

Closed pv2b closed 2 months ago

pv2b commented 1 year ago

So have you ever fully documented a rack only for someone to come along and say you got the rack coordinates backwards? Maybe you're using a rack that has two coordinate schemes like ENOC racks which label their coordinates as 1/47, 2/46 etc and you arbitrarilly chose the "wrong" choice that's different compared to all other racks in your org? (True story)

Well, with this script you can take an existing rack, flip the numbering scheme between ascending/descending coordinates, and then change all device coordinates, so that, by the time the script is done, it looks like only the rack coordinates have changed without any devices physically moving.

pv2b commented 1 year ago

Actually, I just realized this doesn't fix rack reservations, let me fix that

jsenecal commented 2 months ago

Thanks for your contribution @pv2b