summaryrefslogtreecommitdiff
path: root/isotests/models.py
blob: 1eaca1630ed70997127c8f5f35217621dc01ebc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
from django.db import models

# Create your models here.
class Iso(models.Model):
    date = models.DateField()

    def __unicode__(self):
        return str(self.date)

class Hardware(models.Model):
    name = models.CharField(max_length=200)

    def __unicode__(self):
        return self.name

class InstallType(models.Model):
    name = models.CharField(max_length=200)

    def __unicode__(self):
        return self.name

class Source(models.Model):
    name = models.CharField(max_length=200)

    def __unicode__(self):
        return self.name

class Filesystem(models.Model):
    name = models.CharField(max_length=200)

    def __unicode__(self):
        return self.name

class Module(models.Model):
    name = models.CharField(max_length=200)

    def __unicode__(self):
        return self.name

class Bootloader(models.Model):
    name = models.CharField(max_length=200)

    def __unicode__(self):
        return self.name

class Test(models.Model):
    ARCH_CHOICES = (
        ('d86', 'dual, option i686'),
        ('d64', 'dual, option x86_64'),
        ('x86', 'i686'),
        ('x64', 'x86_64')
    )

    ISOTYPE_CHOICES = (
        ('c', 'core'),
        ('n', 'net')
    )

    BOOTTYPE_CHOICES = (
        ('o', 'optical'),
        ('u', 'usb'),
        ('p', 'pxe')
    )

    CLOCK_CHOICES = (
        ('d', 'default'),
        ('m', 'configured manually'),
        ('n', 'NTP')
    )

    user_name = models.CharField(max_length=500)
    user_email = models.EmailField()
    iso = models.ForeignKey(Iso)
    arch = models.CharField(max_length=3, choices=ARCH_CHOICES)
    isotype = models.CharField(max_length=1, choices=ISOTYPE_CHOICES)
    boottype = models.CharField(max_length=1, choices=BOOTTYPE_CHOICES)
    hardwaretype = models.ForeignKey(Hardware)
    installtype = models.ForeignKey(InstallType)
    source = models.ForeignKey(Source)
    clock = models.CharField(max_length=1, choices=CLOCK_CHOICES)
    filesystem = models.ForeignKey(Filesystem)
    ms = models.ManyToManyField(Module)    
    rollback = models.BooleanField()
    rollback_filesystem = models.ForeignKey(Filesystem, related_name="rollback_test")
    rollback_modules = models.ManyToManyField(Module, related_name="rollback_test")
    success = models.BooleanField()
    comments = models.TextField()