This removes all the duplicated code where the interfaces are iterated and the radio/hostapd instances are created. Instead the two new APIs are used to get each instance, e.g.: hapd = HostapdCLI(config='ssid.conf') radio = hwsim.get_radio('radX')