An apparatus for virtualizing an optical network, comprising: a memory comprising an optical reachability graph, ORG, module (302, 1206) and an electrical reachability graph, ERG, module (312, 1208); a processor coupled to the memory, wherein the processor executes the ORG module (302, 1206) to cause the apparatus to perform the following: maintain optical transmission engineering rules for the optical network; maintain shared-risk-link-groups, SRLGs, for the optical network; determine a plurality of optical reachable paths using the optical transmission engineering rules and the SRLGs, wherein optical path between any two ORG nodes that satisfy the requirement of the receiver side OSNR being greater than the back-to-back OSNR is classified as an optical reachable path; and construct an ORG by interconnecting a plurality of ORG nodes via optical reachable paths, wherein the ORG abstracts optical transmission capability to form a transmission-capability-connectivity topology, wherein the processor executes the ERG module (312, 1208) to cause the apparatus to perform the following: partition the ORG nodes into a plurality of ERG nodes that perform grooming functions; determine a plurality of electrical-layer reachable paths for the ERG nodes; and construct an ERG over the ORG by interconnecting the ERG nodes with the electrical-layer reachable paths, wherein the ERG builds an electrical-optical channel logical topology using optical reachable paths obtained in the ORG, wherein the ERG module is within a centralized controller, the centralized controller interfacing with one or more optical transport hardware nodes, the ERG module form an ERG virtualization layer by extracting the networking capability of regenerators that perform OEO conversion and the grooming functional capability of virtual nodes to form the electrical-optical channel logical topology, the virtual nodes includes Optical Transmission Network, OTN, switch and Ethernet switch. a memory comprising an optical reachability graph, ORG, module (302, 1206) and an electrical reachability graph, ERG, module (312, 1208); a processor coupled to the memory, maintain optical transmission engineering rules for the optical network; maintain shared-risk-link-groups, SRLGs, for the optical network; determine a plurality of optical reachable paths using the optical transmission engineering rules and the SRLGs, wherein optical path between any two ORG nodes that satisfy the requirement of the receiver side OSNR being greater than the back-to-back OSNR is classified as an optical reachable path; and construct an ORG by interconnecting a plurality of ORG nodes via optical reachable paths, wherein the ORG abstracts optical transmission capability to form a transmission-capability-connectivity topology, partition the ORG nodes into a plurality of ERG nodes that perform grooming functions; determine a plurality of electrical-layer reachable paths for the ERG nodes; and construct an ERG over the ORG by interconnecting the ERG nodes with the electrical-layer reachable paths, wherein the ERG builds an electrical-optical channel logical topology using optical reachable paths obtained in the ORG, wherein the ERG module is within a centralized controller, the centralized controller interfacing with one or more optical transport hardware nodes, the ERG module form an ERG virtualization layer by extracting the networking capability of regenerators that perform OEO conversion and the grooming functional capability of virtual nodes to form the electrical-optical channel logical topology, the virtual nodes includes Optical Transmission Network, OTN, switch and Ethernet switch.