本文整理匯總了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()