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

[Cancelled] Add support for VMware to OpenStack transformation #430

Closed

Conversation

ghost
Copy link

@ghost ghost commented Sep 24, 2018

This pull request add support for OpenStack target in transformation. To keep the PR small, some refactoring has been deferred. For example, Infrastructure/VM should be moved to VM, as transformations to Infrastructure or Cloud are very similar. Keeping that separation complexifies the code with no value. Thus, the OpenStack-related code is under Infrastructure/VM/OpenStack.

Some additional data checks are performed in assessment:

  • Flavor and security group are collected from Transformation Plan.
  • Networks identification has been split, as RHV networks are called by name, while OpenStack's are called by ems_ref, aka UUID.

The only real new method for OpenStack is SetDescription which is simply declared but does nothing (hence no specs provided), until we know how to do it properly (fog based).

The Transformation Hosts utility class welcomes two new methods that build the options hash for virt-v2v-wrapper, either for VDDK, or for SSH.

Depends on:

Associated RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1632355

@ghost
Copy link
Author

ghost commented Sep 24, 2018

@miq-bot add-label transformation, enhancement
@miq-bot add-reviewer mkanoor

:install_drivers => true
}
end
private_class_method :virtv2vwrapper_options_vmwarews2openstack_ssh
Copy link
Member

Choose a reason for hiding this comment

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

Is the difference between virtv2vwrapper_options_vmwarews2openstack_vddk and virtv2vwrapper_options_vmwarews2openstack_ssh just the :transport_method key in the returned hash?

If so, I think it would be better to have a single method that varied on what type of transport_method. I worry about someone having to go back and update this some point later and not realizing they have to change both ssh and vddk methods.

Something like:

def virtv2vwrapper_options_vmwarews2openstack(task, transport, handle = $evm)
  ... # all the stuff that's currently in both methods
  ...
    :transport_method           => transport,
  ...
end

def virtv2vwrapper_options_vmwarews2openstack_vddk(task, handle = $evm)
  virtv2vwrapper_options_vmwarews2openstack(task, "vddk", handle)
end

def virtv2vwrapper_options_vmwarews2openstack_ssh(task, handle = $evm)
  virtv2vwrapper_options_vmwarews2openstack(task, "ssh", handle)
end

Copy link
Author

@ghost ghost Sep 26, 2018

Choose a reason for hiding this comment

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

There's a little bit more to it. The credentials are different. And BTW, I forgot a field for SSH transport method: ssh_key which contains the OpenStack provider SSH private key.

Talking about splitting code in methods, there's also work to do on VMware to RHV methods. I'd rather file another PR for refactoring these. And I'm still waiting on #421.

Copy link
Member

Choose a reason for hiding this comment

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

I'd rather file another PR for refactoring these

👍

@ghost
Copy link
Author

ghost commented Sep 26, 2018

@miq-bot add-label hammer/yes

@miq-bot
Copy link
Member

miq-bot commented Sep 27, 2018

This pull request is not mergeable. Please rebase and repush.

@ghost ghost force-pushed the v2v_openstack_initial_support branch from 83c6a5d to 1d34100 Compare October 1, 2018 06:40
@miq-bot
Copy link
Member

miq-bot commented Oct 1, 2018

Some comments on commits fabiendupont/manageiq-content@e689633~...7e77723

content/automate/ManageIQ/Transformation/Infrastructure/VM/openstack.class/methods/setdescription.rb

  • 💣 💥 🔥 🚒 - 14 - Detected cloudforms

@miq-bot
Copy link
Member

miq-bot commented Oct 1, 2018

Checked commits fabiendupont/manageiq-content@e689633~...7e77723 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
6 files checked, 1 offense detected

content/automate/ManageIQ/Transformation/Infrastructure/VM/openstack.class/methods/setdescription.rb

@ghost
Copy link
Author

ghost commented Oct 1, 2018

@miq-bot add-label wip

@miq-bot miq-bot changed the title Add support for VMware to OpenStack transformation [WIP] Add support for VMware to OpenStack transformation Oct 1, 2018
@miq-bot miq-bot added wip and removed unmergeable labels Oct 1, 2018
@miq-bot
Copy link
Member

miq-bot commented Oct 19, 2018

This pull request is not mergeable. Please rebase and repush.

@ghost
Copy link
Author

ghost commented Oct 19, 2018

The changes needed for migration to OpenStack have been implemented in #441. Closing this PR.

@ghost ghost closed this Oct 19, 2018
@ghost ghost changed the title [WIP] Add support for VMware to OpenStack transformation [Cancelled] Add support for VMware to OpenStack transformation Oct 19, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants