cfme.web_ui.utilization module

class cfme.web_ui.utilization.Legend(name, legend_object)[source]

Bases: object

This class used to control/read legends

is_active

Returns True if the legend is on active state, otherwise False

name

User friendly name of the legend

set_active(active=True)[source]

Enable or Disable legend

Parameters:active – When we set True, Enables the legend. When we set False disables the legend. Default True
class cfme.web_ui.utilization.LineChart(chart_id, name, utilization_object)[source]

Bases: object

LineChart supports to do actions on line chart

LEGENDS = "//*[name()='g']//*[contains(@class, 'c3-legend-item ') or @class='c3-legend-item']"
__iter__()[source]

This enables you to iterate through like it was a dictionary, just without .iteritems

has_warning
is_on_chart_page

Returns True we we are in detailed chart page, otherwise False

key_ui_table_map = {'durable_subscripti': 'durable_subscription_count', 'non_durable_subscr': 'non_durable_subscription_count', 'non_durable_messag': 'non_durable_messages_count', 'delivering_message': 'delivering_message_count'}
legends

Returns available legends on chart

list_data_chart(raw=False)[source]

Returns list of data from chart

list_data_mgmt()[source]

Returns data from wrapanapi for the chart option selected

list_data_table(raw=False)[source]

Returns list of data from table

load_chart_reference(force_reload=False)[source]

Takes current page to chart detailed page

num_legend(only_enabled=True)[source]

Returns number of available legends on chart :param only_enabled: by default True, returns only enabled count when we pass True

option

Gives option object as property

class cfme.web_ui.utilization.Option(o)[source]

Bases: object

Option class used to control options on chart page

DD_BASE = "//dt[normalize-space(.)='{}']/following-sibling::dd"
IN_DAILY = 'Daily'
IN_HOURLY = 'Hourly'
IN_MOST_RECENT_HOUR = 'Most Recent Hour'
MN_10_MINUTE = '10 Minutes'
MN_15_MINUTE = '15 Minutes'
MN_30_MINUTE = '30 Minutes'
MN_45_MINUTE = '45 Minutes'
MN_60_MINUTE = '1 Hour'
RANGE = "//dt[normalize-space(.)='Range']/following-sibling::dd"
TIME_PROFILE = "//dt[normalize-space(.)='Time Profile']/following-sibling::dd"
WK_1_WEEK = '1 Week'
WK_2_WEEK = '2 Weeks'
WK_3_WEEK = '3 Weeks'
WK_4_WEEK = '4 Weeks'
get_date()[source]

Returns selected date from options

get_interval(force_visible_text=False)[source]

Returns selected interval from options

Parameters:force_visible_text – default it is False and returns internal value. If you want to get visible text pass this value as True
get_minute(force_visible_text=False)[source]

Returns selected minute from options

Parameters:force_visible_text – default it is False and returns internal value. If you want to get visible text pass this value as True
get_range()[source]

Returns selected range from options

get_time_profile()[source]

Returns selected time profile from options

get_week(force_visible_text=False)[source]

Returns selected week from options

Parameters:force_visible_text – default it is False and returns internal value. If you want to get visible text pass this value as True
set_by_value(op_interval=None, op_date=None, op_week=None, op_minute=None)[source]

Set options by internal value :param op_minute: Minute option :param op_date: Date option, date format should be as ‘MM/DD/YYYY’, ie: 11/21/2016 :param op_interval: Set interval :param op_week: Set week

set_by_visible_text(op_interval=None, op_date=None, op_week=None, op_minute=None)[source]

Set options by visible text :param op_minute: Minute option :param op_date: Date option, date format should be as ‘MM/DD/YYYY’, ie: 11/21/2016 :param op_interval: Set interval :param op_week: Set week

to_string()[source]

Returns selected options as string

class cfme.web_ui.utilization.Utilization(o)[source]

Bases: object

Utilization class is the top level class for chart management in Middleware. We have to create Utilization with reference of any page which has Utilization >> Monitoring tab. Reference page must have implemented load_utilization_page() function which will take to Monitoring page.

__iter__()[source]

This enables you to iterate through like it was a dictionary, just without .iteritems

charts

Returns available charts on monitoring page

load_utilization_page(refresh=True)[source]
page

Returns page object of caller

reload(force_reload=False)[source]

Reload the entire page

cfme.web_ui.utilization.round_double(value, precision=2)[source]

Round double value with precision limit

cfme.web_ui.utilization.value_of(text_value, remove_comma=True)[source]

Converts string value to Int, Float or String :param remove_comma: When we set this value as True, :param removes all comma from the string. Default True: