Module Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore AttributeLoad Call NameLoad attr attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad Call NameLoad attr attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad Call NameLoad attr attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad Call NameLoad attr attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad Call NameLoad attr attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults vararg kwarg body Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Num keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list Call AttributeLoad NameLoad attr Str ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword BinOpSub Call AttributeLoad NameLoad attr Call NameLoad keyword Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword BinOpSub Call AttributeLoad NameLoad attr Call NameLoad keyword Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr Str TupleLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Dict keyword Num Call AttributeLoad NameLoad attr Str TupleLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Dict keyword Num keyword NameLoad decorator_list Call AttributeLoad NameLoad attr Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr BinOpSub Call AttributeLoad NameLoad attr Call NameLoad keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr BinOpAdd Call AttributeLoad NameLoad attr Call NameLoad keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num decorator_list decorator_list
N/A N/A mock datetime timedelta django.test TestCase django.utils timezone nodeconductor.openstack tasks nodeconductor.openstack.backend OpenStackBackendError nodeconductor.openstack.models Instance nodeconductor.openstack.tests factories ErrorMessageTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self instance N/A N/A factories InstanceFactory N/A N/A self error N/A OpenStackBackendError Unable to find network N/A test_if_instance_provision_fails_error_message_is_saved N/A N/A self mock_backend mock_throttle N/A N/A N/A N/A N/A N/A mock_backend provision_instance side_effect N/A self error N/A N/A N/A self assertRaises OpenStackBackendError N/A N/A N/A N/A tasks provision_instance N/A N/A N/A self instance uuid hex N/A N/A N/A self assert_instance_has_error_message N/A test_if_instance_start_fails_error_message_is_saved N/A N/A self mock_backend mock_throttle N/A N/A N/A N/A N/A self instance state N/A N/A Instance States STARTING_SCHEDULED N/A N/A N/A N/A self instance save N/A N/A N/A N/A mock_backend start_instance side_effect N/A self error N/A N/A N/A self assertRaises OpenStackBackendError N/A N/A N/A N/A tasks start_instance N/A N/A N/A self instance uuid hex N/A N/A N/A self assert_instance_has_error_message N/A test_if_instance_stop_fails_error_message_is_saved N/A N/A self mock_backend mock_throttle N/A N/A N/A N/A N/A self instance state N/A N/A Instance States STOPPING_SCHEDULED N/A N/A N/A N/A self instance save N/A N/A N/A N/A mock_backend stop_instance side_effect N/A self error N/A N/A N/A self assertRaises OpenStackBackendError N/A N/A N/A N/A tasks stop_instance N/A N/A N/A self instance uuid hex N/A N/A N/A self assert_instance_has_error_message N/A test_if_instance_restart_fails_error_message_is_saved N/A N/A self mock_backend mock_throttle N/A N/A N/A N/A N/A self instance state N/A N/A Instance States RESTARTING_SCHEDULED N/A N/A N/A N/A self instance save N/A N/A N/A N/A mock_backend restart_instance side_effect N/A self error N/A N/A N/A self assertRaises OpenStackBackendError N/A N/A N/A N/A tasks restart_instance N/A N/A N/A self instance uuid hex N/A N/A N/A self assert_instance_has_error_message N/A test_if_instance_destroy_fails_error_message_is_saved N/A N/A self mock_backend mock_throttle N/A N/A N/A N/A N/A self instance state N/A N/A Instance States DELETION_SCHEDULED N/A N/A N/A N/A self instance save N/A N/A N/A N/A mock_backend delete_instance side_effect N/A self error N/A N/A N/A self assertRaises OpenStackBackendError N/A N/A N/A N/A tasks destroy_instance N/A N/A N/A self instance uuid hex N/A N/A N/A self assert_instance_has_error_message N/A assert_instance_has_error_message N/A N/A self N/A N/A N/A instance N/A N/A N/A Instance objects get pk N/A N/A self instance pk N/A N/A N/A self assertEqual N/A instance error_message N/A str N/A self error N/A N/A N/A N/A mock patch nodeconductor.openstack.tasks.instance.throttle N/A N/A mock patch nodeconductor.structure.models.Service.get_backend BackupTest N/A TestCase N/A assert_task_called N/A N/A self task name N/A args kawargs N/A N/A N/A N/A task assert_has_calls N/A N/A N/A mock call name args kawargs countdown 2 any_order True N/A test_start_backup N/A N/A self mocked_task N/A N/A N/A backup N/A N/A factories BackupFactory N/A backend N/A N/A backup get_backend N/A N/A N/A backend start_backup N/A N/A N/A self assert_task_called mocked_task nodeconductor.openstack.backup_start_create N/A N/A backup uuid hex N/A test_start_restoration N/A N/A self mocked_task N/A N/A N/A backup N/A N/A factories BackupFactory N/A instance N/A N/A factories InstanceFactory N/A user_input N/A N/A snapshot_ids N/A N/A backend N/A N/A backup get_backend N/A N/A N/A backend start_restoration N/A N/A instance uuid hex user_input snapshot_ids N/A N/A N/A self assert_task_called mocked_task nodeconductor.openstack.backup_start_restore N/A N/A backup uuid hex N/A N/A instance uuid hex user_input snapshot_ids N/A test_start_deletion N/A N/A self mocked_task N/A N/A N/A backup N/A N/A factories BackupFactory N/A backend N/A N/A backup get_backend N/A N/A N/A backend start_deletion N/A N/A N/A self assert_task_called mocked_task nodeconductor.openstack.backup_start_delete N/A N/A backup uuid hex N/A N/A N/A N/A mock patch celery.app.base.Celery.send_task DeleteExpiredBackupsTaskTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self expired_backup1 N/A N/A factories BackupFactory kept_until N/A N/A N/A timezone now N/A timedelta minutes 1 N/A N/A self expired_backup2 N/A N/A factories BackupFactory kept_until N/A N/A N/A timezone now N/A timedelta minutes 10 N/A test_command_starts_backend_deletion N/A N/A self mocked_task N/A N/A N/A N/A N/A tasks delete_expired_backups N/A N/A N/A mocked_task assert_has_calls N/A N/A N/A mock call nodeconductor.openstack.backup_start_delete N/A N/A N/A N/A self expired_backup1 uuid hex N/A countdown 2 N/A N/A mock call nodeconductor.openstack.backup_start_delete N/A N/A N/A N/A self expired_backup2 uuid hex N/A countdown 2 any_order True N/A N/A N/A mock patch celery.app.base.Celery.send_task N/A ExecuteScheduleTaskTest N/A TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self not_active_schedule N/A N/A factories BackupScheduleFactory is_active False N/A backupable N/A N/A factories InstanceFactory state N/A N/A Instance States OFFLINE N/A N/A self schedule_for_execution N/A N/A factories BackupScheduleFactory instance backupable N/A N/A N/A self schedule_for_execution next_trigger_at N/A N/A N/A timezone now N/A timedelta minutes 10 N/A N/A N/A N/A self schedule_for_execution save N/A N/A self future_schedule N/A N/A factories BackupScheduleFactory N/A N/A N/A self future_schedule next_trigger_at N/A N/A N/A timezone now N/A timedelta minutes 2 N/A N/A N/A N/A self future_schedule save N/A test_command_does_not_create_backups_created_for_not_active_schedules N/A N/A self N/A N/A N/A N/A N/A tasks schedule_backups N/A N/A N/A self assertEqual N/A N/A N/A N/A self not_active_schedule backups count 0 N/A test_command_create_one_backup_created_for_schedule_with_next_trigger_in_past N/A N/A self N/A N/A N/A N/A N/A tasks schedule_backups N/A N/A N/A self assertEqual N/A N/A N/A N/A self schedule_for_execution backups count 1 N/A test_command_does_not_create_backups_created_for_schedule_with_next_trigger_in_future N/A N/A self N/A N/A N/A N/A N/A tasks schedule_backups N/A N/A N/A self assertEqual N/A N/A N/A N/A self future_schedule backups count 0 N/A N/A