예제 #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())
예제 #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()
예제 #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())
예제 #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())
예제 #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())
예제 #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()
예제 #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())
예제 #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()
예제 #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())
예제 #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())
예제 #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())
예제 #13
0
파일: pxe.py 프로젝트: dajohnso/cfme_tests
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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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()
예제 #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()
예제 #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()
예제 #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()
예제 #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()
예제 #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()
예제 #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)
예제 #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()
예제 #26
0
파일: host.py 프로젝트: jteehan/cfme_tests
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())
예제 #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)
예제 #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)
예제 #29
0
 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)
예제 #31
0
 def resetter(self):
     from cfme.web_ui import paginator
     tb.select('Grid View')
     paginator.check_all()
     paginator.uncheck_all()
예제 #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)
예제 #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()
예제 #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()
예제 #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)
예제 #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)
예제 #38
0
 def resetter(self):
     from cfme.web_ui import paginator
     tb.select('Grid View')
     paginator.check_all()
     paginator.uncheck_all()
예제 #39
0
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())
예제 #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()
예제 #41
0
파일: image.py 프로젝트: rananda/cfme_tests
 def resetter(self):
     tb.select('Grid View')
     sel.check(paginator.check_all())
     sel.uncheck(paginator.check_all())
예제 #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())
예제 #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())
예제 #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()
예제 #45
0
 def resetter(self):
     # Reset view and selection
     tb.select("List View")
     sel.check(paginator.check_all())
     sel.uncheck(paginator.check_all())
예제 #46
0
 def resetter(self):
     tb.select('List View')
     if paginator.page_controls_exist():
         sel.check(paginator.check_all())
         sel.uncheck(paginator.check_all())
예제 #47
0
 def resetter(self):
     # Reset view and selection
     tb.select("Grid View")
     sel.check(paginator.check_all())
     sel.uncheck(paginator.check_all())
예제 #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()
예제 #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()
예제 #50
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)