There was no master plan. Assuming there was one is a kind of a conspiracy theory. No side could have had this master plan. There were many scenarios how this could have involved and no one could predict the most probable. If anything Putin and his associates are least capable of strategic thinking because they are driven by greed, corruption, internal power struggles and deranged personal ambitions. The only advantage that Putin has in this plan is the ability to throw in tens and probably hundreds of thousands of own people into this mess cause life has little value in Russia