keeping length ?

i could use advices how to do harddrive cables?
image/animation that i am doing is so that cables are connected to mother board and harddrive. their location moves so i want that cables “live” with movement, but their length stays same(constant)

I tought soft body could be one way, but with curves i could mold their form better to resemble real like cables. So how to do cables so that their length stays and it stays connected to MB and HDD?