« Previous | Next » 

Revision 4e3789fd


Added by Christos Stavrakakis about 7 years ago

cyclades: Add list of subnet IDs to network model

Extend Network model with 'subnet_ids' attribute. This attribute is a
list with the IDs of the subnet that belong to this network and is
stored in DB as a comma seperated list of integers.

This information is already contained in the Subnet model. However, we
also store it in the DB model to make GET /networks API call faster by
avoiding use of 'prefetch_related'.

This commit also extends 'create_subnet' function to update the
network's 'subnet_ids' field.

Refs #5109


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences