Esempio n. 1
0
 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())
Esempio n. 2
0
 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()
Esempio n. 3
0
 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())
Esempio n. 5
0
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())
Esempio n. 6
0
 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())
Esempio n. 7
0
 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()
Esempio n. 8
0
 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())
Esempio n. 9
0
 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()
Esempio n. 10
0
 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())
Esempio n. 11
0
 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())
Esempio n. 12
0
 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())
Esempio n. 13
0
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)
Esempio n. 14
0
 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)
Esempio n. 15
0
 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)
Esempio n. 16
0
 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)
Esempio n. 17
0
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)
Esempio n. 18
0
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()
Esempio n. 19
0
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()
Esempio n. 20
0
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()
Esempio n. 21
0
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()
Esempio n. 22
0
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()
Esempio n. 23
0
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()
Esempio n. 24
0
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)
Esempio n. 25
0
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()
Esempio n. 26
0
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())
Esempio n. 27
0
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)
Esempio n. 28
0
 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)
Esempio n. 31
0
 def resetter(self):
     from cfme.web_ui import paginator
     tb.select('Grid View')
     paginator.check_all()
     paginator.uncheck_all()
Esempio n. 32
0
 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)
Esempio n. 34
0
 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()
Esempio n. 35
0
 def resetter(self):
     # Reset view and selection
     tb.select("List View")
     from cfme.web_ui import paginator
     paginator.check_all()
     paginator.uncheck_all()
Esempio n. 36
0
 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)
Esempio n. 37
0
 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)
Esempio n. 38
0
 def resetter(self):
     from cfme.web_ui import paginator
     tb.select('Grid View')
     paginator.check_all()
     paginator.uncheck_all()
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())
Esempio n. 40
0
 def resetter(self):
     # Reset view and selection
     tb.select("List View")
     from cfme.web_ui import paginator
     paginator.check_all()
     paginator.uncheck_all()
Esempio n. 41
0
 def resetter(self):
     tb.select('Grid View')
     sel.check(paginator.check_all())
     sel.uncheck(paginator.check_all())
Esempio n. 42
0
 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())
Esempio n. 43
0
 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())
Esempio n. 44
0
 def resetter(self):
     from cfme.web_ui import paginator
     tb.select('List View')
     if paginator.page_controls_exist():
         paginator.check_all()
         paginator.uncheck_all()
Esempio n. 45
0
 def resetter(self):
     # Reset view and selection
     tb.select("List View")
     sel.check(paginator.check_all())
     sel.uncheck(paginator.check_all())
Esempio n. 46
0
 def resetter(self):
     tb.select('List View')
     if paginator.page_controls_exist():
         sel.check(paginator.check_all())
         sel.uncheck(paginator.check_all())
Esempio n. 47
0
 def resetter(self):
     # Reset view and selection
     tb.select("Grid View")
     sel.check(paginator.check_all())
     sel.uncheck(paginator.check_all())
Esempio n. 48
0
 def resetter(self):
     from cfme.web_ui import paginator
     tb.select('List View')
     if paginator.page_controls_exist():
         paginator.check_all()
         paginator.uncheck_all()
Esempio n. 49
0
 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 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)