Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2v: Handle IMPORTEXPORT_STARTING_IMPORT_VM event #149

Merged
merged 1 commit into from
Jul 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def main

def set_retry
@handle.root['ae_result'] = 'retry'
@handle.root['ae_retry_interval'] = @handle.inputs['retry_interval'] || 30.minutes
@handle.root['ae_retry_interval'] = @handle.inputs['retry_interval'] || 3.minutes
end

def imported_vm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ object:
description:
fields:
- rel4:
value: "/System/event_handlers/event_action_refresh?target=src_vm"
value: "/System/event_handlers/event_action_refresh_new_target?target=src_vm"
- meth4:
value: update_vm_import_status
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ object:
fields:
- meth4:
value: update_vm_import_status
- rel5:
value: "/System/event_handlers/event_action_refresh?target=src_vm"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smelamud @agrare
When the VM import fails do we have to remove the VM from our database? Should that be a different kind of action_refresh?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we need to remove the VM, because it is removed from RHV database as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
object_type: instance
version: 1.0
object:
attributes:
display_name:
name: IMPORTEXPORT_STARTING_IMPORT_VM
inherits:
description:
fields:
- rel5:
value: "/System/event_handlers/event_action_refresh_new_target?target=src_vm"