コード例 #1
0
        'description_text', "//input[@id='description']"
    ), ('display_checkbox', "//input[@id='display']"
        ), ('select_catalog', Select("//select[@id='catalog_id']")
            ), ('select_dialog', Select("//select[@id='dialog_id']")
                ), ('edit_button', "//img[@alt='Save Changes']")])

detail_form = Form(fields=[('long_desc',
                            "//textarea[@id='long_description']")])

request_form = tabstrip.TabStripForm(tab_fields=OrderedDict(
    [('Catalog', [
        ('num_instances',
         web_ui.Select('//select[@id="service__number_of_vms"]')),
        ('instance_name', '//input[@name="service__vm_name"]'),
        ('instance_description', '//textarea[@id="service__vm_description"]'),
        ('catalog_name', web_ui.Table('//div[@id="prov_vm_div"]/table')),
    ]),
     ('Environment', [
         ('automatic_placement',
          '//input[@id="environment__placement_auto"]'),
         ('availability_zone',
          web_ui.Select(
              '//select[@id="environment__placement_availability_zone"]')),
         ('security_groups', prov.select_security_group),
         ('public_ip_address',
          web_ui.Select('//select[@id="environment__floating_ip_address"]')),
     ]),
     ('Properties', [
         ('instance_type',
          web_ui.Select('//select[@id="hardware__instance_type"]')),
         ('guest_keypair',
コード例 #2
0
ファイル: provisioning.py プロジェクト: jdemon519/cfme_tests
            ui.BootstrapTreeview('all_tags_treebox')
        })]),
        (
            'Catalog',
            [
                # Cloud
                ('num_instances', AngularSelect('service__number_of_vms')),
                ('instance_name', '//input[@name="service__vm_name"]'),
                ('instance_description', ui.Input('service__vm_description')),

                # Infra
                ('vm_filter', AngularSelect('service__vm_filter')),
                ('num_vms', AngularSelect('service__number_of_vms')),
                ('vm_name', '//input[@name="service__vm_name"]'),
                ('vm_description', ui.Input('service__vm_description')),
                ('catalog_name', ui.Table('//div[@id="prov_vm_div"]/table')),
                ('provision_type', AngularSelect('service__provision_type')),
                ('linked_clone', ui.Input('service__linked_clone')),
                ('pxe_server', AngularSelect('service__pxe_server_id')),
                ('pxe_image', ui.Table('//div[@id="prov_pxe_img_div"]/table')),
                ('iso_file', ui.Table('//div[@id="prov_iso_img_div"]/table'))
            ]),
        (
            'Environment',
            [
                ('automatic_placement',
                 ui.Input('environment__placement_auto')),

                # Cloud
                ('cloud_tenant', AngularSelect('environment__cloud_tenant')),
                ('availability_zone',
コード例 #3
0
"""Provisioning-related forms and domain classes.

"""
from collections import OrderedDict
from cfme.services import requests
from cfme.fixtures import pytest_selenium as sel
from cfme import web_ui as ui
from cfme.web_ui.menu import nav
from cfme.web_ui import accordion, tabstrip, toolbar, paginator
from utils.update import Updateable
from utils.wait import wait_for

template_select_form = ui.Form(fields=[(
    'template_table', ui.Table('//div[@id="pre_prov_div"]/fieldset/table')
), ('continue_button',
    '//img[@title="Continue"]'), ('cancel_button',
                                  '//img[@title="Continue"]')])


def select_security_group(sg):
    '''Workaround for select box that is immediately replaced by the same
       select box no matter what selenium clicks on (but works fine
       manually).  For now only selects one item even though it's a
       multiselect.

    '''
    val = sel.get_attribute(
        "//select[@id='environment__security_groups']/option[.='%s']" % sg,
        'value')
    sel.browser().execute_script(
        "$j('#environment__security_groups').val('%s');"
コード例 #4
0
from utils import version
from utils.log import logger
from utils.version import current_version
from utils.wait import wait_for

# nav imports
import cfme.infrastructure.virtual_machines  # NOQA
import cfme.cloud.instance  # NOQA


instances_by_provider_tree = ui.Tree("ul.dynatree-container")
submit_button = form_buttons.FormButton("Submit")

template_select_form = ui.Form(
    fields=[
        ('template_table', ui.Table('//div[@id="pre_prov_div"]//table')),
        ('cancel_button', form_buttons.cancel)
    ]
)


def select_security_group(sg):
    """Workaround for select box that is immediately replaced by the same
       select box no matter what selenium clicks on (but works fine
       manually).  For now only selects one item even though it's a
       multiselect.

    """
    val = sel.get_attribute(
        "//select[@id='environment__security_groups']/option[normalize-space(.)='%s']" % sg,
        'value')