Each hypervisor can declare additional files to be shipped to all nodes.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
constants.RAPI_CERT_FILE,
constants.RAPI_USERS_FILE,
])
constants.RAPI_CERT_FILE,
constants.RAPI_USERS_FILE,
])
+
+ enabled_hypervisors = lu.cfg.GetClusterInfo().enabled_hypervisors
+ for hv_name in enabled_hypervisors:
+ hv_class = hypervisor.GetHypervisor(hv_name)
+ dist_files.update(hv_class.GetAncillaryFiles())
+
# 3. Perform the files upload
for fname in dist_files:
if os.path.exists(fname):
# 3. Perform the files upload
for fname in dist_files:
if os.path.exists(fname):
"""
raise NotImplementedError
"""
raise NotImplementedError
+ @classmethod
+ def GetAncillaryFiles(cls):
+ """Return a list of ancillary files to be copied to all nodes as ancillary
+ configuration files.
+
+ @rtype: list of strings
+ @return: list of absolute paths of files to ship cluster-wide
+
+ """
+ # By default we return a member variable, so that if an hypervisor has just
+ # a static list of files it doesn't have to override this function.
+ return cls.ANCILLARY_FILES
+
def Verify(self):
"""Verify the hypervisor.
def Verify(self):
"""Verify the hypervisor.