Fix backend import errors from GetHypervisorClass
The merge of commit 360b0dc2 into branch-2.1 broke import of backend, since it uses hypervisor.GetHypervisor() which returns an instance of the hypervisor. Some of the hypervisors create directories at init time, thus the import of backend failed due this chain if it's not done on a (proper) ganeti node, such as during unittest time. This patch adds in hypervisor a GetHypervisorClass() function, which returns the class not the instance of the hypervisor, and uses that in _BuildUploadFiles(). The existing GetHypervisor is then changed to use this function. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
Loading
Please register or sign in to comment