def resetter(self): tb.refresh() tb.select('List View') # Ensure no rows are checked if paginator.page_controls_exist(): sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def resetter(self): # Reset view and selection tb.select("Grid View") from cfme.web_ui import paginator if paginator.page_controls_exist(): paginator.check_all() paginator.uncheck_all()
def resetter(self): # Default list view tb.select('List View') if paginator.page_controls_exist(): # Make sure nothing is selected sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def reset_page(): tb.select("Grid View") if sel.is_displayed(search_box.search_field): search.ensure_normal_search_empty() if paginator.page_controls_exist(): # paginator.results_per_page(1000) sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def resetter(self): accordion.tree('Containers', version.pick({ version.LOWEST: 'All Containers', '5.7': 'All Containers (by Pods)', })) tb.select('List View') if paginator.page_controls_exist(): sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def resetter(self): # Reset view and selection tb = self.view.toolbar paginator = self.view.paginator if 'Grid View' not in tb.view_selector.selected: tb.view_selector.select('Grid View') if paginator.exists: paginator.check_all() paginator.uncheck_all()
def resetter(self): if version.current_version() < '5.8': self.view.Filters.tree.click_path('All Containers') else: self.view.Filters.Navigation.select('ALL (Default)') tb.select('List View') if paginator.page_controls_exist(): sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def resetter(self): if version.current_version() < '5.8': self.view.Filters.tree.click_path('All Containers') else: self.view.Filters.Navigation.select('ALL (Default)') tb.select('List View') from cfme.web_ui import paginator if paginator.page_controls_exist(): paginator.check_all() paginator.uncheck_all()
def resetter(self): accordion.tree( 'Containers', version.pick({ version.LOWEST: 'All Containers', '5.7': 'All Containers (by Pods)', })) tb.select('List View') if paginator.page_controls_exist(): sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def resetter(self): # Reset view and selection if version.current_version() >= '5.7': accordion.tree('Datastores', 'All Datastores') else: # todo: there is unsupported accordion in 5.6.3.3. currently it isn't necessary # for existing tests pass tb.select("Grid View") sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def resetter(self): # Reset view and selection if self.obj.appliance.version >= '5.7': accordion.tree('Datastores', 'All Datastores') else: # todo: there is unsupported accordion in 5.6.3.3. currently it isn't necessary # for existing tests pass tb.select("Grid View") if paginator.page_controls_exist(): sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def remove_all_pxe_servers(): """ Convenience function to remove all PXE servers """ logger.debug('Removing all PXE servers') navigate_to(PXEServer, 'All') navigate_to(PXEServer, 'All') # Yes we really do this twice. if sel.is_displayed(pxe_server_table_exist): from cfme.web_ui import paginator as pg pg.check_all() cfg_btn('Remove PXE Servers from the VMDB', invokes_alert=True) sel.handle_alert(cancel=False)
def delete_all_attached_vms(self): sel.force_navigate('infrastructure_datastore', context=self._get_context()) sel.click( details_page.infoblock.element("Relationships", "Managed VMs")) sel.click(pg.check_all()) cfg_btn("Remove selected items from the VMDB", invokes_alert=True) sel.handle_alert(cancel=False)
def delete_all_attached_hosts(self): sel.force_navigate('infrastructure_datastore', context=self._get_context()) sel.click(details_page.infoblock.element("Relationships", "Hosts")) sel.click(pg.check_all()) path = version.pick({ version.LOWEST: "Remove Hosts from the VMDB", "5.4": "Remove items from the VMDB"}) cfg_btn(path, invokes_alert=True) sel.handle_alert(cancel=False)
def remove_all_pxe_servers(): """ Convenience function to remove all PXE servers """ logger.debug('Removing all PXE servers') sel.force_navigate('infrastructure_pxe_servers') sel.force_navigate('infrastructure_pxe_servers') # Yes we really do this twice. if sel.is_displayed(pxe_server_table_exist): sel.click(pg.check_all()) cfg_btn('Remove PXE Servers from the VMDB', invokes_alert=True) sel.handle_alert(cancel=False)
def clear_container_providers(validate=True): sel.force_navigate("containers_providers") logger.debug("Checking for existing container providers...") total = paginator.rec_total() if total > 0: logger.info(" Providers exist, so removing all container providers") paginator.results_per_page("100") sel.click(paginator.check_all()) toolbar.select("Configuration", "Remove Containers Providers from the VMDB", invokes_alert=True) sel.handle_alert() if validate: wait_for_no_container_providers()
def clear_infra_providers(validate=True): sel.force_navigate('infrastructure_providers') logger.debug('Checking for existing infrastructure providers...') if paginator.rec_total(): logger.info(' Providers exist, so removing all infra providers') paginator.results_per_page('100') sel.click(paginator.check_all()) toolbar.select('Configuration', 'Remove Infrastructure Providers from the VMDB', invokes_alert=True) sel.handle_alert() if validate: wait_for_no_infra_providers()
def clear_middleware_providers(validate=True): sel.force_navigate('middleware_providers') total = paginator.rec_total() if total > 0: logger.info(' Providers exist, so removing all middleware providers') paginator.results_per_page('100') sel.click(paginator.check_all()) toolbar.select('Configuration', 'Remove Middleware Providers from the VMDB', invokes_alert=True) sel.handle_alert() if validate: wait_for_no_middleware_providers()
def clear_cloud_providers(validate=True): sel.force_navigate('clouds_providers') logger.debug('Checking for existing cloud providers...') total = paginator.rec_total() if total > 0: logger.info(' Providers exist, so removing all cloud providers') paginator.results_per_page('100') sel.click(paginator.check_all()) toolbar.select('Configuration', 'Remove Cloud Providers from the VMDB', invokes_alert=True) sel.handle_alert() if validate: wait_for_no_cloud_providers()
def clear_container_providers(validate=True): sel.force_navigate('containers_providers') logger.debug('Checking for existing container providers...') total = paginator.rec_total() if total > 0: logger.info(' Providers exist, so removing all container providers') paginator.results_per_page('100') sel.click(paginator.check_all()) toolbar.select('Configuration', 'Remove Containers Providers from the VMDB', invokes_alert=True) sel.handle_alert() if validate: wait_for_no_container_providers()
def clear_provider_by_type(prov_class, validate=True): string_name = BaseProvider.type_mapping[prov_class].values()[0].string_name navigate = "{}_providers".format(BaseProvider.type_mapping[prov_class].values()[0].page_name) sel.force_navigate(navigate) logger.debug('Checking for existing {} providers...'.format(prov_class)) total = paginator.rec_total() if total > 0: logger.info(' Providers exist, so removing all {} providers'.format(prov_class)) paginator.results_per_page('100') sel.click(paginator.check_all()) toolbar.select('Configuration', 'Remove {} Providers from the VMDB'.format(string_name), invokes_alert=True) sel.handle_alert() if validate: wait_for_no_providers_by_type(prov_class)
def clear_middleware_providers(validate=True): sel.force_navigate('middleware_providers') total = paginator.rec_total() if total > 0: logger.info(' Providers exist, so removing all middleware providers') # TODO: Fix. # TEXT: "Items per page" hidden and failed to click paginator items drop down selection # For the moment allow it go with default value 20 # paginator.results_per_page('100') sel.click(paginator.check_all()) toolbar.select('Configuration', 'Remove Middleware Providers from the VMDB', invokes_alert=True) sel.handle_alert() if validate: wait_for_no_middleware_providers()
def navigate_and_select_all_hosts(host_names, provider=None): """ Reduces some redundant code shared between methods """ if isinstance(host_names, basestring): host_names = [host_names] if provider: navigate_to(provider, 'ProviderNodes') else: navigate_to(Host, 'All') if paginator.page_controls_exist(): paginator.results_per_page(1000) sel.click(paginator.check_all()) else: for host_name in host_names: sel.check(Quadicon(host_name, 'host').checkbox())
def clear_provider_by_type(prov_class, validate=True): string_name = BaseProvider.type_mapping[prov_class].values()[0].string_name navigate = "{}_providers".format( BaseProvider.type_mapping[prov_class].values()[0].page_name) sel.force_navigate(navigate) logger.debug('Checking for existing {} providers...'.format(prov_class)) total = paginator.rec_total() if total > 0: logger.info(' Providers exist, so removing all {} providers'.format( prov_class)) paginator.results_per_page('100') sel.click(paginator.check_all()) toolbar.select('Configuration', 'Remove {} Providers from the VMDB'.format(string_name), invokes_alert=True) sel.handle_alert() if validate: wait_for_no_providers_by_type(prov_class)
def clear_provider_by_type(prov_class, validate=True): string_name = prov_class.string_name navigate_to(prov_class, 'All') logger.debug('Checking for existing {} providers...'.format(prov_class.type_tclass)) total = paginator.rec_total() if total > 0: logger.info(' Providers exist, so removing all {} providers'.format( prov_class.type_tclass)) paginator.results_per_page('100') sel.click(paginator.check_all()) tb.select( 'Configuration', { version.LOWEST: 'Remove {} Providers from the VMDB'.format(string_name), '5.7': 'Remove {} Providers'.format(string_name), }, invokes_alert=True) sel.handle_alert() if validate: prov_class.wait_for_no_providers_by_type(prov_class)
def resetter(self): tb.select('List View') if paginator.page_controls_exist(): sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def delete_all_templates(self): view = navigate_to(self, "TemplateType") sel.click(pg.check_all()) view.configuration.item_select("Remove selected Orchestration Templates", handle_alert=True)
def resetter(self): from cfme.web_ui import paginator tb.select('Grid View') paginator.check_all() paginator.uncheck_all()
def resetter(self): tb.select('Grid View') sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def delete_all_templates(self): view = navigate_to(self, "TemplateType") sel.click(pg.check_all()) view.configuration.item_select( "Remove selected Orchestration Templates", handle_alert=True)
def delete_all_templates(self): sel.force_navigate('orch_template_type', context={'template_type': self.template_type}) sel.click(pg.check_all()) cfg_btn("Remove selected Orchestration Templates", invokes_alert=True) sel.handle_alert()
def resetter(self): # Reset view and selection tb.select("List View") from cfme.web_ui import paginator paginator.check_all() paginator.uncheck_all()
def delete_all_templates(self): view = navigate_to(self, "TemplateType") from cfme.web_ui import paginator paginator.check_all() view.configuration.item_select( "Remove selected Orchestration Templates", handle_alert=True)
def delete_all_attached_vms(self): sel.force_navigate('infrastructure_datastore', context=self._get_context()) sel.click(details_page.infoblock.element("Relationships", "Managed VMs")) sel.click(pg.check_all()) cfg_btn("Remove selected items from the VMDB", invokes_alert=True) sel.handle_alert(cancel=False)
def reset_page(): tb.select("Grid View") if paginator.page_controls_exist(): # paginator.results_per_page(1000) sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def resetter(self): # Reset view and selection tb.select("Grid View") if paginator.page_controls_exist(): sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def resetter(self): # Reset view and selection accordion.tree('Datastores', 'All Datastores') tb.select("Grid View") sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def resetter(self): from cfme.web_ui import paginator tb.select('List View') if paginator.page_controls_exist(): paginator.check_all() paginator.uncheck_all()
def resetter(self): # Reset view and selection tb.select("List View") sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def resetter(self): # Reset view and selection tb.select("Grid View") sel.check(paginator.check_all()) sel.uncheck(paginator.check_all())
def delete_all_templates(self): view = navigate_to(self, "TemplateType") from cfme.web_ui import paginator paginator.check_all() view.configuration.item_select("Remove selected Orchestration Templates", handle_alert=True)