Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def _entity_test_template(self, entity_name, entity_type, entity_id,
- chart_name, metrics):
- """
- Test template for entity - metrics combo of tests
- Args:
- entity_name(str): Name of the entity
- entity_type(str): Type of the entity e.g., host
- entity_id(int):ID of the entiry
- chart_name(str): Name of the chart
- metrics(list): List of the metrics to be collected
- Returns:
- """
- log.INFO("Testing - %s, %s" % (entity_name, chart_name))
- self.main_menu.click_analysis()
- self.analysis.dismiss_chart_helper()
- if self.analysis.check_default_charts_button_is_visible():
- self.analysis.create_default_charts()
- log.INFO("Creating entity - metrics combo chart %s" % chart_name)
- self.create_chart(entity_name, entity_type, chart_name, metrics.keys())
- log.INFO("Performing a UI metric value comparison from graph to REST")
- self.analysis._select_timeline_scale()
- self._get_chart_details_from_rest()
- chart_names = self._get_chart_names()
- chart_dict = dict((v, k) for k, v in chart_names.iteritems())
- chart_name1 = chart_name.encode("utf-8")
- chart_id = chart_dict[chart_name1]
- # create a rest client object and pass it to
- prc = PrismRestClient(svm_ip=self.svm_ip,
- prism_user=self.prism_user,
- prism_password=self.prism_passwd)
- self.analysis_chart = AnalysisChart(self.browser, chart_id)
- self.analysis_chart.compare_chart_and_rest_values(chart_id,
- entity_type,
- metrics.values(),
- prc, entity_id)
- log.INFO("Deleting entity - metrics combo chart %s" % chart_name1)
- self.delete_chart(chart_name1)
Add Comment
Please, Sign In to add comment