def _update_network_adapters(interface_old_new, parent):
    '''
    Returns a list of vim.vm.device.VirtualDeviceSpec specifying
    configuration(s) for changed network adapters, the adapter type cannot
    be changed, as input the old and new configs are defined in a dictionary.

    interface_old_new
        Dictionary with old and new keys which contains the current and the
        next config for a network device

    parent
        Parent managed object reference
    '''
    network_changes = []
    if interface_old_new:
        devs = [inter['old']['mac'] for inter in interface_old_new]
        log.trace('Updating network interfaces %s', devs)
        for item in interface_old_new:
            current_interface = item['old']
            next_interface = item['new']
            difference = recursive_diff(current_interface, next_interface)
            difference.ignore_unset_values = False
            if difference.changed():
                log.trace('Virtual machine network adapter will be updated '
                          'switch_type=%s name=%s adapter_type=%s mac=%s',
                          next_interface['switch_type'],
                          next_interface['name'],
                          current_interface['adapter_type'],
                          current_interface['mac'])
                device_config_spec = _apply_network_adapter_config(
                    current_interface['key'],
                    next_interface['name'],
                    current_interface['adapter_type'],
                    next_interface['switch_type'],
                    operation='edit',
                    mac=current_interface['mac'],
                    parent=parent)
                network_changes.append(device_config_spec)
    return network_changes
Returns a list of vim.vm.device.VirtualDeviceSpec specifying
    configuration(s) for changed network adapters, the adapter type cannot
    be changed, as input the old and new configs are defined in a dictionary.

    interface_old_new
        Dictionary with old and new keys which contains the current and the
        next config for a network device

    parent
        Parent managed object reference