Commit 29b8eaee authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

TLReplaceDisks: Use implicit loop for dictionary

Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 1bee66f3
......@@ -8203,13 +8203,10 @@ class TLReplaceDisks(Tasklet):
# Get secondary node IP addresses
node_2nd_ip = {}
for node_name in [self.target_node, self.other_node, self.new_node]:
if node_name is not None:
node_2nd_ip[node_name] = self.cfg.GetNodeInfo(node_name).secondary_ip
self.node_secondary_ip = node_2nd_ip
self.node_secondary_ip = \
dict((node_name, self.cfg.GetNodeInfo(node_name).secondary_ip)
for node_name in touched_nodes
if node_name is not None)
def Exec(self, feedback_fn):
"""Execute disk replacement.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment