So e. g. if I use a Long sword and a buckler, is switching between 1h and 2h and simultaneously bringing the buckler up or down a secondary action then or does it not even count as an action at all and is for free (so a character is able to do: main action, secondary action plus this free action)?
No shield can be used with 2-handed weapons (not even a buckler).
If you draw a 2-handed weapon, or switch to 2-handed with a weapons that can be used 1-handed or 2-handed, you immediately lose the Parry modifier from your shield. You regain it as soon as you switch back to a 1-handed weapon.