aboutsummaryrefslogtreecommitdiffstats
path: root/src/resource_inventory/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'src/resource_inventory/migrations')
-rw-r--r--src/resource_inventory/migrations/0001_initial.py328
-rw-r--r--src/resource_inventory/migrations/0002_auto_20180919_1459.py18
-rw-r--r--src/resource_inventory/migrations/0003_vlan_public.py18
-rw-r--r--src/resource_inventory/migrations/0004_auto_20181017_1532.py28
-rw-r--r--src/resource_inventory/migrations/0005_image_os.py19
-rw-r--r--src/resource_inventory/migrations/0006_auto_20190124_1700.py76
-rw-r--r--src/resource_inventory/migrations/0007_auto_20190306_1616.py31
-rw-r--r--src/resource_inventory/migrations/0008_host_remote_management.py19
-rw-r--r--src/resource_inventory/migrations/0009_auto_20190315_1757.py73
-rw-r--r--src/resource_inventory/migrations/0010_auto_20190430_1405.py54
-rw-r--r--src/resource_inventory/migrations/0011_auto_20191106_2024.py33
-rw-r--r--src/resource_inventory/migrations/0012_auto_20200103_1850.py59
-rw-r--r--src/resource_inventory/migrations/0012_manual_20200218_1536.py25
-rw-r--r--src/resource_inventory/migrations/0013_auto_20200218_1536.py407
-rw-r--r--src/resource_inventory/migrations/0014_auto_20200305_1415.py18
-rw-r--r--src/resource_inventory/migrations/0015_resourcetemplate_copy_of.py19
-rw-r--r--src/resource_inventory/migrations/0016_auto_20201109_1947.py59
-rw-r--r--src/resource_inventory/migrations/0017_auto_20201218_1516.py18
-rw-r--r--src/resource_inventory/migrations/0018_auto_20210630_1629.py101
-rw-r--r--src/resource_inventory/migrations/0019_auto_20210701_1947.py43
-rw-r--r--src/resource_inventory/migrations/0020_cloudinitfile.py21
-rw-r--r--src/resource_inventory/migrations/0021_resourceconfiguration_cloud_init_files.py18
-rw-r--r--src/resource_inventory/migrations/0022_auto_20210925_2028.py23
-rw-r--r--src/resource_inventory/migrations/0023_cloudinitfile_generated.py18
-rw-r--r--src/resource_inventory/migrations/__init__.py0
25 files changed, 0 insertions, 1526 deletions
diff --git a/src/resource_inventory/migrations/0001_initial.py b/src/resource_inventory/migrations/0001_initial.py
deleted file mode 100644
index d01e8e7..0000000
--- a/src/resource_inventory/migrations/0001_initial.py
+++ /dev/null
@@ -1,328 +0,0 @@
-# Generated by Django 2.1 on 2018-09-14 14:48
-
-from django.conf import settings
-import django.core.validators
-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),
- ('account', '0001_initial'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='ConfigBundle',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('name', models.CharField(max_length=200, unique=True)),
- ('description', models.CharField(default='', max_length=1000)),
- ],
- ),
- migrations.CreateModel(
- name='CpuProfile',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('cores', models.IntegerField()),
- ('architecture', models.CharField(choices=[('x86_64', 'x86_64'), ('aarch64', 'aarch64')], max_length=50)),
- ('cpus', models.IntegerField()),
- ('cflags', models.TextField(null=True)),
- ],
- ),
- migrations.CreateModel(
- name='DiskProfile',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('size', models.IntegerField()),
- ('media_type', models.CharField(choices=[('SSD', 'SSD'), ('HDD', 'HDD')], max_length=50)),
- ('name', models.CharField(max_length=50)),
- ('rotation', models.IntegerField(default=0)),
- ('interface', models.CharField(choices=[('sata', 'sata'), ('sas', 'sas'), ('ssd', 'ssd'), ('nvme', 'nvme'), ('scsi', 'scsi'), ('iscsi', 'iscsi')], default='sata', max_length=50)),
- ],
- ),
- migrations.CreateModel(
- name='GenericHost',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ],
- ),
- migrations.CreateModel(
- name='GenericInterface',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('host', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='generic_interfaces', to='resource_inventory.GenericHost')),
- ],
- ),
- migrations.CreateModel(
- name='GenericResource',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('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}$))')])),
- ],
- ),
- migrations.CreateModel(
- name='GenericResourceBundle',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('name', models.CharField(max_length=300, unique=True)),
- ('xml', models.TextField()),
- ('description', models.CharField(default='', max_length=1000)),
- ('lab', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='account.Lab')),
- ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
- ],
- ),
- migrations.CreateModel(
- name='Host',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('booked', models.BooleanField(default=False)),
- ('name', models.CharField(max_length=200, unique=True)),
- ('labid', models.CharField(default='default_id', max_length=200)),
- ('working', models.BooleanField(default=True)),
- ('vendor', models.CharField(default='unknown', max_length=100)),
- ('model', models.CharField(default='unknown', max_length=150)),
- ],
- ),
- migrations.CreateModel(
- name='HostConfiguration',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('bundle', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='hostConfigurations', to='resource_inventory.ConfigBundle')),
- ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='configuration', to='resource_inventory.GenericHost')),
- ],
- ),
- migrations.CreateModel(
- name='HostProfile',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('host_type', models.PositiveSmallIntegerField()),
- ('name', models.CharField(max_length=200, unique=True)),
- ('description', models.TextField()),
- ('labs', models.ManyToManyField(related_name='hostprofiles', to='account.Lab')),
- ],
- ),
- migrations.CreateModel(
- name='Image',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('lab_id', models.IntegerField()),
- ('name', models.CharField(max_length=200)),
- ('public', models.BooleanField(default=True)),
- ('description', models.TextField()),
- ('from_lab', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.Lab')),
- ('host_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.HostProfile')),
- ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
- ],
- ),
- migrations.CreateModel(
- name='Installer',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('name', models.CharField(max_length=200)),
- ],
- ),
- migrations.CreateModel(
- name='Interface',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('mac_address', models.CharField(max_length=17)),
- ('bus_address', models.CharField(max_length=50)),
- ('name', models.CharField(default='eth0', max_length=100)),
- ],
- ),
- migrations.CreateModel(
- name='InterfaceProfile',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('speed', models.IntegerField()),
- ('name', models.CharField(max_length=100)),
- ('nic_type', models.CharField(choices=[('onboard', 'onboard'), ('pcie', 'pcie')], default='onboard', max_length=50)),
- ('host', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='interfaceprofile', to='resource_inventory.HostProfile')),
- ],
- ),
- migrations.CreateModel(
- name='Network',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('vlan_id', models.IntegerField()),
- ('name', models.CharField(max_length=100)),
- ],
- ),
- migrations.CreateModel(
- name='OPNFVConfig',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('bundle', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='opnfv_config', to='resource_inventory.ConfigBundle')),
- ('installer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.Installer')),
- ],
- ),
- migrations.CreateModel(
- name='OPNFVRole',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('name', models.CharField(max_length=200)),
- ('description', models.TextField()),
- ],
- ),
- migrations.CreateModel(
- name='Opsys',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('name', models.CharField(max_length=100)),
- ('sup_installers', models.ManyToManyField(blank=True, to='resource_inventory.Installer')),
- ],
- ),
- migrations.CreateModel(
- name='RamProfile',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('amount', models.IntegerField()),
- ('channels', models.IntegerField()),
- ('host', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='ramprofile', to='resource_inventory.HostProfile')),
- ],
- ),
- migrations.CreateModel(
- name='ResourceBundle',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('template', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='resource_inventory.GenericResourceBundle')),
- ],
- ),
- migrations.CreateModel(
- name='Scenario',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('name', models.CharField(max_length=300)),
- ],
- ),
- migrations.CreateModel(
- name='Vlan',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('vlan_id', models.IntegerField()),
- ('tagged', models.BooleanField()),
- ],
- ),
- migrations.CreateModel(
- name='GenericPod',
- fields=[
- ('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')),
- ],
- bases=('resource_inventory.genericresource',),
- ),
- migrations.AddField(
- model_name='opnfvconfig',
- name='scenario',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.Scenario'),
- ),
- migrations.AddField(
- model_name='interface',
- name='config',
- field=models.ManyToManyField(to='resource_inventory.Vlan'),
- ),
- migrations.AddField(
- model_name='interface',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='interfaces', to='resource_inventory.Host'),
- ),
- migrations.AddField(
- model_name='installer',
- name='sup_scenarios',
- field=models.ManyToManyField(blank=True, to='resource_inventory.Scenario'),
- ),
- migrations.AddField(
- model_name='hostconfiguration',
- name='image',
- field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='resource_inventory.Image'),
- ),
- migrations.AddField(
- model_name='hostconfiguration',
- name='opnfvRole',
- field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='resource_inventory.OPNFVRole'),
- ),
- migrations.AddField(
- model_name='host',
- name='bundle',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hosts', to='resource_inventory.ResourceBundle'),
- ),
- migrations.AddField(
- model_name='host',
- name='config',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='configuration', to='resource_inventory.HostConfiguration'),
- ),
- migrations.AddField(
- model_name='host',
- name='lab',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.Lab'),
- ),
- migrations.AddField(
- model_name='host',
- name='profile',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.HostProfile'),
- ),
- migrations.AddField(
- model_name='host',
- name='template',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.GenericHost'),
- ),
- migrations.AddField(
- model_name='genericresource',
- name='bundle',
- field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='generic_resources', to='resource_inventory.GenericResourceBundle'),
- ),
- migrations.AddField(
- model_name='genericinterface',
- name='profile',
- field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='resource_inventory.InterfaceProfile'),
- ),
- migrations.AddField(
- model_name='genericinterface',
- name='vlans',
- field=models.ManyToManyField(to='resource_inventory.Vlan'),
- ),
- migrations.AddField(
- model_name='generichost',
- name='profile',
- field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='resource_inventory.HostProfile'),
- ),
- migrations.AddField(
- model_name='generichost',
- name='resource',
- field=models.OneToOneField(on_delete=django.db.models.deletion.DO_NOTHING, related_name='generic_host', to='resource_inventory.GenericResource'),
- ),
- migrations.AddField(
- model_name='diskprofile',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='storageprofile', to='resource_inventory.HostProfile'),
- ),
- migrations.AddField(
- model_name='cpuprofile',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='cpuprofile', to='resource_inventory.HostProfile'),
- ),
- migrations.AddField(
- model_name='configbundle',
- name='bundle',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.GenericResourceBundle'),
- ),
- migrations.AddField(
- model_name='configbundle',
- name='owner',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
- ),
- migrations.AddField(
- model_name='genericpod',
- name='hosts',
- field=models.ManyToManyField(to='resource_inventory.GenericHost'),
- ),
- migrations.AddField(
- model_name='genericpod',
- name='networks',
- field=models.ManyToManyField(to='resource_inventory.Network'),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0002_auto_20180919_1459.py b/src/resource_inventory/migrations/0002_auto_20180919_1459.py
deleted file mode 100644
index 80c9e6f..0000000
--- a/src/resource_inventory/migrations/0002_auto_20180919_1459.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.1 on 2018-09-19 14:59
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0001_initial'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='hostprofile',
- name='host_type',
- field=models.PositiveSmallIntegerField(default=0),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0003_vlan_public.py b/src/resource_inventory/migrations/0003_vlan_public.py
deleted file mode 100644
index 07dc647..0000000
--- a/src/resource_inventory/migrations/0003_vlan_public.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.1 on 2018-09-26 14:41
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0002_auto_20180919_1459'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='vlan',
- name='public',
- field=models.BooleanField(default=False),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0004_auto_20181017_1532.py b/src/resource_inventory/migrations/0004_auto_20181017_1532.py
deleted file mode 100644
index 3a7475c..0000000
--- a/src/resource_inventory/migrations/0004_auto_20181017_1532.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# Generated by Django 2.1 on 2018-10-17 15:32
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0003_vlan_public'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='genericpod',
- name='genericresource_ptr',
- ),
- migrations.RemoveField(
- model_name='genericpod',
- name='hosts',
- ),
- migrations.RemoveField(
- model_name='genericpod',
- name='networks',
- ),
- migrations.DeleteModel(
- name='GenericPod',
- ),
- ]
diff --git a/src/resource_inventory/migrations/0005_image_os.py b/src/resource_inventory/migrations/0005_image_os.py
deleted file mode 100644
index ede008e..0000000
--- a/src/resource_inventory/migrations/0005_image_os.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Generated by Django 2.1 on 2019-01-10 16:18
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0004_auto_20181017_1532'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='image',
- name='os',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.Opsys'),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0006_auto_20190124_1700.py b/src/resource_inventory/migrations/0006_auto_20190124_1700.py
deleted file mode 100644
index a5a972f..0000000
--- a/src/resource_inventory/migrations/0006_auto_20190124_1700.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# Generated by Django 2.1 on 2019-01-24 17:00
-
-from django.conf import settings
-from django.db import migrations, models
-import django.db.models.deletion
-import resource_inventory.models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0005_image_os'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='cpuprofile',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cpuprofile', to='resource_inventory.HostProfile'),
- ),
- migrations.AlterField(
- model_name='diskprofile',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='storageprofile', to='resource_inventory.HostProfile'),
- ),
- migrations.AlterField(
- model_name='generichost',
- name='profile',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.HostProfile'),
- ),
- migrations.AlterField(
- model_name='generichost',
- name='resource',
- field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='generic_host', to='resource_inventory.GenericResource'),
- ),
- migrations.AlterField(
- model_name='genericinterface',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='generic_interfaces', to='resource_inventory.GenericHost'),
- ),
- migrations.AlterField(
- model_name='genericresource',
- name='bundle',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='generic_resources', to='resource_inventory.GenericResourceBundle'),
- ),
- migrations.AlterField(
- model_name='genericresourcebundle',
- name='lab',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='account.Lab'),
- ),
- migrations.AlterField(
- model_name='genericresourcebundle',
- name='owner',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
- ),
- migrations.AlterField(
- model_name='hostconfiguration',
- name='opnfvRole',
- field=models.ForeignKey(on_delete=models.SET(resource_inventory.models.get_sentinal_opnfv_role), to='resource_inventory.OPNFVRole'),
- ),
- migrations.AlterField(
- model_name='interfaceprofile',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='interfaceprofile', to='resource_inventory.HostProfile'),
- ),
- migrations.AlterField(
- model_name='ramprofile',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ramprofile', to='resource_inventory.HostProfile'),
- ),
- migrations.AlterField(
- model_name='resourcebundle',
- name='template',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.GenericResourceBundle'),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0007_auto_20190306_1616.py b/src/resource_inventory/migrations/0007_auto_20190306_1616.py
deleted file mode 100644
index 19a49c5..0000000
--- a/src/resource_inventory/migrations/0007_auto_20190306_1616.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by Django 2.1 on 2019-03-06 16:16
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0006_auto_20190124_1700'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='RemoteInfo',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('address', models.CharField(max_length=15)),
- ('mac_address', models.CharField(max_length=17)),
- ('password', models.CharField(max_length=100)),
- ('user', models.CharField(max_length=100)),
- ('management_type', models.CharField(default='ipmi', max_length=50)),
- ('versions', models.CharField(max_length=100)),
- ],
- ),
- migrations.AlterField(
- model_name='genericinterface',
- name='profile',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.InterfaceProfile'),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0008_host_remote_management.py b/src/resource_inventory/migrations/0008_host_remote_management.py
deleted file mode 100644
index f74a535..0000000
--- a/src/resource_inventory/migrations/0008_host_remote_management.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Generated by Django 2.1 on 2019-03-06 16:42
-
-from django.db import migrations, models
-import resource_inventory.models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0007_auto_20190306_1616'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='host',
- name='remote_management',
- field=models.ForeignKey(default=resource_inventory.models.get_default_remote_info, on_delete=models.SET(resource_inventory.models.get_default_remote_info), to='resource_inventory.RemoteInfo'),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0009_auto_20190315_1757.py b/src/resource_inventory/migrations/0009_auto_20190315_1757.py
deleted file mode 100644
index 92ed0e9..0000000
--- a/src/resource_inventory/migrations/0009_auto_20190315_1757.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# Generated by Django 2.1 on 2019-03-15 17:57
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0008_host_remote_management'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='NetworkConnection',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('vlan_is_tagged', models.BooleanField()),
- ],
- ),
- migrations.CreateModel(
- name='NetworkRole',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=100)),
- ],
- ),
- migrations.RemoveField(
- model_name='genericinterface',
- name='vlans',
- ),
- migrations.RemoveField(
- model_name='network',
- name='vlan_id',
- ),
- migrations.AddField(
- model_name='network',
- name='bundle',
- field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='networks', to='resource_inventory.GenericResourceBundle'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='network',
- name='is_public',
- field=models.BooleanField(default=False),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='vlan',
- name='network',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='resource_inventory.Network'),
- ),
- migrations.AddField(
- model_name='networkrole',
- name='network',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.Network'),
- ),
- migrations.AddField(
- model_name='networkconnection',
- name='network',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.Network'),
- ),
- migrations.AddField(
- model_name='genericinterface',
- name='connections',
- field=models.ManyToManyField(to='resource_inventory.NetworkConnection'),
- ),
- migrations.AddField(
- model_name='opnfvconfig',
- name='networks',
- field=models.ManyToManyField(to='resource_inventory.NetworkRole'),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0010_auto_20190430_1405.py b/src/resource_inventory/migrations/0010_auto_20190430_1405.py
deleted file mode 100644
index 3823eaf..0000000
--- a/src/resource_inventory/migrations/0010_auto_20190430_1405.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# Generated by Django 2.1 on 2019-04-30 14:05
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0009_auto_20190315_1757'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='HostOPNFVConfig',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ],
- ),
- migrations.RemoveField(
- model_name='hostconfiguration',
- name='opnfvRole',
- ),
- migrations.AddField(
- model_name='hostconfiguration',
- name='is_head_node',
- field=models.BooleanField(default=False),
- ),
- migrations.AddField(
- model_name='opnfvconfig',
- name='description',
- field=models.CharField(blank=True, default='', max_length=600),
- ),
- migrations.AddField(
- model_name='opnfvconfig',
- name='name',
- field=models.CharField(blank=True, default='', max_length=300),
- ),
- migrations.AddField(
- model_name='hostopnfvconfig',
- name='host_config',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='host_opnfv_config', to='resource_inventory.HostConfiguration'),
- ),
- migrations.AddField(
- model_name='hostopnfvconfig',
- name='opnfv_config',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='host_opnfv_config', to='resource_inventory.OPNFVConfig'),
- ),
- migrations.AddField(
- model_name='hostopnfvconfig',
- name='role',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='host_opnfv_configs', to='resource_inventory.OPNFVRole'),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0011_auto_20191106_2024.py b/src/resource_inventory/migrations/0011_auto_20191106_2024.py
deleted file mode 100644
index bde9f9d..0000000
--- a/src/resource_inventory/migrations/0011_auto_20191106_2024.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# Generated by Django 2.2 on 2019-11-06 20:24
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0010_auto_20190430_1405'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='configbundle',
- name='hidden',
- field=models.BooleanField(default=False),
- ),
- migrations.AddField(
- model_name='configbundle',
- name='public',
- field=models.BooleanField(default=False),
- ),
- migrations.AddField(
- model_name='genericresourcebundle',
- name='hidden',
- field=models.BooleanField(default=False),
- ),
- migrations.AddField(
- model_name='genericresourcebundle',
- name='public',
- field=models.BooleanField(default=False),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0012_auto_20200103_1850.py b/src/resource_inventory/migrations/0012_auto_20200103_1850.py
deleted file mode 100644
index 65d8f85..0000000
--- a/src/resource_inventory/migrations/0012_auto_20200103_1850.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# Generated by Django 2.2 on 2020-01-03 18:50
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-def pairVlanPhysicalNetworks(apps, editor):
- PhysicalNetwork = apps.get_model("resource_inventory", "PhysicalNetwork")
- Vlan = apps.get_model("resource_inventory", "Vlan")
- for vlan in Vlan.objects.filter(network__isnull=False):
- if PhysicalNetwork.objects.filter(id=vlan.network.id).exists():
- continue
- PhysicalNetwork.objects.create(id=vlan.network.id, vlan_id=vlan.vlan_id, generic_network=vlan.network)
-
-
-def deletePhysicalNetworks(apps, editor):
- Vlan = apps.get_model("resource_inventory", "Vlan")
- for vlan in Vlan.objects.all():
- vlan.network = None
- PhysicalNetwork = apps.get_model("resource_inventory", "PhysicalNetwork")
- PhysicalNetwork.objects.all().delete()
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0011_auto_20191106_2024'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='PhysicalNetwork',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('vlan_id', models.IntegerField()),
- ('generic_network', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.Network')),
- ],
- options={
- 'abstract': False,
- },
- ),
- migrations.AlterField(
- model_name='host',
- name='id',
- field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
- ),
- migrations.AlterField(
- model_name='resourcebundle',
- name='id',
- field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
- ),
- migrations.RunPython(pairVlanPhysicalNetworks, deletePhysicalNetworks),
- migrations.AlterField(
- model_name='vlan',
- name='network',
- field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING,
- to='resource_inventory.PhysicalNetwork', null=True),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0012_manual_20200218_1536.py b/src/resource_inventory/migrations/0012_manual_20200218_1536.py
deleted file mode 100644
index 378bdc3..0000000
--- a/src/resource_inventory/migrations/0012_manual_20200218_1536.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# Generated by Django 2.2 on 2020-02-18 15:36
-
-from django.conf import settings
-from django.db import migrations
-
-
-def clear_networks(apps, schema_editor):
- Network = apps.get_model('resource_inventory', 'Network')
- Vlan = apps.get_model('resource_inventory', 'Vlan')
- for vlan in Vlan.objects.all():
- vlan.delete()
- for net in Network.objects.all():
- net.delete()
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ('resource_inventory', '0012_auto_20200103_1850'),
- ]
-
- operations = [
- migrations.RunPython(clear_networks)
- ]
diff --git a/src/resource_inventory/migrations/0013_auto_20200218_1536.py b/src/resource_inventory/migrations/0013_auto_20200218_1536.py
deleted file mode 100644
index 053453b..0000000
--- a/src/resource_inventory/migrations/0013_auto_20200218_1536.py
+++ /dev/null
@@ -1,407 +0,0 @@
-# Generated by Django 2.2 on 2020-02-18 15:36
-
-from django.conf import settings
-from django.db import migrations, models
-import django.db.models.deletion
-import resource_inventory.models
-
-
-def clear_resource_bundles(apps, schema_editor):
- ResourceBundle = apps.get_model('resource_inventory', 'ResourceBundle')
- for rb in ResourceBundle.objects.all():
- rb.template = None
- rb.save()
-
-
-def create_default_template(apps, schema_editor):
- ResourceTemplate = apps.get_model('resource_inventory', 'ResourceTemplate')
- ResourceTemplate.objects.create(name="Default Template", hidden=True)
-
-
-def populate_servers(apps, schema_editor):
- """Convert old Host models to Server Resources."""
- Host = apps.get_model('resource_inventory', 'Host')
- Server = apps.get_model('resource_inventory', 'Server')
- ResourceProfile = apps.get_model('resource_inventory', 'ResourceProfile')
- for h in Host.objects.all():
- rp = ResourceProfile.objects.get(id=h.profile.id)
- server = Server.objects.create(
- working=h.working,
- vendor=h.vendor,
- labid=h.labid,
- booked=h.booked,
- name=h.labid,
- lab=h.lab,
- profile=rp
- )
-
- for iface in h.interfaces.all():
- server.interfaces.add(iface)
-
-
-def populate_resource_templates(apps, schema_editor):
- """
- Convert old GenericResourceBundles to ResourceTemplate.
-
- This will be kept blank for now. If, during testing, we realize
- we want to implement this, we will. For now, it seems
- fine to let the old models just die and create
- new ones as needed.
- """
- pass
-
-
-def populate_resource_profiles(apps, schema_editor):
- """
- Convert old HostProfile models to ResourceProfiles.
-
- Also updates all the foreign keys pointed to the old
- host profile. This change was basically only a name change.
- """
- HostProfile = apps.get_model('resource_inventory', 'HostProfile')
- ResourceProfile = apps.get_model('resource_inventory', 'ResourceProfile')
- for hp in HostProfile.objects.all():
- rp = ResourceProfile.objects.create(id=hp.id, name=hp.name, description=hp.description)
- rp.labs.add(*list(hp.labs.all()))
- """
- TODO: link these models together
- rp.interfaceprofile = hp.interfaceprofile
- rp.storageprofile = hp.storageprofile
- rp.cpuprofile = hp.cpuprofile
- rp.ramprofile = hp.ramprofile
- rp.save()
- hp.interfaceprofile.host = rp
- rp.storageprofile.host = rp
- rp.cpuprofile.host = rp
- rp.ramprofile.host = rp
- rp.interfaceprofile.save()
- rp.storageprofile.save()
- rp.cpuprofile.save()
- rp.ramprofile.save()
- """
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ('booking', '0007_remove_booking_config_bundle'),
- ('account', '0004_downtime'),
- ('api', '0013_manual_20200218_1536'),
- ('resource_inventory', '0012_manual_20200218_1536'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='InterfaceConfiguration',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('connections', models.ManyToManyField(to='resource_inventory.NetworkConnection')),
- ],
- ),
- migrations.CreateModel(
- name='ResourceConfiguration',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('is_head_node', models.BooleanField(default=False)),
- ],
- ),
- migrations.CreateModel(
- name='ResourceOPNFVConfig',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ],
- ),
- migrations.CreateModel(
- name='ResourceProfile',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('name', models.CharField(max_length=200, unique=True)),
- ('description', models.TextField()),
- ('labs', models.ManyToManyField(related_name='resourceprofiles', to='account.Lab')),
- ],
- ),
- migrations.RunPython(populate_resource_profiles),
- migrations.CreateModel(
- name='ResourceTemplate',
- fields=[
- ('id', models.AutoField(primary_key=True, serialize=False)),
- ('name', models.CharField(max_length=300, unique=True)),
- ('xml', models.TextField()),
- ('description', models.CharField(default='', max_length=1000)),
- ('public', models.BooleanField(default=False)),
- ('hidden', models.BooleanField(default=False)),
- ('lab', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='resourcetemplates', to='account.Lab')),
- ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
- ],
- ),
- migrations.RunPython(populate_resource_templates),
- migrations.CreateModel(
- name='Server',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('working', models.BooleanField(default=True)),
- ('vendor', models.CharField(default='unknown', max_length=100)),
- ('model', models.CharField(default='unknown', max_length=150)),
- ('labid', models.CharField(default='default_id', max_length=200, unique=True)),
- ('booked', models.BooleanField(default=False)),
- ('name', models.CharField(max_length=200, unique=True)),
- ],
- options={
- 'abstract': False,
- },
- ),
- migrations.AddField(
- model_name='server',
- name='bundle',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.ResourceBundle'),
- ),
- migrations.AddField(
- model_name='server',
- name='config',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.ResourceConfiguration'),
- ),
- migrations.AddField(
- model_name='server',
- name='interfaces',
- field=models.ManyToManyField(to='resource_inventory.Interface'),
- ),
- migrations.AddField(
- model_name='server',
- name='lab',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.Lab'),
- ),
- migrations.AddField(
- model_name='server',
- name='profile',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.ResourceProfile'),
- ),
- migrations.AddField(
- model_name='server',
- name='remote_management',
- field=models.ForeignKey(default=resource_inventory.models.get_default_remote_info, on_delete=models.SET(resource_inventory.models.get_default_remote_info), to='resource_inventory.RemoteInfo'),
- ),
- migrations.RunPython(populate_servers),
- migrations.RemoveField(
- model_name='generichost',
- name='profile',
- ),
- migrations.RemoveField(
- model_name='generichost',
- name='resource',
- ),
- migrations.RemoveField(
- model_name='genericinterface',
- name='connections',
- ),
- migrations.RemoveField(
- model_name='genericinterface',
- name='host',
- ),
- migrations.RemoveField(
- model_name='genericinterface',
- name='profile',
- ),
- migrations.RemoveField(
- model_name='genericresource',
- name='bundle',
- ),
- migrations.RemoveField(
- model_name='genericresourcebundle',
- name='lab',
- ),
- migrations.RemoveField(
- model_name='genericresourcebundle',
- name='owner',
- ),
- migrations.RemoveField(
- model_name='host',
- name='bundle',
- ),
- migrations.RemoveField(
- model_name='host',
- name='config',
- ),
- migrations.RemoveField(
- model_name='host',
- name='lab',
- ),
- migrations.RemoveField(
- model_name='host',
- name='profile',
- ),
- migrations.RemoveField(
- model_name='host',
- name='remote_management',
- ),
- migrations.RemoveField(
- model_name='host',
- name='template',
- ),
- migrations.RemoveField(
- model_name='hostconfiguration',
- name='bundle',
- ),
- migrations.RemoveField(
- model_name='hostconfiguration',
- name='host',
- ),
- migrations.RemoveField(
- model_name='hostconfiguration',
- name='image',
- ),
- migrations.RemoveField(
- model_name='hostopnfvconfig',
- name='host_config',
- ),
- migrations.RemoveField(
- model_name='hostopnfvconfig',
- name='opnfv_config',
- ),
- migrations.RemoveField(
- model_name='hostopnfvconfig',
- name='role',
- ),
- migrations.RemoveField(
- model_name='hostprofile',
- name='labs',
- ),
- migrations.RemoveField(
- model_name='interface',
- name='host',
- ),
- migrations.RemoveField(
- model_name='interface',
- name='name',
- ),
- migrations.RemoveField(
- model_name='opnfvconfig',
- name='bundle',
- ),
- migrations.AddField(
- model_name='interface',
- name='profile',
- field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.InterfaceProfile'),
- preserve_default=False,
- ),
- migrations.AddField(
- model_name='interfaceprofile',
- name='order',
- field=models.IntegerField(default=-1),
- ),
- migrations.AlterField(
- model_name='cpuprofile',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cpuprofile', to='resource_inventory.ResourceProfile'),
- ),
- migrations.AlterField(
- model_name='diskprofile',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='storageprofile', to='resource_inventory.ResourceProfile'),
- ),
- migrations.AlterField(
- model_name='image',
- name='host_type',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.ResourceProfile'),
- ),
- migrations.AlterField(
- model_name='interfaceprofile',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='interfaceprofile', to='resource_inventory.ResourceProfile'),
- ),
- migrations.AlterField(
- model_name='network',
- name='bundle',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='networks', to='resource_inventory.ResourceTemplate'),
- ),
- migrations.AlterField(
- model_name='ramprofile',
- name='host',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ramprofile', to='resource_inventory.ResourceProfile'),
- ),
- migrations.RunPython(clear_resource_bundles),
- migrations.AlterField(
- model_name='resourcebundle',
- name='template',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.ResourceTemplate'),
- ),
- migrations.DeleteModel(
- name='ConfigBundle',
- ),
- migrations.DeleteModel(
- name='GenericHost',
- ),
- migrations.DeleteModel(
- name='GenericInterface',
- ),
- migrations.DeleteModel(
- name='GenericResource',
- ),
- migrations.DeleteModel(
- name='GenericResourceBundle',
- ),
- migrations.DeleteModel(
- name='HostConfiguration',
- ),
- migrations.DeleteModel(
- name='HostOPNFVConfig',
- ),
- migrations.DeleteModel(
- name='HostProfile',
- ),
- migrations.DeleteModel(
- name='Host',
- ),
- migrations.AddField(
- model_name='resourceopnfvconfig',
- name='opnfv_config',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resource_opnfv_config', to='resource_inventory.OPNFVConfig'),
- ),
- migrations.AddField(
- model_name='resourceopnfvconfig',
- name='resource_config',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resource_opnfv_config', to='resource_inventory.ResourceConfiguration'),
- ),
- migrations.AddField(
- model_name='resourceopnfvconfig',
- name='role',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resource_opnfv_configs', to='resource_inventory.OPNFVRole'),
- ),
- migrations.AddField(
- model_name='resourceconfiguration',
- name='image',
- field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='resource_inventory.Image'),
- ),
- migrations.AddField(
- model_name='resourceconfiguration',
- name='profile',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.ResourceProfile'),
- ),
- migrations.AddField(
- model_name='resourceconfiguration',
- name='template',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='resourceConfigurations', to='resource_inventory.ResourceTemplate'),
- ),
- migrations.AddField(
- model_name='interfaceconfiguration',
- name='profile',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.InterfaceProfile'),
- ),
- migrations.AddField(
- model_name='interfaceconfiguration',
- name='resource_config',
- field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='interface_configs', to='resource_inventory.ResourceConfiguration'),
- ),
- migrations.AddField(
- model_name='interface',
- name='acts_as',
- field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.InterfaceConfiguration'),
- ),
- migrations.RunPython(create_default_template),
- migrations.AddField(
- model_name='opnfvconfig',
- name='template',
- field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='opnfv_config', to='resource_inventory.ResourceTemplate'),
- preserve_default=False,
- ),
- ]
diff --git a/src/resource_inventory/migrations/0014_auto_20200305_1415.py b/src/resource_inventory/migrations/0014_auto_20200305_1415.py
deleted file mode 100644
index 6fcf4a6..0000000
--- a/src/resource_inventory/migrations/0014_auto_20200305_1415.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.2 on 2020-03-05 14:15
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0013_auto_20200218_1536'),
- ]
-
- operations = [
- migrations.RenameField(
- model_name='resourcetemplate',
- old_name='hidden',
- new_name='temporary',
- ),
- ]
diff --git a/src/resource_inventory/migrations/0015_resourcetemplate_copy_of.py b/src/resource_inventory/migrations/0015_resourcetemplate_copy_of.py
deleted file mode 100644
index 322dc00..0000000
--- a/src/resource_inventory/migrations/0015_resourcetemplate_copy_of.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Generated by Django 2.2 on 2020-04-13 13:56
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0014_auto_20200305_1415'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='resourcetemplate',
- name='copy_of',
- field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.ResourceTemplate'),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0016_auto_20201109_1947.py b/src/resource_inventory/migrations/0016_auto_20201109_1947.py
deleted file mode 100644
index d145f06..0000000
--- a/src/resource_inventory/migrations/0016_auto_20201109_1947.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# Generated by Django 2.2 on 2020-11-09 19:47
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0015_resourcetemplate_copy_of'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='physicalnetwork',
- name='bundle',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.ResourceBundle'),
- ),
- migrations.AddField(
- model_name='resourceconfiguration',
- name='name',
- field=models.CharField(default='<Hostname>', max_length=3000),
- ),
- migrations.AlterField(
- model_name='cpuprofile',
- name='cflags',
- field=models.TextField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name='interface',
- name='acts_as',
- field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.InterfaceConfiguration'),
- ),
- migrations.AlterField(
- model_name='interfaceconfiguration',
- name='connections',
- field=models.ManyToManyField(blank=True, to='resource_inventory.NetworkConnection'),
- ),
- migrations.AlterField(
- model_name='resourcetemplate',
- name='copy_of',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.ResourceTemplate'),
- ),
- migrations.AlterField(
- model_name='resourcetemplate',
- name='name',
- field=models.CharField(max_length=300),
- ),
- migrations.AlterField(
- model_name='server',
- name='bundle',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.ResourceBundle'),
- ),
- migrations.AlterField(
- model_name='server',
- name='config',
- field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.ResourceConfiguration'),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0017_auto_20201218_1516.py b/src/resource_inventory/migrations/0017_auto_20201218_1516.py
deleted file mode 100644
index d4884de..0000000
--- a/src/resource_inventory/migrations/0017_auto_20201218_1516.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.2 on 2020-12-18 15:16
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0016_auto_20201109_1947'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='resourceconfiguration',
- name='name',
- field=models.CharField(default='opnfv_host', max_length=3000),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0018_auto_20210630_1629.py b/src/resource_inventory/migrations/0018_auto_20210630_1629.py
deleted file mode 100644
index 19e53e4..0000000
--- a/src/resource_inventory/migrations/0018_auto_20210630_1629.py
+++ /dev/null
@@ -1,101 +0,0 @@
-# Generated by Django 2.2 on 2021-06-30 16:29
-
-from django.db import migrations, models
-import django.db.models.deletion
-from account.models import Lab
-
-
-def set_availability(apps, schema_editor):
- models = [apps.get_model('resource_inventory', 'Image'), apps.get_model('resource_inventory', 'Opsys')]
-
- for model in models:
- for obj in model.objects.all():
- obj.available = False
- obj.obsolete = True
- obj.save()
-
-
-def set_rconfig_arch(apps, schema_editor):
- rprofs = apps.get_model('resource_inventory', 'ResourceProfile')
-
- for rprof in rprofs.objects.all():
- rprof.architecture = rprof.cpuprofile.first().architecture
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('account', '0009_auto_20210324_2107'),
- ('resource_inventory', '0017_auto_20201218_1516'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='image',
- name='host_type',
- ),
- migrations.AlterField(
- model_name='image',
- name='lab_id',
- field=models.CharField(default='none (retired)', max_length=100),
- preserve_default=True,
- ),
- migrations.RemoveField(
- model_name='opsys',
- name='sup_installers',
- ),
-
- migrations.AddField(
- model_name='image',
- name='architecture',
- field=models.CharField(choices=[('x86_64', 'x86_64'), ('aarch64', 'aarch64'), ('unknown', 'unknown')], default='unknown', max_length=50),
- preserve_default=False,
- ),
-
- migrations.AddField(
- model_name='image',
- name='available',
- field=models.BooleanField(default=True),
- ),
- migrations.AddField(
- model_name='image',
- name='obsolete',
- field=models.BooleanField(default=False),
- ),
-
- migrations.AddField(
- model_name='opsys',
- name='available',
- field=models.BooleanField(default=False),
- ),
- migrations.AddField(
- model_name='opsys',
- name='obsolete',
- field=models.BooleanField(default=True),
- ),
-
- migrations.RunPython(set_availability),
-
- migrations.AddField(
- model_name='opsys',
- name='lab_id',
- field=models.CharField(default="none (retired)", max_length=100),
- preserve_default=False,
- ),
-
- migrations.AddField(
- model_name='opsys',
- name='from_lab',
- field=models.ForeignKey(default=Lab.objects.first, on_delete=django.db.models.deletion.CASCADE, to='account.Lab'),
- preserve_default=False,
- ),
-
- migrations.AddField(
- model_name='resourceprofile',
- name='architecture',
- field=models.CharField(choices=[('x86_64', 'x86_64'), ('aarch64', 'aarch64'), ('unknown', 'unknown')], default='unknown', max_length=50),
- preserve_default=False,
- ),
-
- migrations.RunPython(set_rconfig_arch),
- ]
diff --git a/src/resource_inventory/migrations/0019_auto_20210701_1947.py b/src/resource_inventory/migrations/0019_auto_20210701_1947.py
deleted file mode 100644
index e64d174..0000000
--- a/src/resource_inventory/migrations/0019_auto_20210701_1947.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Generated by Django 2.2 on 2021-07-01 19:47
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0018_auto_20210630_1629'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='image',
- name='lab_id',
- field=models.CharField(max_length=100),
- ),
- migrations.AlterField(
- model_name='image',
- name='name',
- field=models.CharField(max_length=100),
- ),
- migrations.AlterField(
- model_name='network',
- name='name',
- field=models.CharField(max_length=200),
- ),
- migrations.AlterField(
- model_name='opsys',
- name='available',
- field=models.BooleanField(default=True),
- ),
- migrations.AlterField(
- model_name='opsys',
- name='obsolete',
- field=models.BooleanField(default=False),
- ),
- migrations.AlterField(
- model_name='resourceprofile',
- name='architecture',
- field=models.CharField(choices=[('x86_64', 'x86_64'), ('aarch64', 'aarch64')], max_length=50),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0020_cloudinitfile.py b/src/resource_inventory/migrations/0020_cloudinitfile.py
deleted file mode 100644
index 198181c..0000000
--- a/src/resource_inventory/migrations/0020_cloudinitfile.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# Generated by Django 2.2 on 2021-09-07 14:48
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0019_auto_20210701_1947'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='CloudInitFile',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('text', models.TextField()),
- ('priority', models.IntegerField()),
- ],
- ),
- ]
diff --git a/src/resource_inventory/migrations/0021_resourceconfiguration_cloud_init_files.py b/src/resource_inventory/migrations/0021_resourceconfiguration_cloud_init_files.py
deleted file mode 100644
index 6b0befc..0000000
--- a/src/resource_inventory/migrations/0021_resourceconfiguration_cloud_init_files.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.2 on 2021-09-10 18:10
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0020_cloudinitfile'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='resourceconfiguration',
- name='cloud_init_files',
- field=models.ManyToManyField(blank=True, to='resource_inventory.CloudInitFile'),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0022_auto_20210925_2028.py b/src/resource_inventory/migrations/0022_auto_20210925_2028.py
deleted file mode 100644
index 2b0b902..0000000
--- a/src/resource_inventory/migrations/0022_auto_20210925_2028.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# Generated by Django 2.2 on 2021-09-25 20:28
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0021_resourceconfiguration_cloud_init_files'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='resourcetemplate',
- name='private_vlan_pool',
- field=models.TextField(default=''),
- ),
- migrations.AddField(
- model_name='resourcetemplate',
- name='public_vlan_pool',
- field=models.TextField(default=''),
- ),
- ]
diff --git a/src/resource_inventory/migrations/0023_cloudinitfile_generated.py b/src/resource_inventory/migrations/0023_cloudinitfile_generated.py
deleted file mode 100644
index b309753..0000000
--- a/src/resource_inventory/migrations/0023_cloudinitfile_generated.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by Django 2.2 on 2021-12-17 18:54
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('resource_inventory', '0022_auto_20210925_2028'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='cloudinitfile',
- name='generated',
- field=models.BooleanField(default=False),
- ),
- ]
diff --git a/src/resource_inventory/migrations/__init__.py b/src/resource_inventory/migrations/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/src/resource_inventory/migrations/__init__.py
+++ /dev/null