class EditableEntryCheckbox(EditableEntry): """Should be used in case :class:`EditableEntry` widget represented not by a field, but by checkbox. """ edit_field = Checkbox(locator=".//input[@type='checkbox']")
class media(SatVerticalTab): all_medias = Checkbox(id='location_ignore_types_medium') resources = MultiSelect(id='ms-location_medium_ids')
class VirtwhoConfigureCreateView(BaseLoggedInView): breadcrumb = BreadCrumb() name = TextInput(id='foreman_virt_who_configure_config_name') interval = FilteredDropdown( id='foreman_virt_who_configure_config_interval') satellite_url = TextInput( id='foreman_virt_who_configure_config_satellite_url') hypervisor_id = FilteredDropdown( id='foreman_virt_who_configure_config_hypervisor_id') debug = Checkbox(id='foreman_virt_who_configure_config_debug') proxy = FilteredDropdown( id='foreman_virt_who_configure_config_http_proxy_id') no_proxy = TextInput(id='foreman_virt_who_configure_config_no_proxy') filtering = FilteredDropdown( id='foreman_virt_who_configure_config_listing_mode') filtering_content = ConditionalSwitchableView(reference='filtering') hypervisor_type = FilteredDropdown( id='foreman_virt_who_configure_config_hypervisor_type') hypervisor_content = ConditionalSwitchableView(reference='hypervisor_type') submit = Text('//input[@name="commit"]') @hypervisor_content.register( lambda hypervisor_type: hypervisor_type.endswith( ('(esx)', '(rhevm)', '(hyperv)', '(xen)'))) class HypervisorForm(View): server = TextInput( id='foreman_virt_who_configure_config_hypervisor_server') username = TextInput( id='foreman_virt_who_configure_config_hypervisor_username') password = TextInput( id='foreman_virt_who_configure_config_hypervisor_password') @hypervisor_content.register('libvirt') class LibvirtForm(View): server = TextInput( id='foreman_virt_who_configure_config_hypervisor_server') username = TextInput( id='foreman_virt_who_configure_config_hypervisor_username') @hypervisor_content.register('Container-native virtualization') class KubevirtForm(View): server = TextInput( id='foreman_virt_who_configure_config_hypervisor_server') kubeconfig = TextInput( id='foreman_virt_who_configure_config_kubeconfig_path') @hypervisor_content.register('Nutanix AHV (ahv)') class NutanixForm(View): server = TextInput( id='foreman_virt_who_configure_config_hypervisor_server') username = TextInput( id='foreman_virt_who_configure_config_hypervisor_username') password = TextInput( id='foreman_virt_who_configure_config_hypervisor_password') prism_flavor = FilteredDropdown( id='foreman_virt_who_configure_config_prism_flavor') filtering_content = ConditionalSwitchableView(reference='prism_flavor') @filtering_content.register('Unlimited', default=True) class FilterUnlimitedForm(View): pass @filtering_content.register('Whitelist') class FilterWhitelistForm(View): filter_hosts = TextInput( id='foreman_virt_who_configure_config_whitelist') filter_host_parents = TextInput( id='foreman_virt_who_configure_config_filter_host_parents') @filtering_content.register('Blacklist') class FilterBlacklistForm(View): exclude_hosts = TextInput( id='foreman_virt_who_configure_config_blacklist') exclude_host_parents = TextInput( id='foreman_virt_who_configure_config_exclude_host_parents') @property def is_displayed(self): breadcrumb_loaded = self.browser.wait_for_element(self.breadcrumb, exception=False) return (breadcrumb_loaded and self.breadcrumb.locations[0] == 'Satellite Virt Who Configure Configs' and self.breadcrumb.read() == 'New Virt-who Config')
class users(SatVerticalTab): all_users = Checkbox(id='location_ignore_types_user') resources = MultiSelect(id='ms-location_user_ids')
class subnets(SatVerticalTab): all_subnets = Checkbox(id='location_ignore_types_subnet') resources = MultiSelect(id='ms-location_subnet_ids')
class domains(SatVerticalTab): all_domains = Checkbox(id='location_ignore_types_domain') resources = MultiSelect(id='ms-location_domain_ids')
class environments(SatVerticalTab): all_environments = Checkbox(id='location_ignore_types_environment') resources = MultiSelect(id='ms-location_environment_ids')
class schedule(Tab): # noqa when_provision = SummaryFormItem('Schedule Info', 'When to Provision') stateless = Checkbox(name='shedule__stateless') power_on = SummaryFormItem('Lifespan', 'Power on virtual machines after creation') retirement = SummaryFormItem('Lifespan', 'Time until Retirement') retirement_warning = SummaryFormItem('Lifespan', 'Retirement Warning')
class TestForm(View): h3 = Text('.//h3') input1 = TextInput(name='input1') input2 = Checkbox(id='input2') input3 = ColourInput(id='colourinput') fileinput = FileInput(id='fileinput')
class modal(View): # noqa tree = ManageIQTree('automate_treebox') include_domain = Checkbox(id='include_domain_prefix_chk') apply = Button('Apply') cancel = Button('Cancel')
class properties(Tab): # noqa instance_type = SummaryFormItem('Properties', 'Instance Type') boot_disk_size = SummaryFormItem('Properties', 'Boot Disk Size ') is_preemtible = Checkbox(name='hardware__is_preemptible')
class add_tab(AddTab): table = SatSubscriptionsTable( locator=".//table", column_widgets={0: Checkbox(locator=".//input[@type='checkbox']")})
class list_remove_tab(ListRemoveTab): table = SatSubscriptionsTable( locator=".//table", column_widgets={0: Checkbox(locator=".//input[@type='checkbox']")})
class charts(WaitTab): # noqa chart_type = BootstrapSelect("chosen_graph") chart_mode = BootstrapSelect("chart_mode") values_to_show = BootstrapSelect("chosen_count") sum_other_values = Checkbox("chosen_other")
class email(View): # noqa # Email emails_send = Checkbox("send_email_cb") from_email = TextInput(name="from") to_emails = AlertEmail() user_email = VolatileBootstrapSelect("user_email")
class Nested2(View): input2 = Checkbox(id='input2')
class partition_tables(SatVerticalTab): TAB_NAME = 'Partition Tables' all_ptables = Checkbox(id='location_ignore_types_ptable') resources = MultiSelect(id='ms-location_ptable_ids')
class TestForm2(View): caption = View.include(TestForm1) input1 = TextInput(name='input1') input2 = Checkbox(id='input2')
class realms(SatVerticalTab): all_realms = Checkbox(id='location_ignore_types_realm') resources = MultiSelect(id='ms-location_realm_ids')
class FooView(View): widget1 = Checkbox(id="switchabletesting-3")
class host_groups(SatVerticalTab): TAB_NAME = 'Host Groups' all_hostgroups = Checkbox(id='location_ignore_types_hostgroup') resources = MultiSelect(id='ms-location_hostgroup_ids')
class BarView(View): widget2 = Checkbox(id="switchabletesting-4")
class capsules(SatVerticalTab): all_capsules = Checkbox(id='location_ignore_types_smartproxy') resources = MultiSelect(id='ms-location_smart_proxy_ids')
class ParentView(View): h3 = Text('//h3[@id="switchabletesting-1"]') checkbox1 = Checkbox(id="switchabletesting-3") checkbox2 = Checkbox(id="switchabletesting-4")
class compute_resources(SatVerticalTab): TAB_NAME = 'Compute Resources' all_resources = Checkbox(id='location_ignore_types_computeresource') resources = MultiSelect(id='ms-location_compute_resource_ids')
class TestForm(View): h3 = Text(".//h3", log_on_fill_unspecified=False) input1 = TextInput(name="input1") input2 = Checkbox(id="input2") fileinput = FileInput(id="fileinput")
class provisioning_templates(SatVerticalTab): TAB_NAME = 'Provisioning Templates' all_templates = Checkbox( id='location_ignore_types_provisioningtemplate') resources = MultiSelect(id='ms-location_provisioning_template_ids')
class email_options(View): # noqa # Email Options send_if_empty = Checkbox("send_if_empty") send_txt = Checkbox("send_txt") send_csv = Checkbox("send_csv") send_pdf = Checkbox("send_pdf")
class inventory(View): # noqa localhost = Checkbox(id="inventory_localhost") target_machine = Checkbox(id="inventory_event_target") specific_hosts = Checkbox(id="inventory_manual") hosts = Input(name="hosts")
class type(SatTab): snippet = Checkbox(id='report_template_snippet')