Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][RFR] V2V : Update set_conversion_host_api function #9954

Merged

Conversation

nachandr
Copy link
Contributor

@nachandr nachandr commented Feb 27, 2020

Purpose or Intent

The set_conversion_host_api function needs to be updated since support for UCI hosts for RHV was added in 5.11.4.

PRT Run

{{ pytest: cfme/tests/v2v/test_v2v_smoke.py --use-template-cache --provider-limit 2 --use-provider rhv43 --use-provider vsphere67-ims }}

PRT results:
510 - PASS
511 - Currently failing, but would pass once #9953 is merged

@nachandr nachandr changed the title [WIP] Update set_conversion_host_api fixture [WIP] V2V : Update set_conversion_host_api function Feb 27, 2020
@nachandr nachandr changed the title [WIP] V2V : Update set_conversion_host_api function [RFR] V2V : Update set_conversion_host_api function Mar 2, 2020
@dajoRH dajoRH removed the WIP label Mar 2, 2020
@dgaikwad
Copy link
Contributor

dgaikwad commented Mar 3, 2020

@nachandr Please check PRT results, I think you have to trigger run again.

resource_type = (
"ManageIQ::Providers::Redhat::InfraManager::Host"
if appliance.version < '5.11'
else "ManageIQ::Providers::Openstack::CloudManager::Vm"
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks wrong @nachandr

   "ManageIQ::Providers::Openstack::CloudManager::Vm" 

Shouldn't it be

   "ManageIQ::Providers::Redhat::InfraManager::Vm"

Please test this with UCI and then update the proper command

if appliance.version < '5.11'
else "ManageIQ::Providers::Openstack::CloudManager::Vm"
)
resource_type = "ManageIQ::Providers::Openstack::CloudManager::Vm"
Copy link
Contributor

Choose a reason for hiding this comment

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

resource_type statement twice ??

@@ -224,7 +229,10 @@ def get_conversion_data(target_provider):
)
private_key = ssh_client.run_command("cat /etc/pki/ovirt-engine/keys/engine_id_rsa").output
Copy link
Contributor

Choose a reason for hiding this comment

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

The key needs to be updated too . It is not the same key anymore .. so you will have to pick key according to appliance version 5.10 and 5.11

@sshveta sshveta changed the title [RFR] V2V : Update set_conversion_host_api function [WIP] V2V : Update set_conversion_host_api function Mar 3, 2020
@dajoRH dajoRH added the WIP label Mar 3, 2020
@nachandr nachandr force-pushed the update_set_conversion_host_api_fixture branch 2 times, most recently from f751b86 to 4789c9e Compare March 3, 2020 23:18
@nachandr nachandr changed the title [WIP] V2V : Update set_conversion_host_api function [RFR] V2V : Update set_conversion_host_api function Mar 4, 2020
@nachandr
Copy link
Contributor Author

nachandr commented Mar 4, 2020

Reviewers,
Note that the PRT run on 511 will fail because the following PR needs to be merged .#9953

@dajoRH dajoRH removed the WIP label Mar 4, 2020
@nachandr
Copy link
Contributor Author

nachandr commented Mar 5, 2020

I've addressed all the comments .

def get_conversion_data(target_provider):
if target_provider.one_of(RHEVMProvider):
def get_conversion_data(appliance, target_provider):
if target_provider.one_of(RHEVMProvider) and appliance.version < '5.11':
Copy link
Contributor

Choose a reason for hiding this comment

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

@nachandr : One more change , let's do this instead of checking fro RHEVM twice

  if target_provider.one_of(RHEVMProvider): 
      if appliance.version == '5.11': 
          code ...for 5.11
      else: 
          code for 5.10

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree here, this will be a bit more readable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Making this Required

Copy link
Contributor

@jawatts jawatts left a comment

Choose a reason for hiding this comment

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

One required comment and waiting on PRT

def get_conversion_data(target_provider):
if target_provider.one_of(RHEVMProvider):
def get_conversion_data(appliance, target_provider):
if target_provider.one_of(RHEVMProvider) and appliance.version < '5.11':
Copy link
Contributor

Choose a reason for hiding this comment

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

Making this Required

@jawatts jawatts changed the title [RFR] V2V : Update set_conversion_host_api function [1LP][WIPTEST] V2V : Update set_conversion_host_api function Mar 5, 2020
@digitronik digitronik self-requested a review March 5, 2020 18:35
@nachandr nachandr force-pushed the update_set_conversion_host_api_fixture branch from 3a55930 to 89065dc Compare March 5, 2020 18:48
@nachandr nachandr changed the title [1LP][WIPTEST] V2V : Update set_conversion_host_api function [1LP][RFR] V2V : Update set_conversion_host_api function Mar 5, 2020
@dajoRH dajoRH removed the WIP-testing label Mar 5, 2020
@nachandr nachandr changed the title [1LP][RFR] V2V : Update set_conversion_host_api function [1LP][WIP] V2V : Update set_conversion_host_api function Mar 5, 2020
@dajoRH dajoRH added the WIP label Mar 5, 2020
@nachandr nachandr changed the title [1LP][WIP] V2V : Update set_conversion_host_api function [1LP][RFR] V2V : Update set_conversion_host_api function Mar 5, 2020
@dajoRH dajoRH removed the WIP label Mar 5, 2020
except KeyError:
pytest.skip("No conversion host on provider")

elif appliance.version > '5.10':
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional : since we are testing for only two versions now , you can just do else.

@nachandr
Copy link
Contributor Author

nachandr commented Mar 5, 2020

I'm investigating the 511 PRT failure , but the failure is not related to the changes addressed through this PR.

@jawatts jawatts merged commit 6a2e01a into ManageIQ:master Mar 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants