aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/models.py
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2020-07-31 16:44:19 +0000
committerGerrit Code Review <gerrit@opnfv.org>2020-07-31 16:44:19 +0000
commit0b714de9fbec893927d843317c1e2deadf4416b8 (patch)
tree9d6b48250bc621118123b313a98749e03b272194 /src/api/models.py
parent924e659f949b9174572223b83cf3fbb15f248b52 (diff)
parent219d6376a369bf62c78b7b092b605f96997a3599 (diff)
Merge "Fix Pod detail menu and re-imaging"
Diffstat (limited to 'src/api/models.py')
-rw-r--r--src/api/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/models.py b/src/api/models.py
index 89ee6c6..9b9b778 100644
--- a/src/api/models.py
+++ b/src/api/models.py
@@ -868,13 +868,13 @@ class JobFactory(object):
"""Modify an existing job to reimage the given host."""
job = Job.objects.get(booking=booking)
# make hardware task new
- hardware_relation = HostHardwareRelation.objects.get(host=host, job=job)
- hardware_relation.config.set_image(new_image.lab_id)
+ hardware_relation = HostHardwareRelation.objects.get(resource_id=host, job=job)
+ hardware_relation.config.image = new_image.lab_id
hardware_relation.config.save()
hardware_relation.status = JobStatus.NEW
# re-apply networking after host is reset
- net_relation = HostNetworkRelation.objects.get(host=host, job=job)
+ net_relation = HostNetworkRelation.objects.get(resource_id=host, job=job)
net_relation.status = JobStatus.NEW
# re-apply ssh access after host is reset