Commit f9c81cc4 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis

cyclades: Add field project in models

Add field `project' and initialize it to `userid' for all VMs, networks and
floating IPs. This means that all resources are assigned to the owner's base
parent 14fd7a77
This diff is collapsed.
......@@ -303,6 +303,7 @@ class VirtualMachine(models.Model):
userid = models.CharField('User ID of the owner', max_length=100,
db_index=True, null=False)
project = models.CharField(max_length=255, null=True)
backend = models.ForeignKey(Backend, null=True,
......@@ -483,6 +484,7 @@ class Network(models.Model):
name = models.CharField('Network Name', max_length=NETWORK_NAME_LENGTH)
userid = models.CharField('User ID of the owner', max_length=128,
null=True, db_index=True)
project = models.CharField(max_length=255, null=True)
flavor = models.CharField('Flavor', max_length=32, null=False)
mode = models.CharField('Network Mode', max_length=16, null=True)
link = models.CharField('Network Link', max_length=32, null=True)
......@@ -727,6 +729,7 @@ class IPAddress(models.Model):
userid = models.CharField("UUID of the owner", max_length=128, null=False,
project = models.CharField(max_length=255, null=True)
address = models.CharField("IP Address", max_length=64, null=False)
floating_ip = models.BooleanField("Floating IP", null=False, default=False)
ipversion = models.IntegerField("IP Version", null=False)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment