From 40f05d47bbfc44f1870178fdfca66953cd77f0d2 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Fri, 7 Jun 2013 22:46:46 +0100 Subject: [PATCH] API: fix node modify Enable/Disable was not set properly. Note: worker still ignores this setting Change-Id: I4c1dda8f5178ce3166435b05c87f9b7a191fad3c --- libra/api/controllers/nodes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libra/api/controllers/nodes.py b/libra/api/controllers/nodes.py index 75cfe413..2a940af5 100644 --- a/libra/api/controllers/nodes.py +++ b/libra/api/controllers/nodes.py @@ -212,7 +212,10 @@ class NodesController(RestController): raise ClientSideError('Node ID is not valid') if body.condition != Unset: - node.condition = body.condition + if body.condition == 'DISABLED': + node.enabled = 0 + else: + node.enabled = 1 lb.status = 'PENDING_UPDATE' device = session.query(