[Copy paste](https://github.com/Mirantis/fuelweb/blob/ca8d5934652cd2fa3f79336bdfb663be14e410ae/nailgun/nailgun/api/handlers/network_configuration.py#L88)
You can just add ```serialize``` method to [model](https://github.com/Mirantis/fuelweb/blob/ca8d5934652cd2fa3f79336bdfb663be14e410ae/nailgun/nailgun/api/models.py#L412).
And use this method everywhere.