当前位置: 首页>>代码示例>>Python>>正文


Python ButtonGroup.type方法代码示例

本文整理汇总了Python中cfme.automate.buttons.ButtonGroup.type方法的典型用法代码示例。如果您正苦于以下问题:Python ButtonGroup.type方法的具体用法?Python ButtonGroup.type怎么用?Python ButtonGroup.type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cfme.automate.buttons.ButtonGroup的用法示例。


在下文中一共展示了ButtonGroup.type方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_button_on_host

# 需要导入模块: from cfme.automate.buttons import ButtonGroup [as 别名]
# 或者: from cfme.automate.buttons.ButtonGroup import type [as 别名]
def test_button_on_host(appliance, request, provider, setup_provider):
    buttongroup = ButtonGroup(
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_desc_{}".format(fauxfactory.gen_alphanumeric()))
    buttongroup.type = buttongroup.HOST
    request.addfinalizer(buttongroup.delete_if_exists)
    buttongroup.create()
    button = Button(group=buttongroup,
                    text=fauxfactory.gen_alphanumeric(),
                    hover="btn_hvr_{}".format(fauxfactory.gen_alphanumeric()),
                    system="Request", request="InspectMe")
    request.addfinalizer(button.delete_if_exists)
    button.create()
    host = appliance.collections.hosts.all(provider)[0]
    host.execute_button(buttongroup.hover, button.text, handle_alert=None)
开发者ID:hhovsepy,项目名称:cfme_tests,代码行数:17,代码来源:test_buttons.py

示例2: test_button_on_host

# 需要导入模块: from cfme.automate.buttons import ButtonGroup [as 别名]
# 或者: from cfme.automate.buttons.ButtonGroup import type [as 别名]
def test_button_on_host(dialog, request):
    buttongroup = ButtonGroup(
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_desc_{}".format(fauxfactory.gen_alphanumeric()))
    buttongroup.type = buttongroup.HOST
    request.addfinalizer(buttongroup.delete_if_exists)
    buttongroup.create()
    button = Button(group=buttongroup,
                    text=fauxfactory.gen_alphanumeric(),
                    hover="btn_hvr_{}".format(fauxfactory.gen_alphanumeric()),
                    dialog=dialog, system="Request", request="InspectMe")
    request.addfinalizer(button.delete_if_exists)
    button.create()
    myhost = host.get_from_config('esx')
    if not myhost.exists:
        myhost.create()
    myhost.execute_button(buttongroup.hover, button.text)
开发者ID:dajohnso,项目名称:cfme_tests,代码行数:19,代码来源:test_buttons.py

示例3: custom_service_button

# 需要导入模块: from cfme.automate.buttons import ButtonGroup [as 别名]
# 或者: from cfme.automate.buttons.ButtonGroup import type [as 别名]
def custom_service_button(ansible_catalog_item):
    buttongroup = ButtonGroup(
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_desc_{}".format(fauxfactory.gen_alphanumeric()))
    buttongroup.type = buttongroup.SERVICE
    buttongroup.create()
    button = Button(
        group=buttongroup,
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_hvr_{}".format(fauxfactory.gen_alphanumeric()),
        dialog=ansible_catalog_item.provisioning["provisioning_dialog_name"],
        system="Request",
        request="Order_Ansible_Playbook"
    )
    button.create()
    yield button
    button.delete_if_exists()
    buttongroup.delete_if_exists()
开发者ID:jkandasa,项目名称:integration_tests,代码行数:20,代码来源:test_embedded_ansible_services.py

示例4: custom_vm_button

# 需要导入模块: from cfme.automate.buttons import ButtonGroup [as 别名]
# 或者: from cfme.automate.buttons.ButtonGroup import type [as 别名]
def custom_vm_button(ansible_catalog_item):
    buttongroup = ButtonGroup(
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_desc_{}".format(fauxfactory.gen_alphanumeric()))
    buttongroup.type = buttongroup.VM_INSTANCE
    buttongroup.create()
    button = Button(
        group=buttongroup,
        text=fauxfactory.gen_alphanumeric(),
        hover="btn_hvr_{}".format(fauxfactory.gen_alphanumeric()),
        dialog=ansible_catalog_item.provisioning["provisioning_dialog_name"],
        system="Request",
        request="Order_Ansible_Playbook",
        attributes=[
            {"key": "hosts", "value": "localhost"},
            {"key": "service_template_name", "value": ansible_catalog_item.name}
        ]
    )
    button.create()
    yield button
    button.delete_if_exists()
    buttongroup.delete_if_exists()
开发者ID:hhovsepy,项目名称:cfme_tests,代码行数:24,代码来源:test_embedded_ansible_automate.py


注:本文中的cfme.automate.buttons.ButtonGroup.type方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。