aboutsummaryrefslogtreecommitdiffstats
path: root/src/resource_inventory/models.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2020-02-06 21:26:23 +0000
committerGerrit Code Review <gerrit@opnfv.org>2020-02-06 21:26:23 +0000
commitac50210dd7e1a250307f5d20a43624621c50b0a0 (patch)
tree8899511a240debe825e64054f3d8450a6af99849 /src/resource_inventory/models.py
parentcb8561e3758e40c2ec514b6ce5d296c849e894e6 (diff)
parent4bfa2fa78c487bd8a0453de847ffcb27af526425 (diff)
Merge "Fix booking errors"
Diffstat (limited to 'src/resource_inventory/models.py')
-rw-r--r--src/resource_inventory/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resource_inventory/models.py b/src/resource_inventory/models.py
index 6386bf3..f462ac5 100644
--- a/src/resource_inventory/models.py
+++ b/src/resource_inventory/models.py
@@ -416,6 +416,10 @@ class Host(Resource):
"ipmi_create": str(ipmi)
}
+ def release(self):
+ self.booked = False
+ self.save()
+
class Interface(models.Model):
id = models.AutoField(primary_key=True)