« Previous | Next » 

Revision 4e3789fd

ID4e3789fd4fed2b04e55c9b2bf0caf5fd50d2f0a5

Added by Christos Stavrakakis almost 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

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences