Edge-Assisted Secure and Dependable Optimal Policies for the 5G Cloudified Infrastructure