In this paper, an OCDM-based multigranularity optical cross-connect (MG-OXC) is proposed to enable the optical path switching in bandwidth granularity finer than the wavelength-based path. Such an optical path switched by OCDM-based MG-OXC is called OCDM label-switched path (OCDM-LSP), which is capable of hybrid optical code (OC)/wavelength conversion along the path from a source to destination. With distinct OCs, OCDM-LSPs can share a single wavelength without any synchronization mechanism and be discriminated by ultrafast optical correlation. The asynchronous ability and OC conversion distinguish the OCDM-LSP from Packet-LSP or TDM-LSP in resolving granularity problem in wavelengthbased path. Based upon our proposal, all-optical optical path provisioning including F-LSP, WB-LSP, L-LSP and OCDM-LSP can be realized in the transport layer. Simulation is conducted and the results show the proposed OCDM-switching has gained a 2 order of blocking probability reduction even though only 5 OCs are employed. Furthermore, OC conversion in OCDM-LSP is proved to be another benefit for high flexibility in optical path provisioning and blocking performance improvement comparing to TDM-LSP.