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


Python MyService.create_view方法代码示例

本文整理汇总了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()
开发者ID:lcouzens,项目名称:cfme_tests,代码行数:34,代码来源:test_ssui_myservice.py

示例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
开发者ID:akarol,项目名称:cfme_tests,代码行数:11,代码来源:test_myservice.py

示例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()
开发者ID:LandoCalrizzian,项目名称:cfme_tests,代码行数:23,代码来源:test_ssui_myservice.py

示例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()
开发者ID:niyazRedhat,项目名称:integration_tests,代码行数:23,代码来源:test_myservice.py


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