The increasing demand for data has driven the advancement of optical networks from traditional architectures to more flexible, dynamic and efficient solutions. This includes technologies like flexgrid reconfigurable optical add-drop multiplexers (ROADMs), variable bandwidth transponders (VBTs) providing different modulation, coding schemes and baud rates. These advancements have brought about new challenges that concerns to the routing and spectrum allocation (RSA), fragmented spectrum, need for rapid and efficient channel restoration, and operation and maintenance management of optical networks. To address these challenges, a dynamic and flexible network requires a highly advanced network operational system (OS) capable of efficiently managing and allocating network resources. It relies on network abstraction, sensors, actuators, and software-defined networking (SDN) to enable algorithms, management, control, and decision-making. Improving the sensing capabilities of the network is crucial. Modern hardware and sensor technology can help forecast fiber breaks, equipment failures, and other potential issues in advance, allowing for proactive actions to be taken. Machine learning (ML) methods have been proposed in the literature to enhance the accuracy of quality of transmission (QoT) estimation, mitigate nonlinearities and provide decisions. This reduces the need for conservative design margins, maximizes the capacity of optical network systems and reduces the investment in infrastructure. Failure management is a critical aspect of optical networks. Providing early-warning and proactive protection is essential. This includes detecting failures, localizing them, identifying the root causes, and estimating their magnitude. Quick response to failures is vital to maintaining network reliability