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

[WIP] Tests for grouping cluster candu graphs by tags #8677

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

nachandr
Copy link
Contributor

@nachandr nachandr commented Apr 4, 2019

No description provided.

@nachandr nachandr force-pushed the candu_group_cluster_graph_by_tag branch from 976a23c to e625631 Compare April 9, 2019 22:33
@nachandr nachandr changed the title [WIP] Tests for grouping cluster candu graphs by tags [WIPTEST] Tests for grouping cluster candu graphs by tags Apr 9, 2019
@nachandr nachandr changed the title [WIPTEST] Tests for grouping cluster candu graphs by tags [RFR] Tests for grouping cluster candu graphs by tags Apr 9, 2019
@dajoRH dajoRH changed the title [RFR] Tests for grouping cluster candu graphs by tags [WIP] Tests for grouping cluster candu graphs by tags Apr 9, 2019
@nachandr nachandr force-pushed the candu_group_cluster_graph_by_tag branch from e625631 to 4b5d59e Compare April 9, 2019 22:59
@nachandr nachandr changed the title [WIP] Tests for grouping cluster candu graphs by tags [RFR] Tests for grouping cluster candu graphs by tags Apr 9, 2019
@nachandr nachandr changed the title [RFR] Tests for grouping cluster candu graphs by tags [WIP] Tests for grouping cluster candu graphs by tags Apr 10, 2019
@dajoRH dajoRH added the WIP label Apr 10, 2019
@nachandr nachandr force-pushed the candu_group_cluster_graph_by_tag branch from 4b5d59e to 96f7726 Compare April 10, 2019 19:33
@nachandr nachandr changed the title [WIP] Tests for grouping cluster candu graphs by tags [WIPTEST] Tests for grouping cluster candu graphs by tags Apr 10, 2019
@dajoRH dajoRH added WIP-testing and removed WIP labels Apr 10, 2019
@nachandr nachandr force-pushed the candu_group_cluster_graph_by_tag branch from e89f0e5 to 279db12 Compare April 10, 2019 22:42
@nachandr nachandr changed the title [WIPTEST] Tests for grouping cluster candu graphs by tags [RFR] Tests for grouping cluster candu graphs by tags Apr 12, 2019
@dajoRH dajoRH changed the title [RFR] Tests for grouping cluster candu graphs by tags [WIP] Tests for grouping cluster candu graphs by tags Apr 12, 2019
@dajoRH dajoRH removed the lint-ok label Apr 12, 2019
@nachandr nachandr force-pushed the candu_group_cluster_graph_by_tag branch from 53e5402 to 9569ecc Compare April 12, 2019 18:57
@nachandr nachandr changed the title [WIP] Tests for grouping cluster candu graphs by tags [RFR] Tests for grouping cluster candu graphs by tags Apr 12, 2019
@nachandr nachandr force-pushed the candu_group_cluster_graph_by_tag branch from 9569ecc to 2ba1dae Compare April 12, 2019 19:09
Copy link
Contributor

@digitronik digitronik left a comment

Choose a reason for hiding this comment

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

@nachandr check PRT failing also please glance on some comments.

Thanks for this PR 👍

vm_host = vm.host.name
return temp_appliance_extended_db.collections.hosts.instantiate(name=vm_host)
elif entity == 'cluster':
provider = temp_appliance_extended_db.rest_api.collections.providers.get(id=vm.ems_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

Required:
we have property for getting custer for specific vm

Copy link
Contributor

@jawatts jawatts Apr 15, 2019

Choose a reason for hiding this comment

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

@nachandr when we were looking at this the other day, we were using the entity object that was returned by the rest api. What @digitronik is suggesting here is to actually use the vm and cluster collections (this will use the GUI).

`In[17]: vm = appliance.collections.infra_vms.instantiate(name='cu-24x7', provider=vmwaretest)
In[18]: vm
Out[18]: InfraVm(name='cu-24x7', provider=VMwareProvider(endpoints={'default': <cfme.infrastructure.provider.virtualcenter.VirtualCenterEndpoint object at 0x7fdff3065650>}, name='vSphere 6.5 (nested)', key='vsphere65-nested', zone='default', start_ip='10.8.196.40', end_ip='10.8.196.40', provider_data=None), template_name=None)
In[19]: vm.cluster
Out[19]: Cluster(name=u'Cluster', provider=VMwareProvider(endpoints={'default': <cfme.infrastructure.provider.virtualcenter.VirtualCenterEndpoint object at 0x7fdff3065650>}, name='vSphere 6.5 (nested)', key='vsphere65-nested', zone='default', start_ip='10.8.196.40', end_ip='10.8.196.40', provider_data=None))

Nikhil and I did chat offline and this is slower with our current implementation. I think both ways work here.

if entity == 'host':
view = navigate_to(entity_object, 'candu')
elif entity == 'cluster':
view = navigate_to(entity_object, 'Utilization')
Copy link
Contributor

Choose a reason for hiding this comment

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

aaaaaahhh this was my bad :). I think we need to use same name. TODO: need PR for this.

data = {'interval': interval, 'group_by': gp_by}
view.options.fill(data)

entity_graph = entity + '_' + graph_type
Copy link
Contributor

Choose a reason for hiding this comment

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

optional:
I would use .format for string formatting

# We have to use vm or host average graph for zoom in operation.
if entity == 'cluster':
graph_zoom = ["cluster_host", "cluster_vm"]
entity_graph = entity + '_' + graph_type
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above ^^

if entity == 'cluster':
graph_zoom = ["cluster_host", "cluster_vm"]
entity_graph = entity + '_' + graph_type
avg_graph = entity_graph if entity_graph in graph_zoom \
Copy link
Contributor

Choose a reason for hiding this comment

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

Required:
please try to format this; try to avoid \

@digitronik digitronik changed the title [RFR] Tests for grouping cluster candu graphs by tags [WIP] Tests for grouping cluster candu graphs by tags Apr 15, 2019
@dajoRH dajoRH added the WIP label Apr 15, 2019
@nachandr nachandr changed the title [WIP] Tests for grouping cluster candu graphs by tags [WIPTEST] Tests for grouping cluster candu graphs by tags Apr 15, 2019
@dajoRH dajoRH added WIP-testing and removed WIP labels Apr 15, 2019
@nachandr nachandr force-pushed the candu_group_cluster_graph_by_tag branch from 7294a3b to 2a01cb2 Compare April 15, 2019 19:14
@dajoRH
Copy link
Contributor

dajoRH commented Aug 7, 2019

I detected some fixture changes in commit 2a01cb2

The local fixture entity_object is used in the following files:

  • cfme/tests/candu/test_graph_groupbytag.py
    • test_tagwise

Please, consider creating a PRT run against these tests make sure your fixture changes do not break existing usage 😃

@dajoRH dajoRH changed the title [WIPTEST] Tests for grouping cluster candu graphs by tags [WIP] Tests for grouping cluster candu graphs by tags Mar 31, 2020
@dajoRH
Copy link
Contributor

dajoRH commented Mar 31, 2020

Would you mind rebasing this Pull Request against latest master, please? :trollface:
CFME QE Bot

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.

4 participants