Two things:
iPersia is just a variable that refers to the civs slot number, e.g. 6 for Persia. To be able to call methods, you need an object, in this case the team object, which you can get with gc.getTeam(iPersia).
Second, A.isVassal(B) only tells you if B is a vassal of A, but doesn't change anything (this is true for all methods starting with is... or get...). You need CyTeam.setVassal(iPlayer, bVassal, bCapitulated), where iPlayer is the new master civ, bVassal the new value (True to make them a vassal) and bCapitulated should be True if it's a capitulated vassal, otherwise False.