Merge "Remove unecessary function"

This commit is contained in:
Zuul 2022-11-30 21:33:05 +00:00 committed by Gerrit Code Review
commit 2c3d825885

View File

@ -310,7 +310,7 @@ class NodePoolCmd(NodepoolApp):
self.list(node_id=node.id)
def _change_node_state(self, new_state):
def hold(self):
node = self.zk.getNode(self.args.id)
if not node:
print("Node id %s not found" % self.args.id)
@ -318,15 +318,12 @@ class NodePoolCmd(NodepoolApp):
self.zk.lockNode(node, blocking=True, timeout=5)
node.state = new_state
node.state = zk.HOLD
self.zk.storeNode(node)
self.zk.unlockNode(node)
self.list(node_id=node.id)
def hold(self):
self._change_node_state(zk.HOLD)
def dib_image_delete(self):
(image, build_num) = self.args.id.rsplit('-', 1)
build = self.zk.getBuild(image, build_num)