本文整理汇总了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)
示例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)
示例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()
示例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()