-
Notifications
You must be signed in to change notification settings - Fork 165
[WIPTEST] Fixing infra_hosts_power_tests for the CFME 5.10 #8327
base: master
Are you sure you want to change the base?
Conversation
@dkholodo please sign commit with your GPG key. |
16ad96a
to
87ad02a
Compare
try: | ||
my_host_on = provider.nodes.all().pop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this change? Now the host that we return may not be associated with the provider for the test function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this change there is an issue with navigating to Host's Details view:
"NameError: Could not find field with name 'Hosts'"
ipdb> my_host_on = host_collection.all().pop()
OpenstackNode(name=u'bc5add29-47a9-4387-bbcc-3f9d9e21631d (NovaCompute)', provider=OpenstackInfraProvider(endpoints={'default': <cfme.infrastructure.provider.openstack_infra.RHOSEndpoint object at 0x7f3097ac8d90>, 'rsa_keypair': <cfme.common.provider.SSHEndpoint object at 0x7f309790a5d0>, 'events': <cfme.common.provider.EventsEndpoint object at 0x7f3097ac88d0>}, name='uc_ci', key='uc_ci', zone=None, start_ip='192.168.24.2', end_ip='192.168.24.2', provider_data=None, api_version='Keystone v3', keystone_v3_domain_id='default'), hostname=None, ip_address=None, custom_ident=None, host_platform=None, ipmi_address=None, mac_address=None, credentials={}, ipmi_credentials=None, interface_type='lan')
and then my_host_on.get_power_state()
can't be executed because it goes to the Infrastructure Provider Detail page but we expected to see the Host's Detail page
So if we do the code below the method 'my_host_on.get_power_state()' works ok
ipdb> my_host_on = host_collection.all().pop()
Host(name=u'47b49e2d-c65b-48c6-a27b-605207986de6 (NovaCompute)', provider=None, hostname=None, ip_address=None, custom_ident=None, host_platform=None, ipmi_address=None, mac_address=None, credentials={}, ipmi_credentials=None, interface_type='lan')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkholodo: I like @mshriver comment. extending... suppose, we have already have one provider lets vsphere
then we add rhos uc
then about situation will occur means host_collection.all()
will return you all host for both provider.
I would like to suggest you; Please, use filtering
of all
method. It will help you to filter out hosts/nodes
for specific provider and then you can select anyone of them for power operation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please justify the changes to test fixtures
This needs rebase, we don't want to include any merge commits. Please rebase/squash to one (new) commit. |
try: | ||
my_host_on = provider.nodes.all().pop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkholodo: I like @mshriver comment. extending... suppose, we have already have one provider lets vsphere
then we add rhos uc
then about situation will occur means host_collection.all()
will return you all host for both provider.
I would like to suggest you; Please, use filtering
of all
method. It will help you to filter out hosts/nodes
for specific provider and then you can select anyone of them for power operation.
87ad02a
to
b05ade2
Compare
b05ade2
to
40fbd81
Compare
Lint report for commit 40fbd81:
Please, rectify these issues 😏 . No commit flaws detected. CFME QE Bot |
I detected some fixture changes in commit 40fbd81 The local fixture
The local fixture
Please, consider creating a PRT run against these tests make sure your fixture changes do not break existing usage 😃 |
Were fixed infra provider's host_off and host_on tests for the CFME 5.10
{{ pytest: cfme/tests/openstack/infrastructure/test_host_power_control.py }}