Add updating resources hostnames
@@ -25,6 +25,12 @@ def get_infrastructure():
hostname=hostname
)
new_resource.save()
+ else:
+ for resource in resources:
+ if resource.id == gpu_uuid and resource.hostname != hostname:
+ resource.hostname = hostname
+ resource.save()
+ break
except Exception:
# In case of failure just return infrastructure
pass
