diff options
Diffstat (limited to 'src/api/migrations/0001_initial.py')
-rw-r--r-- | src/api/migrations/0001_initial.py | 185 |
1 files changed, 185 insertions, 0 deletions
diff --git a/src/api/migrations/0001_initial.py b/src/api/migrations/0001_initial.py new file mode 100644 index 0000000..abe6f5e --- /dev/null +++ b/src/api/migrations/0001_initial.py @@ -0,0 +1,185 @@ +############################################################################## +# Copyright (c) 2018 Parker Berberian, Sawyer Bergeron, and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +# Generated by Django 2.1 on 2018-09-14 14:48 + +import api.models +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('booking', '__first__'), + ('resource_inventory', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='AccessRelation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('status', models.IntegerField(default=0)), + ('task_id', models.CharField(default=api.models.get_task_uuid, max_length=37)), + ('lab_token', models.CharField(default='null', max_length=50)), + ('message', models.TextField(default='')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='HostHardwareRelation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('status', models.IntegerField(default=0)), + ('task_id', models.CharField(default=api.models.get_task_uuid, max_length=37)), + ('lab_token', models.CharField(default='null', max_length=50)), + ('message', models.TextField(default='')), + ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.Host')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='HostNetworkRelation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('status', models.IntegerField(default=0)), + ('task_id', models.CharField(default=api.models.get_task_uuid, max_length=37)), + ('lab_token', models.CharField(default='null', max_length=50)), + ('message', models.TextField(default='')), + ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.Host')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Job', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('status', models.IntegerField(default=0)), + ('delta', models.TextField()), + ('complete', models.BooleanField(default=False)), + ('booking', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='booking.Booking')), + ], + ), + migrations.CreateModel( + name='OpnfvApiConfig', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('installer', models.CharField(max_length=100)), + ('scenario', models.CharField(max_length=100)), + ('delta', models.TextField()), + ('roles', models.ManyToManyField(to='resource_inventory.Host')), + ], + ), + migrations.CreateModel( + name='SoftwareRelation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('status', models.IntegerField(default=0)), + ('task_id', models.CharField(default=api.models.get_task_uuid, max_length=37)), + ('lab_token', models.CharField(default='null', max_length=50)), + ('message', models.TextField(default='')), + ('job', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Job')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='TaskConfig', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + ), + migrations.CreateModel( + name='AccessConfig', + fields=[ + ('taskconfig_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.TaskConfig')), + ('access_type', models.CharField(max_length=50)), + ('revoke', models.BooleanField(default=False)), + ('context', models.TextField(default='')), + ('delta', models.TextField()), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + bases=('api.taskconfig',), + ), + migrations.CreateModel( + name='HardwareConfig', + fields=[ + ('taskconfig_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.TaskConfig')), + ('image', models.CharField(default='defimage', max_length=100)), + ('power', models.CharField(default='off', max_length=100)), + ('hostname', models.CharField(default='hostname', max_length=100)), + ('ipmi_create', models.BooleanField(default=False)), + ('delta', models.TextField()), + ], + bases=('api.taskconfig',), + ), + migrations.CreateModel( + name='NetworkConfig', + fields=[ + ('taskconfig_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.TaskConfig')), + ('delta', models.TextField()), + ('interfaces', models.ManyToManyField(to='resource_inventory.Interface')), + ], + bases=('api.taskconfig',), + ), + migrations.CreateModel( + name='SoftwareConfig', + fields=[ + ('taskconfig_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.TaskConfig')), + ('opnfv', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.OpnfvApiConfig')), + ], + bases=('api.taskconfig',), + ), + migrations.AddField( + model_name='hostnetworkrelation', + name='job', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Job'), + ), + migrations.AddField( + model_name='hosthardwarerelation', + name='job', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Job'), + ), + migrations.AddField( + model_name='accessrelation', + name='job', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Job'), + ), + migrations.AddField( + model_name='softwarerelation', + name='config', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='api.SoftwareConfig'), + ), + migrations.AddField( + model_name='hostnetworkrelation', + name='config', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='api.NetworkConfig'), + ), + migrations.AddField( + model_name='hosthardwarerelation', + name='config', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='api.HardwareConfig'), + ), + migrations.AddField( + model_name='accessrelation', + name='config', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='api.AccessConfig'), + ), + ] |