rename local repo snippet and add failover repo support

Change-Id: I12130fe0bc9b8f39d755495348546a308dd652d5