1 # Generated by Django 2.1 on 2018-09-14 14:48
3 from django.conf import settings
4 import django.core.validators
5 from django.db import migrations, models
6 import django.db.models.deletion
9 class Migration(migrations.Migration):
14 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
15 ('account', '0001_initial'),
19 migrations.CreateModel(
22 ('id', models.AutoField(primary_key=True, serialize=False)),
23 ('name', models.CharField(max_length=200, unique=True)),
24 ('description', models.CharField(default='', max_length=1000)),
27 migrations.CreateModel(
30 ('id', models.AutoField(primary_key=True, serialize=False)),
31 ('cores', models.IntegerField()),
32 ('architecture', models.CharField(choices=[('x86_64', 'x86_64'), ('aarch64', 'aarch64')], max_length=50)),
33 ('cpus', models.IntegerField()),
34 ('cflags', models.TextField(null=True)),
37 migrations.CreateModel(
40 ('id', models.AutoField(primary_key=True, serialize=False)),
41 ('size', models.IntegerField()),
42 ('media_type', models.CharField(choices=[('SSD', 'SSD'), ('HDD', 'HDD')], max_length=50)),
43 ('name', models.CharField(max_length=50)),
44 ('rotation', models.IntegerField(default=0)),
45 ('interface', models.CharField(choices=[('sata', 'sata'), ('sas', 'sas'), ('ssd', 'ssd'), ('nvme', 'nvme'), ('scsi', 'scsi'), ('iscsi', 'iscsi')], default='sata', max_length=50)),
48 migrations.CreateModel(
51 ('id', models.AutoField(primary_key=True, serialize=False)),
54 migrations.CreateModel(
55 name='GenericInterface',
57 ('id', models.AutoField(primary_key=True, serialize=False)),
58 ('host', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='generic_interfaces', to='resource_inventory.GenericHost')),
61 migrations.CreateModel(
62 name='GenericResource',
64 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
65 ('name', models.CharField(max_length=200, validators=[django.core.validators.RegexValidator(message='Enter a valid hostname. Full domain name may be 1-253 characters, each hostname 1-63 characters (including suffixed dot), and valid characters for hostnames are A-Z, a-z, 0-9, hyphen (-), and underscore (_)', regex='(?=^.{1,253}$)(?=(^([A-Za-z0-9\\-\\_]{1,62}\\.)*[A-Za-z0-9\\-\\_]{1,63}$))')])),
68 migrations.CreateModel(
69 name='GenericResourceBundle',
71 ('id', models.AutoField(primary_key=True, serialize=False)),
72 ('name', models.CharField(max_length=300, unique=True)),
73 ('xml', models.TextField()),
74 ('description', models.CharField(default='', max_length=1000)),
75 ('lab', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='account.Lab')),
76 ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
79 migrations.CreateModel(
82 ('id', models.AutoField(primary_key=True, serialize=False)),
83 ('booked', models.BooleanField(default=False)),
84 ('name', models.CharField(max_length=200, unique=True)),
85 ('labid', models.CharField(default='default_id', max_length=200)),
86 ('working', models.BooleanField(default=True)),
87 ('vendor', models.CharField(default='unknown', max_length=100)),
88 ('model', models.CharField(default='unknown', max_length=150)),
91 migrations.CreateModel(
92 name='HostConfiguration',
94 ('id', models.AutoField(primary_key=True, serialize=False)),
95 ('bundle', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='hostConfigurations', to='resource_inventory.ConfigBundle')),
96 ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='configuration', to='resource_inventory.GenericHost')),
99 migrations.CreateModel(
102 ('id', models.AutoField(primary_key=True, serialize=False)),
103 ('host_type', models.PositiveSmallIntegerField()),
104 ('name', models.CharField(max_length=200, unique=True)),
105 ('description', models.TextField()),
106 ('labs', models.ManyToManyField(related_name='hostprofiles', to='account.Lab')),
109 migrations.CreateModel(
112 ('id', models.AutoField(primary_key=True, serialize=False)),
113 ('lab_id', models.IntegerField()),
114 ('name', models.CharField(max_length=200)),
115 ('public', models.BooleanField(default=True)),
116 ('description', models.TextField()),
117 ('from_lab', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.Lab')),
118 ('host_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.HostProfile')),
119 ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
122 migrations.CreateModel(
125 ('id', models.AutoField(primary_key=True, serialize=False)),
126 ('name', models.CharField(max_length=200)),
129 migrations.CreateModel(
132 ('id', models.AutoField(primary_key=True, serialize=False)),
133 ('mac_address', models.CharField(max_length=17)),
134 ('bus_address', models.CharField(max_length=50)),
135 ('name', models.CharField(default='eth0', max_length=100)),
138 migrations.CreateModel(
139 name='InterfaceProfile',
141 ('id', models.AutoField(primary_key=True, serialize=False)),
142 ('speed', models.IntegerField()),
143 ('name', models.CharField(max_length=100)),
144 ('nic_type', models.CharField(choices=[('onboard', 'onboard'), ('pcie', 'pcie')], default='onboard', max_length=50)),
145 ('host', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='interfaceprofile', to='resource_inventory.HostProfile')),
148 migrations.CreateModel(
151 ('id', models.AutoField(primary_key=True, serialize=False)),
152 ('vlan_id', models.IntegerField()),
153 ('name', models.CharField(max_length=100)),
156 migrations.CreateModel(
159 ('id', models.AutoField(primary_key=True, serialize=False)),
160 ('bundle', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='opnfv_config', to='resource_inventory.ConfigBundle')),
161 ('installer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.Installer')),
164 migrations.CreateModel(
167 ('id', models.AutoField(primary_key=True, serialize=False)),
168 ('name', models.CharField(max_length=200)),
169 ('description', models.TextField()),
172 migrations.CreateModel(
175 ('id', models.AutoField(primary_key=True, serialize=False)),
176 ('name', models.CharField(max_length=100)),
177 ('sup_installers', models.ManyToManyField(blank=True, to='resource_inventory.Installer')),
180 migrations.CreateModel(
183 ('id', models.AutoField(primary_key=True, serialize=False)),
184 ('amount', models.IntegerField()),
185 ('channels', models.IntegerField()),
186 ('host', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='ramprofile', to='resource_inventory.HostProfile')),
189 migrations.CreateModel(
190 name='ResourceBundle',
192 ('id', models.AutoField(primary_key=True, serialize=False)),
193 ('template', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='resource_inventory.GenericResourceBundle')),
196 migrations.CreateModel(
199 ('id', models.AutoField(primary_key=True, serialize=False)),
200 ('name', models.CharField(max_length=300)),
203 migrations.CreateModel(
206 ('id', models.AutoField(primary_key=True, serialize=False)),
207 ('vlan_id', models.IntegerField()),
208 ('tagged', models.BooleanField()),
211 migrations.CreateModel(
214 ('genericresource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='resource_inventory.GenericResource')),
216 bases=('resource_inventory.genericresource',),
219 model_name='opnfvconfig',
221 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.Scenario'),
224 model_name='interface',
226 field=models.ManyToManyField(to='resource_inventory.Vlan'),
229 model_name='interface',
231 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='interfaces', to='resource_inventory.Host'),
234 model_name='installer',
235 name='sup_scenarios',
236 field=models.ManyToManyField(blank=True, to='resource_inventory.Scenario'),
239 model_name='hostconfiguration',
241 field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='resource_inventory.Image'),
244 model_name='hostconfiguration',
246 field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='resource_inventory.OPNFVRole'),
251 field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hosts', to='resource_inventory.ResourceBundle'),
256 field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='configuration', to='resource_inventory.HostConfiguration'),
261 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.Lab'),
266 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.HostProfile'),
271 field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.GenericHost'),
274 model_name='genericresource',
276 field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='generic_resources', to='resource_inventory.GenericResourceBundle'),
279 model_name='genericinterface',
281 field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='resource_inventory.InterfaceProfile'),
284 model_name='genericinterface',
286 field=models.ManyToManyField(to='resource_inventory.Vlan'),
289 model_name='generichost',
291 field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='resource_inventory.HostProfile'),
294 model_name='generichost',
296 field=models.OneToOneField(on_delete=django.db.models.deletion.DO_NOTHING, related_name='generic_host', to='resource_inventory.GenericResource'),
299 model_name='diskprofile',
301 field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='storageprofile', to='resource_inventory.HostProfile'),
304 model_name='cpuprofile',
306 field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='cpuprofile', to='resource_inventory.HostProfile'),
309 model_name='configbundle',
311 field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.GenericResourceBundle'),
314 model_name='configbundle',
316 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
319 model_name='genericpod',
321 field=models.ManyToManyField(to='resource_inventory.GenericHost'),
324 model_name='genericpod',
326 field=models.ManyToManyField(to='resource_inventory.Network'),