本文整理汇总了Python中cfme.services.myservice.MyService.create_view方法的典型用法代码示例。如果您正苦于以下问题:Python MyService.create_view方法的具体用法?Python MyService.create_view怎么用?Python MyService.create_view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cfme.services.myservice.MyService
的用法示例。
在下文中一共展示了MyService.create_view方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_service_start
# 需要导入模块: from cfme.services.myservice import MyService [as 别名]
# 或者: from cfme.services.myservice.MyService import create_view [as 别名]
def test_service_start(appliance, setup_provider, context,
order_service, provider, request):
"""Test service stop
Metadata:
test_flag: ssui, services
"""
catalog_item = order_service
with appliance.context.use(context):
my_service = MyService(appliance, catalog_item.name)
if provider.one_of(InfraProvider, EC2Provider, AzureProvider):
# For Infra providers vm is provisioned.Hence Stop option is shown
# For Azure, EC2 Providers Instance is provisioned.Hence Stop option is shown
my_service.service_power(power='Stop')
view = my_service.create_view(DetailsMyServiceView)
wait_for(lambda: view.resource_power_status.power_status == 'Off',
timeout=1000,
fail_condition=None,
message='Wait for resources off',
delay=20)
else:
my_service.service_power(power='Start')
view = my_service.create_view(DetailsMyServiceView)
wait_for(lambda: view.resource_power_status.power_status == 'On',
timeout=1000,
fail_condition=None,
message='Wait for resources on',
delay=20)
@request.addfinalizer
def _finalize():
my_service.delete()
示例2: test_service_link
# 需要导入模块: from cfme.services.myservice import MyService [as 别名]
# 或者: from cfme.services.myservice.MyService import create_view [as 别名]
def test_service_link(appliance, context, myservice):
"""Tests service link from VM details page(BZ1443772)"""
service_name, vm_name = myservice
with appliance.context.use(context):
myservice = MyService(appliance, name=service_name, vm_name=vm_name)
view = navigate_to(myservice, 'VMDetails')
view.summary('Relationships').click_at('Service')
new_view = myservice.create_view(MyServiceDetailView)
assert new_view.is_displayed
示例3: test_service_start
# 需要导入模块: from cfme.services.myservice import MyService [as 别名]
# 或者: from cfme.services.myservice.MyService import create_view [as 别名]
def test_service_start(appliance, setup_provider, context,
order_service, provider, request):
"""Test service stop"""
catalog_item = order_service
with appliance.context.use(context):
my_service = MyService(appliance, catalog_item.name)
if provider.one_of(InfraProvider):
# For Infra providers vm is provisioned.Hence Stop option is shown
my_service.service_power(power='Stop')
view = my_service.create_view(DetailsMyServiceView)
view.notification.assert_message(
"{} was {}.".format(catalog_item.name, 'stopped'))
else:
my_service.service_power(power='Start')
view = my_service.create_view(DetailsMyServiceView)
view.notification.assert_message(
"{} was {}.".format(catalog_item.name, 'started'))
@request.addfinalizer
def _finalize():
my_service.delete()
示例4: test_service_link
# 需要导入模块: from cfme.services.myservice import MyService [as 别名]
# 或者: from cfme.services.myservice.MyService import create_view [as 别名]
def test_service_link(appliance, context, myservice, provider):
"""Tests service link from VM details page(BZ1443772)
Polarion:
assignee: nansari
casecomponent: Services
initialEstimate: 1/4h
tags: service
"""
service_name, vm_name = myservice
with appliance.context.use(context):
# TODO: Update to nav to MyService first to click entity link when widget exists
myservice = MyService(appliance, name=service_name, vm_name=vm_name)
vm = appliance.provider_based_collection(coll_type='vms', provider=provider).instantiate(
name=myservice.vm_name,
provider=provider
)
view = navigate_to(vm, 'Details')
view.entities.summary('Relationships').click_at('Service')
new_view = myservice.create_view(MyServiceDetailView)
assert new_view.wait_displayed()