Пример #1
0
 class form(View):  # noqa
     server = BootstrapSelect('server_id')
     save_button = Button('Save')
     reset_button = Button('Reset')
     cancel_button = Button('Cancel')
Пример #2
0
class ConfigManagementAddEntities(View):
    """The entities on the add page"""
    title = Text('//div[@id="main-content"]//h1')
    form = View.nested(ConfigManagementAddForm)
    add = Button('Add')
    cancel = Button('Cancel')
Пример #3
0
class TowerExplorerProviderToolbar(View):
    reload = Button(title='Refresh this page')
    configuration = Dropdown('Configuration')
    policy = Dropdown('Policy')
    download = Dropdown('Download')
    view_selector = View.nested(ItemsToolBarViewSelector)
Пример #4
0
class RequestsToolbar(View):
    """Toolbar on the requests view"""
    reload = Button(title=VersionPick({Version.lowest(): 'Reload the current display',
                                       '5.9': 'Refresh this page'}))
Пример #5
0
class RequestDetailsToolBar(RequestsView):
    copy = Button(title='Copy original Request')
    edit = Button(title='Edit the original Request')
    delete = Button(title='Delete this Request')
    approve = Button(title='Approve this Request')
    deny = Button(title='Deny this Request')
Пример #6
0
 class form(ProvDiagForm):  # noqa
     save = Button('Save')
     reset = Button('Reset')
Пример #7
0
class RequestsToolbar(View):
    """Toolbar on the requests view"""
    reload = Button(title='Reload the current display')
Пример #8
0
 class form(View):  # noqa
     policy = BootstrapSelect('policy_id')
     # TODO policies table, ability to remove
     cancel_button = Button('Cancel')
Пример #9
0
    class form(View):  # noqa
        """First page of provision form is image selection
        Second page of form is tabbed with nested views
        """
        image_table = Table('//div[@id="pre_prov_div"]//table')
        continue_button = Button('Continue')  # Continue button on 1st page, image selection
        submit_button = Button('Submit')  # Submit for 2nd page, tabular form
        cancel_button = Button('Cancel')

        def before_fill(self, values):
            # Provision from image is a two part form,
            # this completes the image selection before the tabular parent form is filled
            template_name = values.get('template_name',
                                       self.parent_view.context['object'].template_name)
            provider_name = self.parent_view.context['object'].provider.name
            try:
                row = self.image_table.row(name=template_name,
                                           provider=provider_name)
            except IndexError:
                raise TemplateNotFound('Cannot find template "{}" for provider "{}"'
                                       .format(template_name, provider_name))
            row.click()
            self.continue_button.click()
            # TODO timing, wait_displayed is timing out and can't get it to stop in is_displayed
            sleep(3)
            self.flush_widget_cache()

        @View.nested
        class request(Tab):  # noqa
            TAB_NAME = 'Request'
            email = Input(name='requester__owner_email')
            first_name = Input(name='requester__owner_first_name')
            last_name = Input(name='requester__owner_last_name')
            notes = Input(name='requester__request_notes')
            manager_name = Input(name='requester__owner_manager')

        @View.nested
        class purpose(Tab):  # noqa
            TAB_NAME = 'Purpose'
            apply_tags = VersionPick({
                Version.lowest(): CheckboxSelect('//div[@id="all_tags_treebox"]//ul'),
                '5.7': BootstrapTreeview('all_tags_treebox')})

        @View.nested
        class catalog(Tab):  # noqa
            TAB_NAME = 'Catalog'
            num_instances = BootstrapSelect('service__number_of_vms')
            vm_name = Input(name='service__vm_name')
            vm_description = Input(name='service__vm_description')
            vm_filter = BootstrapSelect('service__vm_filter')
            num_vms = BootstrapSelect('service__number_of_vms')
            catalog_name = Table('//div[@id="prov_vm_div"]/table')
            provision_type = BootstrapSelect('service__provision_type')
            linked_clone = Input(name='service__linked_clone')
            pxe_server = BootstrapSelect('service__pxe_server_id')
            pxe_image = Table('//div[@id="prov_pxe_img_div"]/table')
            iso_file = Table('//div[@id="prov_iso_img_div"]/table')

        @View.nested
        class environment(Tab):  # noqa
            TAB_NAME = 'Environment'

            automatic_placement = Checkbox(id='environment__placement_auto')
            # Cloud
            availability_zone = BootstrapSelect('environment__placement_availability_zone')
            cloud_network = BootstrapSelect('environment__cloud_network')
            cloud_subnet = BootstrapSelect('environment__cloud_subnet')
            security_groups = BootstrapSelect('environment__security_groups')
            resource_groups = BootstrapSelect('environment__resource_group')
            public_ip_address = BootstrapSelect('environment__floating_ip_address')
            # Infra
            provider_name = BootstrapSelect('environment__placement_ems_name')
            datacenter = BootstrapSelect('environment__placement_dc_name')
            cluster = BootstrapSelect('environment__placement_cluster_name')
            resource_pool = BootstrapSelect('environment__placement_rp_name')
            folder = BootstrapSelect('environment__placement_folder_name')
            host_filter = BootstrapSelect('environment__host_filter')
            host_name = Table('//div[@id="prov_host_div"]/table')
            datastore_create = Input('environment__new_datastore_create')
            datastore_filter = BootstrapSelect('environment__ds_filter')
            datastore_name = Table('//div[@id="prov_ds_div"]/table')

        @View.nested
        class hardware(Tab):  # noqa
            TAB_NAME = 'Hardware'
            num_sockets = BootstrapSelect('hardware__number_of_sockets')
            cores_per_socket = BootstrapSelect('hardware__cores_per_socket')
            num_cpus = BootstrapSelect('hardware__number_of_cpus')
            memory = BootstrapSelect('hardware__vm_memory')
            # TODO patternfly radio widget, RadioGroup doesn't apply here
            #  disk_format, hardware__disk_format')
            vm_limit_cpu = Input(name='hardware__cpu_limit')
            vm_limit_memory = Input(name='hardware__memory_limit')
            vm_reserve_cpu = Input(name='hardware__cpu_reserve')
            vm_reserve_memory = Input(name='hardware__memory_reserve')

        @View.nested
        class network(Tab):  # noqa
            TAB_NAME = 'Network'
            vlan = BootstrapSelect('network__vlan')

        @View.nested
        class properties(Tab):  # noqa
            TAB_NAME = 'Properties'
            instance_type = BootstrapSelect('hardware__instance_type')
            guest_keypair = BootstrapSelect('hardware__guest_access_key_pair')
            hardware_monitoring = BootstrapSelect('hardware__monitoring')
            boot_disk_size = BootstrapSelect('hardware__boot_disk_size')
            # GCE
            is_preemtible = VersionPick({
                Version.lowest(): None, '5.7': Input(name='hardware__is_preemptible')})

        @View.nested
        class customize(Tab):  # noqa
            TAB_NAME = 'Customize'
            # Common
            dns_servers = Input(name='customize__dns_servers')
            dns_suffixes = Input(name='customize__dns_suffixes')
            customize_type = BootstrapSelect('customize__sysprep_enabled')
            specification_name = Table('//div[@id="prov_vc_div"]/table')
            admin_username = Input(name='customize__root_username')
            admin_password = Input(name='customize__root_password')
            linux_host_name = Input(name='customize__linux_host_name')
            linux_domain_name = Input(name='customize__linux_domain_name')
            ip_address = Input(name='customize__ip_addr')
            subnet_mask = Input(name='customize__subnet_mask')
            gateway = Input(name='customize__gateway')
            custom_template = Table('//div[@id="prov_template_div"]/table')
            hostname = Input(name='customize__hostname')

        @View.nested
        class schedule(Tab):  # noqa
            TAB_NAME = 'Schedule'
            # Common
            # TODO radio widget # schedule_type = Radio('schedule__schedule_type')
            provision_date = Calendar('miq_date_1')
            provision_start_hour = BootstrapSelect('start_hour')
            provision_start_min = BootstrapSelect('start_min')
            power_on = Input(name='schedule__vm_auto_start')
            retirement = BootstrapSelect('schedule__retirement')
            retirement_warning = BootstrapSelect('schedule__retirement_warn')
            # Infra
            stateless = Input(name='schedule__stateless')
Пример #10
0
 class form(View):  # noqa
     user_name = BootstrapSelect('user_name')
     group_name = BootstrapSelect('group_name')
     save_button = Button('Save')
     reset_button = Button('Reset')
     cancel_button = Button('Cancel')
Пример #11
0
 class form(View):  # noqa
     policy_profiles = CheckableManageIQTree(tree_id='protectbox')
     save_button = Button('Save')
     reset_button = Button('Reset')
     cancel_button = Button('Cancel')
Пример #12
0
 class form(View):  # noqa
     policy_profiles = CheckableManageIQTree(tree_id='protectbox')
     entities = View.nested(BaseNonInteractiveEntitiesView)
     save_button = Button('Save')
     reset_button = Button('Reset')
     cancel_button = Button('Cancel')
Пример #13
0
 class toolbar(View):  # noqa
     all_attributes = Button(title="All attributes")
     different_values_attributes = Button(title="Attributes with different values")
     same_values_attributes = Button(title="Attributes with same values")
     details_mode = Button(title="Details Mode")
     exists_mode = Button(title="Exists Mode")
Пример #14
0
class TowerExplorerSystemJobTemplatesToolbar(View):
    reload = Button(title='Refresh this page')
    policy = Dropdown('Policy')
    download = Dropdown('Download')
    view_selector = View.nested(ItemsToolBarViewSelector)
Пример #15
0
 class form(View):  # noqa
     policy = BootstrapSelect('policy_id')
     # TODO policies table, ability to remove
     entities = View.nested(BaseNonInteractiveEntitiesView)
     cancel_button = Button('Cancel')
Пример #16
0
class DeploymentDetailsToolbar(View):
    """The toolbar on the details page"""
    policy = Dropdown('Policy')
    operations = Dropdown('Operations')
    download = Button(title='Download summary in PDF format')
Пример #17
0
 class form(ProvDiagForm):  # noqa
     add = Button('Add')
Пример #18
0
class JDRToolbar(View):
    """The toolbar on the JDR Reports list"""
    download_list = Dropdown('Download list of JDR')
    delete = Button('Delete')
    view_selector = View.nested(ItemsToolBarViewSelector)
Пример #19
0
class NodeDetailsToolBar(ProviderDetailsToolBar):
    web_console = Button('Web Console')
Пример #20
0
class DomainDetailsToolbar(View):
    """The toolbar on the details page"""
    policy = Dropdown('Policy')
    power = Dropdown('Power')
    download = Button(title='Download summary in PDF format')
Пример #21
0
class TasksView(BaseLoggedInPage):
    # Toolbar
    delete = Dropdown(
        'Delete Tasks')  # dropdown just has icon, use element title
    reload = Button(title=VersionPick({
        Version.lowest(): 'Reload the current display',
        '5.9': 'Refresh this page'
    }))

    @View.nested
    class tabs(View):  # noqa
        # Extra Toolbar
        # Only on 'All' type tabs, but for access it doesn't make sense to access the tab for a
        # toolbar button
        cancel = Button(title='Cancel the selected task')

        # Form Buttons
        apply = Button('Apply')
        reset = Button('Reset')
        default = Button('Default')

        # Filters
        zone = BootstrapSelect(id='chosen_zone')
        period = BootstrapSelect(id='time_period')
        user = BootstrapSelect(id='user_choice')
        # This checkbox search_root captures all the filter options
        # It will break for status if/when there is second checkbox selection field added
        # It's the lowest level div with an id that captures the status checkboxes
        status = CheckboxSelect(search_root='tasks_options_div')
        state = BootstrapSelect(id='state_choice')

        @View.nested
        class mytasks(Tab):  # noqa
            TAB_NAME = VersionPick({
                Version.lowest(): 'My VM and Container Analysis Tasks',
                '5.9': 'My Tasks'
            })
            table = Table('//div[@id="gtl_div"]//table')

        @View.nested
        class myothertasks(Tab):  # noqa
            TAB_NAME = VersionPick({
                '5.9': 'My Tasks',
                Version.lowest(): 'My Other UI Tasks'
            })
            table = Table('//div[@id="gtl_div"]//table')

        @View.nested
        class alltasks(Tab):  # noqa
            TAB_NAME = VersionPick({
                '5.9':
                'All Tasks',
                Version.lowest():
                "All VM and Container Analysis Tasks"
            })
            table = Table('//div[@id="gtl_div"]//table')

        @View.nested
        class allothertasks(Tab):  # noqa
            TAB_NAME = "All Other Tasks"
            table = Table('//div[@id="gtl_div"]//table')

    @property
    def is_displayed(self):
        return (self.tabs.mytasks.is_displayed
                and self.tabs.myothertasks.is_displayed
                and self.tabs.alltasks.is_displayed
                and self.tabs.allothertasks.is_displayed)
Пример #22
0
class MessagingDetailsToolbar(View):
    """The toolbar on the details page"""
    monitoring = Dropdown('Monitoring')
    policy = Dropdown('Policy')
    download = Button(title='Download summary in PDF format')
Пример #23
0
class RequestsToolbar(View):
    """Toolbar on the requests view"""
    reload = Button(title='Refresh this page')
Пример #24
0
class ServerGroupDetailsToolbar(View):
    """The toolbar on the details page"""
    policy = Dropdown('Policy')
    power = Dropdown('Power')
    deployments = Dropdown('Deployments')
    download = Button(title='Download summary in PDF format')
Пример #25
0
 class form(BasicProvisionFormView):  # noqa
     submit_button = Button('Submit')  # Submit for 2nd page, tabular form
     cancel_button = Button('Cancel')
Пример #26
0
 class form(BasicProvisionFormView):  # noqa
     submit_button = Button('Submit')
     cancel_button = Button('Cancel')
Пример #27
0
class ConfigManagementEntities(BaseEntitiesView):
    """The entities on the page"""
    table = Table("//div[@id='gtl_div']//table")
    add_button = Button('Add a Provider')
Пример #28
0
 class form(View):  # noqa
     policy_profile = BootstrapSelect("profile_id")
     # TODO policies table, ability to remove
     entities = View.nested(BaseNonInteractiveEntitiesView)
     cancel_button = Button("Cancel")