Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Assign NameStore Str Assign NameStore Str ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assert CompareIs Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assert CompareIs Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body For NameStore ListLoad Str Str body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body For NameStore ListLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad TupleLoad Str Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str TupleLoad Str Str Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str Str For NameStore ListLoad Str Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Dict For NameStore ListLoad Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Str Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpMod Str NameLoad NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword Str Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword Str NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMod Str AttributeLoad NameLoad attr Assign NameStore BinOpMod Str AttributeLoad NameLoad attr For NameStore ListLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword Str NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A Script for testing ganeti.vcluster N/A os N/A unittest ganeti utils ganeti compat ganeti vcluster ganeti pathutils N/A testutils N/A _ENV_DOES_NOT_EXIST GANETI_TEST_DOES_NOT_EXIST N/A _ENV_TEST GANETI_TESTVAR _EnvVarTest N/A N/A testutils GanetiTestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A testutils GanetiTestCase setUp self N/A N/A N/A N/A os environ pop _ENV_DOES_NOT_EXIST None N/A N/A N/A N/A os environ pop _ENV_TEST None N/A N/A TestGetRootDirectory N/A _EnvVarTest N/A test N/A N/A self N/A N/A N/A N/A N/A N/A os getenv _ENV_TEST None N/A N/A N/A self assertEqual N/A N/A vcluster _GetRootDirectory _ENV_DOES_NOT_EXIST N/A N/A N/A self assertEqual N/A N/A vcluster _GetRootDirectory _ENV_TEST N/A N/A N/A os environ N/A _ENV_TEST /tmp/xy11 N/A N/A N/A self assertEqual N/A N/A vcluster _GetRootDirectory _ENV_TEST /tmp/xy11 N/A N/A N/A os environ N/A _ENV_TEST foobar N/A N/A N/A self assertRaises RuntimeError N/A vcluster _GetRootDirectory _ENV_TEST N/A N/A TestGetHostname N/A _EnvVarTest N/A test N/A N/A self N/A N/A N/A N/A N/A N/A os getenv _ENV_TEST None N/A N/A N/A self assertEqual N/A N/A vcluster _GetRootDirectory _ENV_DOES_NOT_EXIST N/A N/A N/A self assertEqual N/A N/A vcluster _GetRootDirectory _ENV_TEST N/A N/A N/A os environ N/A _ENV_TEST some.host.example.com N/A N/A N/A self assertEqual N/A N/A vcluster _GetHostname _ENV_TEST some.host.example.com N/A N/A TestCheckHostname N/A _EnvVarTest N/A test N/A N/A self N/A N/A N/A i N/A / /tmp N/A N/A N/A N/A self assertRaises RuntimeError N/A vcluster _CheckHostname i N/A N/A TestPreparePaths N/A _EnvVarTest N/A testInvalidParameters N/A N/A self N/A N/A N/A N/A N/A self assertRaises RuntimeError N/A vcluster _PreparePaths None host.example.com N/A N/A N/A self assertRaises RuntimeError N/A vcluster _PreparePaths /tmp/ N/A testNonNormalizedRootDir N/A N/A self N/A N/A N/A N/A N/A self assertRaises AssertionError N/A vcluster _PreparePaths /tmp////xyz// host.example.com N/A testInvalidHostname N/A N/A self N/A N/A N/A N/A N/A self assertRaises RuntimeError N/A vcluster _PreparePaths /tmp / N/A testPathHostnameMismatch N/A N/A self N/A N/A N/A N/A N/A self assertRaises RuntimeError N/A vcluster _PreparePaths /tmp/host.example.com server.example.com N/A testNoVirtCluster N/A N/A self N/A N/A N/A i N/A None N/A N/A N/A N/A self assertEqual N/A N/A vcluster _PreparePaths i i N/A None N/A testVirtCluster N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A N/A vcluster _PreparePaths /tmp/host.example.com host.example.com N/A /tmp /tmp/host.example.com host.example.com N/A N/A TestMakeNodeRoot N/A N/A unittest TestCase N/A test N/A N/A self N/A N/A N/A N/A N/A self assertRaises RuntimeError N/A vcluster MakeNodeRoot /tmp / N/A i N/A /tmp /tmp/ /tmp/// N/A N/A N/A N/A self assertEqual N/A N/A vcluster MakeNodeRoot i other.example.com /tmp/other.example.com N/A N/A TestEnvironmentForHost N/A N/A unittest TestCase N/A test N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A N/A vcluster EnvironmentForHost host.example.com _basedir None N/A N/A i N/A host.example.com other.example.com N/A N/A N/A N/A self assertEqual N/A N/A vcluster EnvironmentForHost i _basedir /tmp N/A N/A vcluster _ROOTDIR_ENVNAME N/A vcluster _HOSTNAME_ENVNAME N/A /tmp/%s i i N/A N/A TestExchangeNodeRoot N/A N/A unittest TestCase N/A test N/A N/A self N/A N/A N/A result N/A N/A vcluster ExchangeNodeRoot node1.example.com /tmp/file _basedir None _noderoot None N/A N/A N/A self assertEqual result /tmp/file N/A N/A N/A self assertRaises RuntimeError N/A vcluster ExchangeNodeRoot node1.example.com /tmp/node1.example.com _basedir /tmp _noderoot /tmp/nodeZZ.example.com N/A result N/A N/A vcluster ExchangeNodeRoot node2.example.com /tmp/node1.example.com/file _basedir /tmp _noderoot /tmp/node1.example.com N/A N/A N/A self assertEqual result /tmp/node2.example.com/file N/A N/A TestAddNodePrefix N/A N/A unittest TestCase N/A testRelativePath N/A N/A self N/A N/A N/A N/A N/A self assertRaises AssertionError N/A vcluster AddNodePrefix foobar _noderoot None N/A testRelativeNodeRoot N/A N/A self N/A N/A N/A N/A N/A self assertRaises AssertionError N/A vcluster AddNodePrefix /tmp _noderoot foobar N/A test N/A N/A self N/A N/A N/A path N/A N/A vcluster AddNodePrefix /file/path _noderoot /tmp/node1.example.com/ N/A N/A N/A self assertEqual path /tmp/node1.example.com/file/path N/A N/A N/A self assertEqual N/A N/A vcluster AddNodePrefix /file/path _noderoot /file/path N/A N/A TestRemoveNodePrefix N/A N/A unittest TestCase N/A testRelativePath N/A N/A self N/A N/A N/A N/A N/A self assertRaises AssertionError N/A vcluster _RemoveNodePrefix foobar _noderoot None N/A testOutsideNodeRoot N/A N/A self N/A N/A N/A N/A N/A self assertRaises RuntimeError N/A vcluster _RemoveNodePrefix /file/path _noderoot /tmp/node1.example.com N/A N/A N/A self assertRaises RuntimeError N/A vcluster _RemoveNodePrefix /tmp/xyzfile _noderoot /tmp/xyz N/A test N/A N/A self N/A N/A N/A path N/A N/A vcluster _RemoveNodePrefix /tmp/node1.example.com/file/path _noderoot /tmp/node1.example.com N/A N/A N/A self assertEqual path /file/path N/A path N/A N/A vcluster _RemoveNodePrefix /file/path _noderoot None N/A N/A N/A self assertEqual path /file/path N/A N/A TestMakeVirtualPath N/A N/A unittest TestCase N/A testRelativePath N/A N/A self N/A N/A N/A N/A N/A self assertRaises AssertionError N/A vcluster MakeVirtualPath foobar _noderoot None N/A testOutsideNodeRoot N/A N/A self N/A N/A N/A N/A N/A self assertRaises RuntimeError N/A vcluster MakeVirtualPath /file/path _noderoot /tmp/node1.example.com N/A testWithNodeRoot N/A N/A self N/A N/A N/A path N/A N/A vcluster MakeVirtualPath /tmp/node1.example.com/tmp/file _noderoot /tmp/node1.example.com N/A N/A N/A self assertEqual path N/A %s/tmp/file N/A vcluster _VIRT_PATH_PREFIX N/A testNormal N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A N/A vcluster MakeVirtualPath /tmp/file _noderoot None /tmp/file N/A testWhitelisted N/A N/A self N/A N/A N/A mvp N/A vcluster MakeVirtualPath N/A path N/A vcluster _VPATH_WHITELIST N/A N/A N/A N/A self assertEqual N/A mvp path path N/A N/A N/A self assertEqual N/A mvp path _noderoot None path N/A N/A N/A self assertEqual N/A mvp path _noderoot /tmp path N/A N/A TestLocalizeVirtualPath N/A N/A unittest TestCase N/A testWrongPrefix N/A N/A self N/A N/A N/A N/A N/A self assertRaises RuntimeError N/A vcluster LocalizeVirtualPath /tmp/some/path _noderoot /tmp/node1.example.com N/A testCorrectPrefixRelativePath N/A N/A self N/A N/A N/A N/A N/A self assertRaises AssertionError N/A vcluster LocalizeVirtualPath N/A N/A vcluster _VIRT_PATH_PREFIX foobar _noderoot /tmp/node1.example.com N/A testWithNodeRoot N/A N/A self N/A N/A N/A lvp N/A vcluster LocalizeVirtualPath N/A virtpath1 N/A %s/tmp/file N/A vcluster _VIRT_PATH_PREFIX N/A virtpath2 N/A %s////tmp////file N/A vcluster _VIRT_PATH_PREFIX N/A i N/A virtpath1 virtpath2 N/A N/A result N/A lvp i _noderoot /tmp/node1.example.com N/A N/A N/A self assertEqual result /tmp/node1.example.com/tmp/file N/A testNormal N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A N/A vcluster LocalizeVirtualPath /tmp/file _noderoot None /tmp/file N/A testWhitelisted N/A N/A self N/A N/A N/A lvp N/A vcluster LocalizeVirtualPath N/A path N/A vcluster _VPATH_WHITELIST N/A N/A N/A N/A self assertEqual N/A lvp path path N/A N/A N/A self assertEqual N/A lvp path _noderoot None path N/A N/A N/A self assertEqual N/A lvp path _noderoot /tmp path N/A N/A TestVirtualPathPrefix N/A N/A unittest TestCase N/A test N/A N/A self N/A N/A N/A N/A N/A self assertTrue N/A N/A N/A os path isabs N/A vcluster _VIRT_PATH_PREFIX N/A N/A N/A self assertEqual N/A N/A N/A os path normcase N/A vcluster _VIRT_PATH_PREFIX N/A vcluster _VIRT_PATH_PREFIX N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A testutils GanetiTestProgram