Commit 69786a65 authored by Georgios Ouzounis's avatar Georgios Ouzounis
Browse files

Merge pull request #4 from efikalti/LAM-53-Django

added connection for cluster-project
parents 4de745f9 c843375d
......@@ -6,12 +6,12 @@ class User(models.Model):
token = models.CharField("Okeanos Token", null=True, blank=True, unique=True, default="", max_length=64,
help_text="Token provided by ~okeanos.")
class Projects(models.Model):
class Project(models.Model):
id = models.AutoField("Project ID", primary_key=True, null=False, blank=False, unique=True, default="", help_text="Project id provided by kamaki.")
description = models.TextField("Project Description", null=True, blank=True, unique=False, default="",
help_text="The description of a project.")
class Clusters(models.Model):
class Cluster(models.Model):
id = models.AutoField("Cluster ID", primary_key=True, null=False, help_text="Auto-increment cluster id.")
master_server = models.ForeignKey('Server', null=True, blank=True, unique=True, on_delete=models.CASCADE)
......@@ -28,16 +28,20 @@ class PrivateNetwork(models.Model):
class UserProjectConnection(models.Model):
user_id = models.ForeignKey('User', null=False, blank=False, unique=False, on_delete=models.CASCADE)
project_id = models.ForeignKey('Projects', null=False, blank=False, unique=False, on_delete=models.CASCADE)
project_id = models.ForeignKey('Project', null=False, blank=False, unique=False, on_delete=models.CASCADE)
class UserClusterConnection(models.Model):
user_id = models.ForeignKey('User', null=False, blank=False, unique=False, on_delete=models.CASCADE)
cluster_id = models.ForeignKey('Clusters', null=False, blank=False, unique=False, on_delete=models.CASCADE)
cluster_id = models.ForeignKey('Cluster', null=False, blank=False, unique=False, on_delete=models.CASCADE)
class ClusterServerConnection(models.Model):
server_id = models.ForeignKey('Server', null=False, blank=False, unique=False, on_delete=models.CASCADE)
cluster_id = models.ForeignKey('Clusters', null=False, blank=False, unique=False, on_delete=models.CASCADE)
cluster_id = models.ForeignKey('Cluster', null=False, blank=False, unique=False, on_delete=models.CASCADE)
class ClusterNetworkConnection(models.Model):
network_id = models.ForeignKey('PrivateNetwork', null=False, blank=False, unique=False, on_delete=models.CASCADE)
cluster_id = models.ForeignKey('Clusters', null=False, blank=False, unique=False, on_delete=models.CASCADE)
cluster_id = models.ForeignKey('Cluster', null=False, blank=False, unique=False, on_delete=models.CASCADE)
class ClusterProjectConnection(models.Model):
network_id = models.ForeignKey('Project', null=False, blank=False, unique=False, on_delete=models.CASCADE)
cluster_id = models.ForeignKey('Cluster', null=False, blank=False, unique=False, on_delete=models.CASCADE)
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