Module Import alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore AttributeLoad NameLoad attr ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad If NameLoad body Assign AttributeStore AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad If CompareNotEq NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Num If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword Str keyword NameLoad keyword NameLoad decorator_list decorator_list
N/A N/A unittest N/A N/A N/A unittest.mock mock N/A N/A N/A ImportError N/A N/A mock oslo_config cfg cloudbaseinit exception cloudbaseinit.plugins.windows ntpclient N/A CONF N/A cfg CONF NTPClientPluginTests N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self _ntpclient N/A N/A ntpclient NTPClientPlugin N/A test_set_ntp_trigger_mode N/A N/A self N/A N/A N/A mock_osutils N/A N/A mock Mock N/A N/A N/A N/A self _ntpclient _set_ntp_trigger_mode mock_osutils N/A N/A N/A N/A mock_osutils execute_system32_process assert_called_once_with N/A sc.exe triggerinfo N/A ntpclient _W32TIME_SERVICE start/networkon stop/networkoff N/A _test_check_w32time_svc_status N/A N/A self mock_set_ntp_trigger_mode mock_sleep start_mode fail_service_start patch_check_os_version N/A True N/A N/A mock_osutils N/A N/A mock MagicMock N/A N/A mock_osutils SERVICE_START_MODE_AUTOMATIC Automatic N/A N/A mock_osutils SERVICE_STATUS_RUNNING running N/A N/A mock_osutils SERVICE_STATUS_STOPPED stopped N/A N/A N/A mock_osutils get_service_start_mode return_value start_mode N/A N/A N/A mock_osutils check_os_version return_value patch_check_os_version N/A fail_service_start N/A N/A N/A N/A mock_osutils get_service_status return_value stopped N/A N/A N/A self assertRaises N/A exception CloudbaseInitException N/A N/A self _ntpclient verify_time_service mock_osutils N/A N/A N/A N/A mock_osutils get_service_status side_effect N/A stopped N/A mock_osutils SERVICE_STATUS_RUNNING N/A N/A N/A N/A self _ntpclient verify_time_service osutils mock_osutils N/A N/A start_mode N/A mock_osutils SERVICE_START_MODE_AUTOMATIC N/A N/A N/A N/A N/A mock_osutils set_service_start_mode assert_called_once_with N/A ntpclient _W32TIME_SERVICE N/A mock_osutils SERVICE_START_MODE_AUTOMATIC N/A N/A N/A mock_sleep assert_called_once_with 1 N/A N/A N/A N/A mock_osutils start_service assert_called_once_with N/A ntpclient _W32TIME_SERVICE N/A N/A N/A N/A mock_osutils get_service_start_mode assert_called_once_with N/A ntpclient _W32TIME_SERVICE N/A N/A N/A N/A mock_osutils get_service_status assert_called_with N/A ntpclient _W32TIME_SERVICE N/A N/A N/A N/A mock_osutils check_os_version assert_called_once_with 6 1 N/A patch_check_os_version N/A N/A N/A N/A mock_set_ntp_trigger_mode assert_called_once_with mock_osutils N/A N/A N/A N/A self assertFalse N/A mock_set_ntp_trigger_mode called N/A N/A N/A mock patch time.sleep N/A N/A mock patch cloudbaseinit.plugins.windows.ntpclient.NTPClientPlugin._set_ntp_trigger_mode test_check_w32time_svc_status_other_start_mode N/A N/A self N/A N/A N/A N/A N/A self _test_check_w32time_svc_status start_mode not automatic fail_service_start False N/A test_check_w32time_svc_status_start_automatic N/A N/A self N/A N/A N/A N/A N/A self _test_check_w32time_svc_status start_mode automatic fail_service_start False N/A test_check_w32time_svc_status_exception N/A N/A self N/A N/A N/A N/A N/A self _test_check_w32time_svc_status start_mode automatic fail_service_start True N/A test_check_w32time_older_oses N/A N/A self N/A N/A N/A N/A N/A self _test_check_w32time_svc_status start_mode automatic fail_service_start False patch_check_os_version False N/A N/A