<s> from openstack_dashboard . test . integration_tests . pages import basepage <EOL> from openstack_dashboard . test . integration_tests . regions import forms <EOL> from openstack_dashboard . test . integration_tests . regions import tables <EOL> class HostAggregatesTable ( tables . TableRegion ) : <EOL> name = "<STR_LIT>" <EOL> CREATE_HOST_AGGREGATE_FORM_FIELDS = ( ( "<STR_LIT:name>" , <EOL> "<STR_LIT>" ) , ) <EOL> @ tables . bind_table_action ( '<STR_LIT>' ) <EOL> def create_host_aggregate ( self , create_button ) : <EOL> create_button . click ( ) <EOL> return forms . TabbedFormRegion ( self . driver , self . conf , <EOL> field_mappings = self . <EOL> CREATE_HOST_AGGREGATE_FORM_FIELDS ) <EOL> @ tables . bind_table_action ( '<STR_LIT>' ) <EOL> def delete_host_aggregate ( self , delete_button ) : <EOL> delete_button . click ( ) <EOL> return forms . BaseFormRegion ( self . driver , self . conf , None ) <EOL> @ tables . bind_row_action ( '<STR_LIT>' ) <EOL> def update_host_aggregate ( self , edit_host_aggregate_button , row ) : <EOL> edit_host_aggregate_button . click ( ) <EOL> pass <EOL> @ tables . bind_row_action ( '<STR_LIT>' ) <EOL> def modify_access ( self , manage_button , row ) : <EOL> manage_button . click ( ) <EOL> pass <EOL> class HostaggregatesPage ( basepage . BaseNavigationPage ) : <EOL> HOST_AGGREGATES_TABLE_NAME_COLUMN = '<STR_LIT:name>' <EOL> def __init__ ( self , driver , conf ) : <EOL> super ( HostaggregatesPage , self ) . __init__ ( driver , conf ) <EOL> self . _page_title = "<STR_LIT>" <EOL> @ property <EOL> def host_aggregates_table ( self ) : <EOL> return HostAggregatesTable ( self . driver , self . conf ) <EOL> def _get_host_aggregate_row ( self , name ) : <EOL> return self . host_aggregates_table . get_row ( <EOL> self . HOST_AGGREGATES_TABLE_NAME_COLUMN , name ) <EOL> def create_host_aggregate ( self , name , availability_zone ) : <EOL> create_host_aggregate_form = self . host_aggregates_table . create_host_aggregate ( ) <EOL> create_host_aggregate_form . name . text = name <EOL> create_host_aggregate_form . availability_zone . text = availability_zone <EOL> create_host_aggregate_form . submit ( ) <EOL> def delete_host_aggregate ( self , name ) : <EOL> row = self . _get_host_aggregate_row ( name ) <EOL> row . mark ( ) <EOL> modal_confirmation_form = self . host_aggregates_table . delete_host_aggregate ( ) <EOL> modal_confirmation_form . submit ( ) <EOL> def is_host_aggregate_present ( self , name ) : <EOL> return bool ( self . _get_host_aggregate_row ( name ) ) </s>
