aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2020-07-30 15:09:52 -0400
committerSawyer Bergeron <sbergeron@iol.unh.edu>2020-07-30 15:09:52 -0400
commitba7a794185bf35930ed8bd554b9ccff0f5c35bda (patch)
tree72fa9328d09c06e1f7b35f98316c8285d223bc36 /src
parent38a3d94323f0f169ad8ab5a533c6365592f4363d (diff)
Hotfix: disable deltas for prod
Deltas are currently severely broken, and need to be turned into more granular tasks instead. This patch results in coarser tasks, but results in correct behavior at least Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Change-Id: Idd71b314355a1372e68e1f1161355bd4b8834c08
Diffstat (limited to 'src')
-rw-r--r--src/api/models.py21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/api/models.py b/src/api/models.py
index 9f666b7..89ee6c6 100644
--- a/src/api/models.py
+++ b/src/api/models.py
@@ -525,10 +525,7 @@ class OpnfvApiConfig(models.Model):
self.delta = '{}'
def get_delta(self):
- if not self.delta:
- self.delta = self.to_json()
- self.save()
- return json.loads(self.delta)
+ return json.loads(self.to_json())
class AccessConfig(TaskConfig):
@@ -550,10 +547,7 @@ class AccessConfig(TaskConfig):
return d
def get_delta(self):
- if not self.delta:
- self.delta = self.to_json()
- self.save()
- d = json.loads(self.delta)
+ d = json.loads(self.to_json())
d["lab_token"] = self.accessrelation.lab_token
return d
@@ -661,10 +655,7 @@ class NetworkConfig(TaskConfig):
return json.dumps(self.to_dict())
def get_delta(self):
- if not self.delta:
- self.delta = self.to_json()
- self.save()
- d = json.loads(self.delta)
+ d = json.loads(self.to_json())
d['lab_token'] = self.hostnetworkrelation.lab_token
return d
@@ -704,11 +695,7 @@ class SnapshotConfig(TaskConfig):
return json.dumps(self.to_dict())
def get_delta(self):
- if not self.delta:
- self.delta = self.to_json()
- self.save()
-
- d = json.loads(self.delta)
+ d = json.loads(self.to_json())
return d
def clear_delta(self):