Skip to content
  • Christos Stavrakakis's avatar
    cyclades: Add object managers for common models · a89c7a5a
    Christos Stavrakakis authored
    
    
    Create a custom Django ORM object manager for VirtualMachine, Network,
    Subnet, NetworkInterface, IPAddress and Volume object that can be used
    in order to retrieve the objects that can be accessed by the user.
    
    The resources that are accessible by the user include those that:
    * are owned by the user
    * are shared to a project the user is a member
    * are public
    
    The Port (NetworkInterface) resource needs special handling as it
    connects two resources (VirtualMachine and Network) that may be owned by
    different users in different projects. To overcome this issue, we make a
    port accessible to a user, if is connected to a VirtualMachine or
    Network that can be accessed by the user.
    
    Signed-off-by: default avatarChristos Stavrakakis <stavr.chris@gmail.com>
    a89c7a5a