Skip to content
  • Christos Stavrakakis's avatar
    cyclades: Add accounting for IP Addresses · c7834da6
    Christos Stavrakakis authored
    Create IPAddressLog DB table to hold information about allocation of IP
    addresses to virtual servers. The information that is currently saved
    contains the IP address, the ID of the virtual server, the ID of the
    virtual network along with the datetime that the address has been
    allocated and released from the server.
    
    An entry in this table is created every time a NetworkInterface card
    that has an associated IP address is created in DB. The entry is updated
    with the 'released_at' timestamp when the NIC is destroyed in Ganeti.
    Currently, only IP addresses from public networks (network.public=True)
    are stored in this table.
    
    This commit also includes a DB data migration for all already allocated
    IP addresses. However, the 'allocated_at' timestamp of this entries will
    not be correct.
    c7834da6