Commit b096549f by Őry Máté

new model: instance type

parent c00121c6
......@@ -151,13 +151,21 @@ class Network(models.Model):
class Meta:
ordering = ['name']
class InstanceType(models.Model):
name = models.CharField(max_length=100, unique=True,
verbose_name=_('name'))
CPU = models.IntegerField()
RAM = models.IntegerField()
def __unicode__(self):
return u"%s" % self.name
class Template(models.Model):
name = models.CharField(max_length=100, unique=True,
verbose_name=_('név'))
access_type = models.CharField(max_length=10, choices=[('rdp', 'rdp'), ('nx', 'nx'), ('ssh', 'ssh')])
disk = models.ForeignKey(Disk)
instance_type = models.CharField(max_length=20, choices=[('small', 'small'), ('medium', 'medium'), ('large', 'large')])
instance_type = models.ForeignKey(InstanceType)
network = models.ForeignKey(Network)
owner = models.ForeignKey(User)
created_at = models.DateTimeField(auto_now_add=True)
......
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 sign in to comment