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


Python MyService.reconfigure_service方法代码示例

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


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

示例1: test_reconfigure_service

# 需要导入模块: from cfme.services.myservice import MyService [as 别名]
# 或者: from cfme.services.myservice.MyService import reconfigure_service [as 别名]
def test_reconfigure_service(provider, provisioning, catalog, catalog_item, request):
    """Tests stack provisioning

    Metadata:
        test_flag: provision
    """
    catalog_item, item_name = catalog_item
    stack_data = prepare_stack_data(provider, provisioning)

    @request.addfinalizer
    def _cleanup_vms():
        clean_up(stack_data, provider)

    service_catalogs = ServiceCatalogs(item_name, stack_data)
    service_catalogs.order()
    logger.info('Waiting for cfme provision request for service {}'.format(item_name))
    row_description = item_name
    cells = {'Description': row_description}
    row, __ = wait_for(requests.wait_for_request, [cells, True],
                       fail_func=requests.reload, num_sec=2000, delay=20)

    assert 'Provisioned Successfully' in row.last_message.text

    myservice = MyService(catalog_item.name)
    myservice.reconfigure_service()
开发者ID:rananda,项目名称:cfme_tests,代码行数:27,代码来源:test_provision_stack.py

示例2: test_reconfigure_service

# 需要导入模块: from cfme.services.myservice import MyService [as 别名]
# 或者: from cfme.services.myservice.MyService import reconfigure_service [as 别名]
def test_reconfigure_service(appliance, provider, provisioning, catalog, catalog_item, request):
    """Tests stack provisioning

    Metadata:
        test_flag: provision
    """
    catalog_item, template = catalog_item
    stack_data = prepare_stack_data(provider, provisioning)

    @request.addfinalizer
    def _cleanup_vms():
        clean_up(stack_data, provider)

    service_catalogs = ServiceCatalogs(appliance, catalog_item.catalog,
                                       catalog_item.name, stack_data)
    service_catalogs.order()
    logger.info('Waiting for cfme provision request for service {}'.format(catalog_item.name))
    request_description = catalog_item.name
    provision_request = appliance.collections.requests.instantiate(request_description,
                                                                   partial_check=True)
    provision_request.wait_for_request()
    assert provision_request.is_succeeded()

    myservice = MyService(appliance, catalog_item.name)
    myservice.reconfigure_service()
开发者ID:jkandasa,项目名称:integration_tests,代码行数:27,代码来源:test_provision_stack.py

示例3: test_reconfigure_service

# 需要导入模块: from cfme.services.myservice import MyService [as 别名]
# 或者: from cfme.services.myservice.MyService import reconfigure_service [as 别名]
def test_reconfigure_service(provider, provisioning, catalog, catalog_item, request):
    """Tests stack provisioning

    Metadata:
        test_flag: provision
    """
    catalog_item, item_name = catalog_item
    stack_data = prepare_stack_data(provider, provisioning)

    @request.addfinalizer
    def _cleanup_vms():
        try:
            if provider.mgmt.stack_exist(stack_data['stack_name']):
                wait_for(lambda: provider.mgmt.delete_stack(stack_data['stack_name']),
                 delay=10, num_sec=800, message="wait for stack delete")
            stack_data['vm_name'].delete_from_provider()
        except Exception as ex:
            logger.warning('Exception while checking/deleting stack, continuing: {}'
                           .format(ex.message))
            pass

    service_catalogs = ServiceCatalogs(item_name, stack_data)
    service_catalogs.order()
    logger.info('Waiting for cfme provision request for service %s', item_name)
    row_description = item_name
    cells = {'Description': row_description}
    row, __ = wait_for(requests.wait_for_request, [cells, True],
                       fail_func=requests.reload, num_sec=2000, delay=20)

    assert provision_success_message(catalog_item.name) in row.last_message.text

    myservice = MyService(catalog_item.name)
    myservice.reconfigure_service()
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:35,代码来源:test_provision_stack.py

示例4: test_reconfigure_service

# 需要导入模块: from cfme.services.myservice import MyService [as 别名]
# 或者: from cfme.services.myservice.MyService import reconfigure_service [as 别名]
def test_reconfigure_service(appliance, service_catalogs, request):
    """Tests service reconfiguring

    Metadata:
        test_flag: provision
    """
    provision_request = service_catalogs.order()
    provision_request.wait_for_request(method='ui')
    last_message = provision_request.get_request_row_from_ui()['Last Message'].text
    service_name = last_message.split()[2].strip('[]')
    myservice = MyService(appliance, service_name)
    request.addfinalizer(lambda: _cleanup(service=myservice))
    assert provision_request.is_succeeded()
    myservice.reconfigure_service()
开发者ID:lcouzens,项目名称:cfme_tests,代码行数:16,代码来源:test_provision_stack.py

示例5: test_reconfigure_service

# 需要导入模块: from cfme.services.myservice import MyService [as 别名]
# 或者: from cfme.services.myservice.MyService import reconfigure_service [as 别名]
def test_reconfigure_service(provider, provisioning, create_template, catalog, request):
    """Tests stack provisioning

    Metadata:
        test_flag: provision
    """
    dialog_name, template = create_template
    item_name = fauxfactory.gen_alphanumeric()
    catalog_item = CatalogItem(
        item_type="Orchestration",
        name=item_name,
        description="my catalog",
        display_in=True,
        catalog=catalog.name,
        dialog=dialog_name,
        orch_template=template.template_name,
    )
    catalog_item.create()
    stack_data = prepare_stack_data(provider, provisioning)

    @request.addfinalizer
    def _cleanup_vms():
        if provider.mgmt.stack_exist(stack_data["stack_name"]):
            wait_for(
                lambda: provider.mgmt.delete_stack(stack_data["stack_name"]),
                delay=10,
                num_sec=800,
                message="wait for stack delete",
            )
        template.delete_all_templates()
        stack_data["vm_name"].delete_from_provider()

    service_catalogs = ServiceCatalogs("service_name", stack_data)
    service_catalogs.order_stack_item(catalog.name, catalog_item)
    logger.info("Waiting for cfme provision request for service %s", item_name)
    row_description = item_name
    cells = {"Description": row_description}
    row, __ = wait_for(requests.wait_for_request, [cells, True], fail_func=requests.reload, num_sec=2000, delay=20)
    assert row.last_message.text == "Service Provisioned Successfully"
    myservice = MyService(catalog_item.name)
    myservice.reconfigure_service()
开发者ID:jteehan,项目名称:cfme_tests,代码行数:43,代码来源:test_provision_stack.py


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