Commit 464243a7 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

cmdlib: Add __init__ to Tasklet class


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 3e06e001
......@@ -367,6 +367,13 @@ class Tasklet:
- Implement Exec
"""
def __init__(self, lu):
self.lu = lu
# Shortcuts
self.cfg = lu.cfg
self.rpc = lu.rpc
def CheckPrereq(self):
"""Check prerequisites for this tasklets.
......@@ -3936,16 +3943,13 @@ class TLMigrateInstance(Tasklet):
"""Initializes this class.
"""
Tasklet.__init__(self, lu)
# Parameters
self.lu = lu
self.instance_name = instance_name
self.live = live
self.cleanup = cleanup
# Shortcuts
self.cfg = lu.cfg
self.rpc = lu.rpc
def CheckPrereq(self):
"""Check prerequisites.
......@@ -5378,18 +5382,15 @@ class TLReplaceDisks(Tasklet):
"""Initializes this class.
"""
Tasklet.__init__(self, lu)
# Parameters
self.lu = lu
self.instance_name = instance_name
self.mode = mode
self.iallocator_name = iallocator_name
self.remote_node = remote_node
self.disks = disks
# Shortcuts
self.cfg = lu.cfg
self.rpc = lu.rpc
# Runtime data
self.instance = None
self.new_node = None
......
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