Flexible grid networks need rigorous resource planning to avoid network over-dimensioning and resource over-provisioning. The network must provision the hardware and spectrum resources statically, even for dynamic random bandwidth demands, due to the infrastructure of flexible grid networks, hardware limitations, and the reconfiguration speed of the control plane. We propose a flexible-online-offline probabilistic (FOOP) algorithm for the static spectrum assignment of random bandwidth demands. The FOOP algorithm considers the probabilistic nature of random bandwidth demands and balances hardware and control plane pressures with spectrum assignment efficiency. The FOOP algorithm uses the probabilistic spectrum Gaussian noise (PSGN) model to estimate the physical-layer impairment (PLIs) for random bandwidth traffic. Compared to a benchmark spectrum assignment algorithm and a widely applied PLI estimation model, the proposed FOOP algorithm using the PSGN model saves up to 49% of network resources.