Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr FunctionDef arguments args defaults vararg kwarg body Assign NameStore SubscriptLoad NameLoad Index Num Return IfExp CompareEq SubscriptLoad NameLoad Slice BinOpAdd Call AttributeLoad NameLoad attr Str Num NameLoad NameLoad NameLoad decorator_list Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore Str If NameLoad body AugAssignAdd NameStore Str For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list Assign NameStore Str Assign NameStore NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad keyword NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword ListLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Str If NameLoad body Assign AttributeStore NameLoad attr ListLoad NameLoad NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpSub NameLoad Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Num NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Str Assign NameStore Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str decorator_list
N/A N/A os N/A time N/A mock nova exception six.moves builtins hyperv.nova constants hyperv.nova pathutils hyperv.tests.unit test_base PathUtilsTestCase N/A N/A test_base HyperVBaseTestCase N/A N/A Unit tests for the Hyper-V PathUtils class. setUp N/A N/A self N/A N/A N/A N/A N/A N/A super PathUtilsTestCase self setUp N/A N/A self fake_instance_dir N/A N/A N/A os path join C: fake_instance_dir N/A N/A self fake_instance_name fake_instance_name N/A N/A self _pathutils N/A N/A pathutils PathUtils N/A N/A N/A self _pathutils _smb_conn_attr N/A N/A mock MagicMock N/A _mock_lookup_configdrive_path N/A N/A self ext rescue N/A False N/A N/A N/A N/A self _pathutils get_instance_dir N/A N/A mock MagicMock return_value N/A self fake_instance_dir mock_exists N/A N/A N/A args kwargs N/A N/A path N/A args N/A 0 N/A N/A N/A N/A path N/A N/A N/A N/A path rfind . 1 ext True False N/A N/A N/A N/A self _pathutils exists mock_exists N/A configdrive_path N/A N/A N/A self _pathutils lookup_configdrive_path N/A self fake_instance_name rescue N/A configdrive_path N/A _test_lookup_configdrive_path N/A N/A self rescue N/A False N/A N/A configdrive_name configdrive N/A rescue N/A N/A configdrive_name -rescue N/A format_ext N/A constants DISK_FORMAT_MAP N/A N/A configdrive_path N/A N/A self _mock_lookup_configdrive_path format_ext rescue N/A expected_path N/A N/A N/A os path join N/A self fake_instance_dir N/A N/A configdrive_name . format_ext N/A N/A N/A self assertEqual expected_path configdrive_path N/A test_lookup_configdrive_path N/A N/A self N/A N/A N/A N/A N/A self _test_lookup_configdrive_path N/A test_lookup_rescue_configdrive_path N/A N/A self N/A N/A N/A N/A N/A self _test_lookup_configdrive_path rescue True N/A test_lookup_configdrive_path_non_exist N/A N/A self N/A N/A N/A N/A N/A self _pathutils get_instance_dir N/A N/A mock MagicMock return_value N/A self fake_instance_dir N/A N/A N/A self _pathutils exists N/A N/A mock MagicMock return_value False N/A configdrive_path N/A N/A N/A self _pathutils lookup_configdrive_path N/A self fake_instance_name N/A N/A N/A self assertIsNone configdrive_path N/A test_get_instances_sub_dir N/A N/A self fake_path_join N/A N/A WindowsError N/A Exception N/A __init__ N/A N/A self winerror N/A None N/A N/A N/A self winerror winerror N/A N/A N/A fake_dir_name fake_dir_name N/A fake_windows_error WindowsError N/A N/A N/A self _pathutils check_create_dir N/A N/A mock MagicMock side_effect N/A WindowsError N/A pathutils ERROR_INVALID_NAME N/A N/A N/A N/A mock patch object builtins WindowsError fake_windows_error create True N/A N/A N/A N/A self assertRaises N/A exception AdminRequired N/A N/A self _pathutils _get_instances_sub_dir fake_dir_name N/A N/A N/A mock patch os.path.join test_copy_vm_console_logs N/A N/A self N/A N/A N/A fake_local_logs N/A N/A N/A mock sentinel log_path N/A N/A mock sentinel archived_log_path N/A fake_remote_logs N/A N/A N/A mock sentinel remote_log_path N/A N/A mock sentinel remote_archived_log_path N/A N/A N/A self _pathutils exists N/A N/A mock Mock return_value True N/A N/A N/A self _pathutils copy N/A N/A mock Mock N/A N/A N/A self _pathutils get_vm_console_log_paths N/A N/A mock Mock side_effect N/A fake_local_logs fake_remote_logs N/A N/A N/A N/A self _pathutils copy_vm_console_logs N/A N/A mock sentinel instance_name N/A N/A mock sentinel dest_host N/A N/A N/A N/A N/A self _pathutils get_vm_console_log_paths assert_has_calls N/A N/A N/A mock call N/A N/A mock sentinel instance_name N/A N/A mock call N/A N/A mock sentinel instance_name remote_server N/A N/A mock sentinel dest_host N/A N/A N/A N/A N/A self _pathutils copy assert_has_calls N/A N/A N/A mock call N/A N/A mock sentinel log_path N/A N/A mock sentinel remote_log_path N/A N/A mock call N/A N/A mock sentinel archived_log_path N/A N/A mock sentinel remote_archived_log_path N/A _test_lookup_image_basepath N/A N/A self mock_exists mock_get_base_vhd_dir found N/A True N/A N/A fake_image_name fake_image_name N/A found N/A N/A N/A mock_exists side_effect N/A False True N/A N/A N/A mock_exists return_value False N/A N/A mock_get_base_vhd_dir return_value fake_base_dir N/A res N/A N/A N/A self _pathutils lookup_image_basepath fake_image_name N/A N/A N/A mock_get_base_vhd_dir assert_called_once_with N/A found N/A N/A N/A N/A self assertEqual res N/A N/A N/A os path join fake_base_dir fake_image_name.vhdx N/A N/A N/A N/A self assertIsNone res N/A N/A N/A N/A mock patch object N/A pathutils PathUtils get_base_vhd_dir N/A N/A N/A mock patch object N/A pathutils PathUtils exists test_lookup_image_basepath N/A N/A self N/A N/A N/A N/A N/A self _test_lookup_image_basepath N/A test_lookup_image_basepath_not_found N/A N/A self N/A N/A N/A N/A N/A self _test_lookup_image_basepath found False N/A test_get_age_of_file N/A N/A self N/A N/A N/A current_time N/A N/A time time N/A N/A N/A self _check_get_age_of_file current_time current_time N/A _check_get_age_of_file N/A N/A self mock_time mock_getmtime current_time N/A N/A N/A N/A mock_time return_value current_time N/A N/A mock_getmtime return_value N/A current_time 5 N/A ret N/A N/A N/A self _pathutils get_age_of_file N/A N/A mock sentinel file_name N/A N/A N/A self assertEqual 5 ret N/A N/A N/A mock_getmtime assert_called_once_with N/A N/A mock sentinel file_name N/A N/A N/A N/A mock patch object N/A os path getmtime N/A N/A mock patch time.time test_check_dirs_shared_storage N/A N/A self mock_named_tempfile mock_exists N/A N/A N/A fake_src_dir fake_src_dir N/A fake_dest_dir fake_dest_dir N/A N/A mock_exists return_value True N/A mock_tmpfile N/A N/A N/A mock_named_tempfile return_value __enter__ return_value N/A N/A mock_tmpfile name fake_tmp_fname N/A expected_src_tmp_path N/A N/A N/A os path join fake_src_dir N/A mock_tmpfile name N/A N/A N/A N/A self _pathutils check_dirs_shared_storage fake_src_dir fake_dest_dir N/A N/A N/A mock_named_tempfile assert_called_once_with dir fake_dest_dir N/A N/A N/A mock_exists assert_called_once_with expected_src_tmp_path N/A N/A N/A mock patch os.path.exists N/A N/A mock patch tempfile.NamedTemporaryFile N/A