Somalia 's parliament has passed a no confidence motion against the prime minister and his cabinet , effectively dissolving the government .