diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2020-04-14 18:15:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2020-04-14 18:15:55 +0000 |
commit | 6bf37e9864787e0398a1d2e1cdd10b40a8ebc6e6 (patch) | |
tree | 18396967cc32110ae5455827e612e2846e55392c /src/resource_inventory/migrations | |
parent | d5b4f4c77534824430fd8e2d3f15e5f7ed6303f5 (diff) | |
parent | 557659acfd97ddaacdb89192ff6a575691b39093 (diff) |
Merge "Add user + user list to API"
Diffstat (limited to 'src/resource_inventory/migrations')
-rw-r--r-- | src/resource_inventory/migrations/0013_auto_20200218_1536.py | 5 | ||||
-rw-r--r-- | src/resource_inventory/migrations/0014_auto_20200305_1415.py | 18 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src/resource_inventory/migrations/0013_auto_20200218_1536.py b/src/resource_inventory/migrations/0013_auto_20200218_1536.py index 014cb2f..d9dcbd6 100644 --- a/src/resource_inventory/migrations/0013_auto_20200218_1536.py +++ b/src/resource_inventory/migrations/0013_auto_20200218_1536.py @@ -25,7 +25,7 @@ def populate_servers(apps, schema_editor): ResourceProfile = apps.get_model('resource_inventory', 'ResourceProfile') for h in Host.objects.all(): rp = ResourceProfile.objects.get(id=h.profile.id) - Server.objects.create( + server = Server.objects.create( working=h.working, vendor=h.vendor, labid=h.labid, @@ -35,6 +35,9 @@ def populate_servers(apps, schema_editor): profile=rp ) + for iface in h.interfaces.all(): + server.interfaces.add(iface) + def populate_resource_templates(apps, schema_editor): """ diff --git a/src/resource_inventory/migrations/0014_auto_20200305_1415.py b/src/resource_inventory/migrations/0014_auto_20200305_1415.py new file mode 100644 index 0000000..6fcf4a6 --- /dev/null +++ b/src/resource_inventory/migrations/0014_auto_20200305_1415.py @@ -0,0 +1,18 @@ +# 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', + ), + ] |