Revision b5f5fae9 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
749 | 749 |
return [] |
750 | 750 |
|
751 | 751 |
|
752 |
class LUPostInitCluster(LogicalUnit): |
|
753 |
"""Logical unit for running hooks after cluster initialization. |
|
754 |
|
|
755 |
""" |
|
756 |
HPATH = "cluster-init" |
|
757 |
HTYPE = constants.HTYPE_CLUSTER |
|
758 |
_OP_REQP = [] |
|
759 |
|
|
760 |
def BuildHooksEnv(self): |
|
761 |
"""Build hooks env. |
|
762 |
|
|
763 |
""" |
|
764 |
env = {"OP_TARGET": self.cfg.GetClusterName()} |
|
765 |
mn = self.cfg.GetMasterNode() |
|
766 |
return env, [], [mn] |
|
767 |
|
|
768 |
def CheckPrereq(self): |
|
769 |
"""No prerequisites to check. |
|
770 |
|
|
771 |
""" |
|
772 |
return True |
|
773 |
|
|
774 |
def Exec(self, feedback_fn): |
|
775 |
"""Nothing to do. |
|
776 |
|
|
777 |
""" |
|
778 |
return True |
|
779 |
|
|
780 |
|
|
752 | 781 |
class LUDestroyCluster(NoHooksLU): |
753 | 782 |
"""Logical unit for destroying the cluster. |
754 | 783 |
|
Also available in: Unified diff