コード例 #1
0
 class schedule(Tab):  # noqa
     TAB_NAME = 'Schedule'
     # Common
     schedule_type = RadioGroup(locator=('//div[@id="schedule"]'
                                         '//div[./div[contains(@class, "radio")]]'))
     provision_date = Calendar('miq_date_1')
     provision_start_hour = BootstrapSelect('start_hour')
     provision_start_min = BootstrapSelect('start_min')
     power_on = Checkbox(name='schedule__vm_auto_start')
     retirement = BootstrapSelect('schedule__retirement')
     retirement_warning = BootstrapSelect('schedule__retirement_warn')
     # Infra
     stateless = Input(name='schedule__stateless')
コード例 #2
0
    class catalog(WaitTab):  # noqa
        TAB_NAME = 'Catalog'

        # Filling catalog template first so that environment tab gets enough time to load
        catalog_name = SelectTable('//div[@id="prov_vm_div"]/table')
        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')
        provision_type = BootstrapSelect('service__provision_type')
        linked_clone = Checkbox(name='service__linked_clone')
        pxe_server = BootstrapSelect('service__pxe_server_id')
        pxe_image = SelectTable('//div[@id="prov_pxe_img_div"]/table')
        iso_file = SelectTable('//div[@id="prov_iso_img_div"]/table')
コード例 #3
0
class InfraProvidersDiscoverView(BaseLoggedInPage):
    """
     Discover View from Infrastructure Providers page
    """
    title = Text('//div[@id="main-content"]//h1')

    vmware = Checkbox('discover_type_virtualcenter')
    scvmm = Checkbox('discover_type_scvmm')
    rhevm = Checkbox('discover_type_rhevm')

    from_ip1 = Input('from_first')
    from_ip2 = Input('from_second')
    from_ip3 = Input('from_third')
    from_ip4 = Input('from_fourth')
    to_ip4 = Input('to_fourth')

    start = Button('Start')
    cancel = Button('Cancel')

    @property
    def is_displayed(self):
        return (self.logged_in_as_current_user and
                self.navigation.currently_selected == ['Compute', 'Infrastructure', 'Providers'] and
                self.title.text == 'Infrastructure Providers Discovery')
コード例 #4
0
 class files(WaitTab):  # noqa
     TAB_NAME = 'File'
     tab_form = DynamicTable(
         locator=
         './/h3[normalize-space(.)="File Entry"]/following-sibling::table',
         column_widgets={
             'Name':
             TextInput(id='entry_fname'),
             'Collect Contents?':
             Checkbox(id='entry_content'),
             'Actions':
             Button(title='Add this entry', classes=table_button_classes)
         },
         assoc_column='Name',
         rows_ignore_top=1,
         action_row=0)
コード例 #5
0
class ScheduleAddEditEntities(View):
    """ Schedule configuration fields on the shedule configuration page """
    # Basic Information
    name = Input(name="name")
    description = Input(name="description")
    active = Checkbox("enabled")
    # Action type
    action_type = BootstrapSelect('action_typ')
    items_analysis = View.nested(ItemsAnalysisEntities)
    database_backup = View.nested(DatabaseBackupEntities)
    # Timer
    run_type = BootstrapSelect("timer_typ")
    time_zone = BootstrapSelect("time_zone")
    start_date = Calendar("start_date")
    start_hour = BootstrapSelect("start_hour")
    start_minute = BootstrapSelect("start_min")
コード例 #6
0
    class count_form_view(View):  # noqa
        type = BootstrapSelect("chosen_typ")
        count = BootstrapSelect("chosen_count")
        key = BootstrapSelect("chosen_key")
        value = Input(name="chosen_value")
        user_input = Checkbox(name="user_input")

        def fill(self, values):
            # todo: replace with FillWaitDisplayed mixin
            updated = []
            for widget_name in self.widget_names:
                if widget_name in values:
                    widget = getattr(self, widget_name)
                    value = values[widget_name]
                    widget.wait_displayed("2s")
                    updated.append(widget.fill(value))
            return any(updated)
コード例 #7
0
ファイル: ui.py プロジェクト: tkhamis/integration_tests
class AutomateSimulationView(BaseLoggedInPage):
    @property
    def is_displayed(self):
        return (
            self.logged_in_as_current_user and
            self.navigation.currently_selected == automate_menu_name(
                self.context['object'].appliance) + ['Simulation'])

    instance = BootstrapSelect('instance_name')
    message = Input(name='object_message')
    request = Input(name='object_request')
    target_type = BootstrapSelect('target_class')
    target_object = BootstrapSelect('target_id')
    execute_methods = Checkbox(name='readonly')
    avp = AttributeValueForm('attribute_', 'value_')

    submit_button = Button(title='Submit Automation Simulation with the specified options')

    result_tree = ManageIQTree(tree_id='ae_simulation_treebox')
コード例 #8
0
class CloudProviderAddView(ProviderAddView):
    """
     represents Cloud Provider Add View
    """
    # bug in cfme this field has different ids for cloud and infra add views
    prov_type = BootstrapSelect(id='ems_type')
    region = BootstrapSelect(id='provider_region')  # Azure/AWS/GCE
    tenant_id = Input('azure_tenant_id')  # only for Azure
    subscription = Input('subscription')  # only for Azure
    project_id = Input('project')  # only for Azure
    # bug in cfme this field has different ids for cloud and infra add views
    api_version = BootstrapSelect(id='ems_api_version')  # only for OpenStack
    infra_provider = BootstrapSelect(id='ems_infra_provider_id')  # OpenStack only
    tenant_mapping = Checkbox(name='tenant_mapping_enabled')  # OpenStack only

    @property
    def is_displayed(self):
        return (super(CloudProviderAddView, self).is_displayed and
                self.navigation.currently_selected == ['Compute', 'Clouds', 'Providers'] and
                self.title.text == 'Add New Cloud Provider')
コード例 #9
0
 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')
     cloud_tenant = BootstrapSelect('environment__cloud_tenant')  # exists for azure in catalogs
     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 = SelectTable('//div[@id="prov_host_div"]/table')
     datastore_create = Input('environment__new_datastore_create')
     datastore_filter = BootstrapSelect('environment__ds_filter')
     datastore_name = SelectTable('//div[@id="prov_ds_div"]/table')
コード例 #10
0
class RedHatUpdatesEditView(RegionView):
    title = Text('//div[@id="main-content"]//h3[1]')

    register_to = BootstrapSelect(id='register_to')
    url = Input('server_url')
    repo_name = Input('repo_name')
    use_proxy = Checkbox('use_proxy')  # Could be checkbox
    proxy_url = Input('proxy_address')
    proxy_username = Input('proxy_userid')
    proxy_password = Input('proxy_password')
    proxy_password_verify = Input('proxy_password2')
    username = Input('customer_userid')
    password = Input('customer_password')
    password_verify = Input('customer_password2')

    repo_default_name = Button(id='repo_default_name')
    rhn_default_url = Button(id='rhn_default_button')

    validate = Button('Validate')
    reset = Button('Reset')
    save = Button('Save')
    cancel = Button('Cancel')
コード例 #11
0
class ScheduleAddEditEntities(View):
    """ Schedule configuration fields on the shedule configuration page """
    # Basic Information
    name = Input(name="name")
    description = Input(name="description")
    active = Checkbox("enabled")
    # Action type
    action_type = BootstrapSelect('action_typ')
    items_analysis = View.nested(ItemsAnalysisEntities)
    database_backup = View.nested(DatabaseBackupEntities)
    # Timer
    run_type = BootstrapSelect("timer_typ")
    time_zone = BootstrapSelect("time_zone")
    start_date = Calendar("start_date")
    start_hour = BootstrapSelect("start_hour")
    start_minute = BootstrapSelect("start_min")

    # After selecting action_type == automation tasks
    request = Input(name='object_request')
    object_type = BootstrapSelect('target_class')
    object_selection = BootstrapSelect('target_id')
    attribute_value_pairs = AttributeValueForm("attribute_", "value_")
コード例 #12
0
 class tag_form_view(View):  # noqa
     type = BootstrapSelect("chosen_typ")
     tag = BootstrapSelect("chosen_tag")
     value = BootstrapSelect("chosen_value")
     user_input = Checkbox(name="user_input")
コード例 #13
0
 class options(View):  # noqa
     out_of_scope = Checkbox(name="out_of_scope")
     show_successful = Checkbox(name="passed")
     show_failed = Checkbox(name="failed")
コード例 #14
0
 class count_form_view(View):  # noqa
     type = BootstrapSelect("chosen_typ")
     count = BootstrapSelect("chosen_count")
     key = BootstrapSelect("chosen_key")
     value = Input(name="chosen_value")
     user_input = Checkbox(name="user_input")
コード例 #15
0
 class field_form_view(View):  # noqa
     type = BootstrapSelect("chosen_typ")
     field = BootstrapSelect("chosen_field")
     key = BootstrapSelect("chosen_key")
     value = Input(name="chosen_value")
     user_input = Checkbox(name="user_input")