| Rigid fixed-grid wavelength division multiplexing (WDM) optical networks can no longer keep up with the emerging bandwidth-hungry and highly dynamic services in an efficient manner. As the available spectrum in optical fibers becomes occupied and is approaching fundamental limits, the research community has focused on seeking more advanced optical transmission and networking solutions that utilize the available bandwidth more effectively. To this end, the flexible/ elastic optical networking paradigm has emerged as a way to offer efficient use of the available optical resources. In this work, we provide a comprehensive view of the different pieces composing the ''flexible networking puzzle'' with special attention given to capturing the occurring interactions between different research fields. Only when these interrelations are clearly defined, an optimal network-wide solution can be offered. Physical layer technological aspects, network optimization for flexible networks, and control plane aspects are examined. Furthermore, future research directions and open issues are discussed.