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


Python CatalogBundle.create方法代码示例

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


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

示例1: test_service_generic_catalog_bundle

# 需要导入模块: from cfme.services.catalogs.catalog_item import CatalogBundle [as 别名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import create [as 别名]
def test_service_generic_catalog_bundle(catalog_item):
    bundle_name = "generic_" + fauxfactory.gen_alphanumeric()
    catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog)
    catalog_bundle.create([catalog_item.name])
    service_catalogs = ServiceCatalogs("service_name")
    service_catalogs.order(catalog_item.catalog, catalog_bundle)
    flash.assert_no_errors()
    logger.info('Waiting for cfme provision request for service %s', bundle_name)
    row_description = bundle_name
    cells = {'Description': row_description}
    row, __ = wait_for(requests.wait_for_request, [cells, True],
        fail_func=requests.reload, num_sec=900, delay=20)
    assert row.last_message.text == 'Request complete'
开发者ID:FilipB,项目名称:cfme_tests,代码行数:16,代码来源:test_generic_service_catalogs.py

示例2: test_service_circular_reference

# 需要导入模块: from cfme.services.catalogs.catalog_item import CatalogBundle [as 别名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import create [as 别名]
def test_service_circular_reference(catalog_item):
    bundle_name = "first_" + generate_random_string()
    catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog)
    catalog_bundle.create([catalog_item.name])
    sec_bundle_name = "sec_" + generate_random_string()
    sec_catalog_bundle = CatalogBundle(name=sec_bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog,
                   dialog=catalog_item.dialog)
    sec_catalog_bundle.create([bundle_name])
    with error.expected("Error during 'Resource Add': Adding resource <%s> to Service <%s> "
                        "will create a circular reference" % (sec_bundle_name, bundle_name)):
        catalog_bundle.update({'description': "edit_desc",
                               'cat_item': sec_catalog_bundle.name})
开发者ID:petrblaho,项目名称:cfme_tests,代码行数:16,代码来源:test_generic_service_catalogs.py

示例3: test_service_circular_reference

# 需要导入模块: from cfme.services.catalogs.catalog_item import CatalogBundle [as 别名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import create [as 别名]
def test_service_circular_reference(catalog_item):
    bundle_name = "first_" + fauxfactory.gen_alphanumeric()
    catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog)
    catalog_bundle.create([catalog_item.name])
    sec_bundle_name = "sec_" + fauxfactory.gen_alphanumeric()
    sec_catalog_bundle = CatalogBundle(name=sec_bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog,
                   dialog=catalog_item.dialog)
    sec_catalog_bundle.create([bundle_name])
    with error.expected("Error during 'Resource Add': Adding resource <{}> to Service <{}> "
                        "will create a circular reference".format(sec_bundle_name, bundle_name)):
        catalog_bundle.update({'description': "edit_desc",
                               'cat_item': sec_catalog_bundle.name})
开发者ID:FilipB,项目名称:cfme_tests,代码行数:16,代码来源:test_generic_service_catalogs.py

示例4: test_service_generic_catalog_bundle

# 需要导入模块: from cfme.services.catalogs.catalog_item import CatalogBundle [as 别名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import create [as 别名]
def test_service_generic_catalog_bundle(appliance, catalog_item):
    bundle_name = "generic_" + fauxfactory.gen_alphanumeric()
    catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog,
                   catalog_items=[catalog_item.name])
    catalog_bundle.create()
    service_catalogs = ServiceCatalogs(appliance, catalog_item.catalog, bundle_name)
    service_catalogs.order()
    logger.info('Waiting for cfme provision request for service %s', bundle_name)
    request_description = bundle_name
    provision_request = appliance.collections.requests.instantiate(request_description,
                                                                   partial_check=True)
    provision_request.wait_for_request()
    assert provision_request.is_succeeded()
开发者ID:hhovsepy,项目名称:cfme_tests,代码行数:16,代码来源:test_generic_service_catalogs.py

示例5: test_order_catalog_bundle

# 需要导入模块: from cfme.services.catalogs.catalog_item import CatalogBundle [as 别名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import create [as 别名]
def test_order_catalog_bundle(provider_key, provider_mgmt, setup_providers, catalog_item, request):
    vm_name = catalog_item.provisioning_data["vm_name"]
    catalog_item.create()
    bundle_name = generate_random_string()
    catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog,
                   dialog=catalog_item.dialog, cat_item=catalog_item.name)
    catalog_bundle.create()
    service_catalogs = ServiceCatalogs("service_name")
    service_catalogs.order(catalog_item.catalog, catalog_bundle)
    flash.assert_no_errors()
    logger.info('Waiting for cfme provision request for service %s' % bundle_name)
    row_description = 'Provisioning [%s] for Service [%s]' % (bundle_name, bundle_name)
    cells = {'Description': row_description}
    request.addfinalizer(lambda: cleanup_vm(vm_name, provider_key, provider_mgmt))
    row, __ = wait_for(requests.wait_for_request, [cells],
        fail_func=requests.reload, num_sec=600, delay=20)
    assert row.last_message.text == 'Request complete'
开发者ID:jkrocil,项目名称:cfme_tests,代码行数:20,代码来源:test_service_catalogs.py

示例6: test_order_catalog_bundle

# 需要导入模块: from cfme.services.catalogs.catalog_item import CatalogBundle [as 别名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import create [as 别名]
def test_order_catalog_bundle(provider, setup_provider, catalog_item, request):
    """Tests ordering a catalog bundle
    Metadata:
        test_flag: provision
    """

    vm_name = catalog_item.provisioning_data["vm_name"]
    request.addfinalizer(lambda: cleanup_vm(vm_name + "_0001", provider))
    catalog_item.create()
    bundle_name = fauxfactory.gen_alphanumeric()
    catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog)
    catalog_bundle.create([catalog_item.name])
    service_catalogs = ServiceCatalogs(catalog_bundle.name)
    service_catalogs.order()
    logger.info('Waiting for cfme provision request for service %s', bundle_name)
    row_description = bundle_name
    cells = {'Description': row_description}
    row, __ = wait_for(requests.wait_for_request, [cells, True],
        fail_func=requests.reload, num_sec=1200, delay=20)
    assert row.request_state.text == 'Finished'
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:23,代码来源:test_service_catalogs.py

示例7: test_bundles_in_bundle

# 需要导入模块: from cfme.services.catalogs.catalog_item import CatalogBundle [as 别名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import create [as 别名]
def test_bundles_in_bundle(appliance, catalog_item):
    bundle_name = "first_" + fauxfactory.gen_alphanumeric()
    catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog,
                   catalog_items=[catalog_item.name])
    catalog_bundle.create()
    sec_bundle_name = "sec_" + fauxfactory.gen_alphanumeric()
    sec_catalog_bundle = CatalogBundle(name=sec_bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog,
                   catalog_items=[bundle_name])
    sec_catalog_bundle.create()
    third_bundle_name = "third_" + fauxfactory.gen_alphanumeric()
    third_catalog_bundle = CatalogBundle(name=third_bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog,
                   catalog_items=[bundle_name, sec_bundle_name])
    third_catalog_bundle.create()
    service_catalogs = ServiceCatalogs(appliance, third_catalog_bundle.catalog, third_bundle_name)
    service_catalogs.order()
    logger.info('Waiting for cfme provision request for service %s', bundle_name)
    request_description = third_bundle_name
    provision_request = appliance.collections.requests.instantiate(request_description,
                                                                   partial_check=True)
    provision_request.wait_for_request()
    msg = "Request failed with the message {}".format(provision_request.rest.message)
    assert provision_request.is_succeeded(), msg
开发者ID:akarol,项目名称:cfme_tests,代码行数:27,代码来源:test_generic_service_catalogs.py

示例8: test_order_catalog_bundle

# 需要导入模块: from cfme.services.catalogs.catalog_item import CatalogBundle [as 别名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import create [as 别名]
def test_order_catalog_bundle(appliance, provider, setup_provider, catalog_item, request):
    """Tests ordering a catalog bundle
    Metadata:
        test_flag: provision
    """

    vm_name = catalog_item.provisioning_data['catalog']["vm_name"]
    request.addfinalizer(lambda: cleanup_vm(vm_name + "_0001", provider))
    catalog_item.create()
    bundle_name = fauxfactory.gen_alphanumeric()
    catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog,
                   dialog=catalog_item.dialog, catalog_items=[catalog_item.name])
    catalog_bundle.create()
    service_catalogs = ServiceCatalogs(appliance, catalog_item.catalog, catalog_bundle.name)
    service_catalogs.order()
    logger.info("Waiting for cfme provision request for service {}".format(bundle_name))
    request_description = bundle_name
    provision_request = appliance.collections.requests.instantiate(request_description,
                                                                   partial_check=True)
    provision_request.wait_for_request()
    assert provision_request.is_succeeded()
开发者ID:hhovsepy,项目名称:cfme_tests,代码行数:24,代码来源:test_service_catalogs.py

示例9: test_order_catalog_bundle

# 需要导入模块: from cfme.services.catalogs.catalog_item import CatalogBundle [as 别名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import create [as 别名]
def test_order_catalog_bundle(provider_crud, provider_key, provider_mgmt, provider_init,
                              catalog_item, request):
    """Tests ordering a catalog bundle

    Metadata:
        test_flag: provision
    """

    vm_name = catalog_item.provisioning_data["vm_name"]
    request.addfinalizer(lambda: cleanup_vm(vm_name, provider_key, provider_mgmt))
    catalog_item.create()
    bundle_name = fauxfactory.gen_alphanumeric()
    catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog)
    catalog_bundle.create([catalog_item.name])
    service_catalogs = ServiceCatalogs("service_name")
    service_catalogs.order(catalog_item.catalog, catalog_bundle)
    flash.assert_no_errors()
    logger.info('Waiting for cfme provision request for service %s' % bundle_name)
    row_description = bundle_name
    cells = {'Description': row_description}
    row, __ = wait_for(requests.wait_for_request, [cells, True],
        fail_func=requests.reload, num_sec=1200, delay=20)
    assert row.last_message.text == 'Request complete'
开发者ID:seandst,项目名称:cfme_tests,代码行数:26,代码来源:test_service_catalogs.py

示例10: test_bundles_in_bundle

# 需要导入模块: from cfme.services.catalogs.catalog_item import CatalogBundle [as 别名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import create [as 别名]
def test_bundles_in_bundle(catalog_item):
    bundle_name = "first_" + fauxfactory.gen_alphanumeric()
    catalog_bundle = CatalogBundle(
        name=bundle_name,
        description="catalog_bundle",
        display_in=True,
        catalog=catalog_item.catalog,
        dialog=catalog_item.dialog,
    )
    catalog_bundle.create([catalog_item.name])
    sec_bundle_name = "sec_" + fauxfactory.gen_alphanumeric()
    sec_catalog_bundle = CatalogBundle(
        name=sec_bundle_name,
        description="catalog_bundle",
        display_in=True,
        catalog=catalog_item.catalog,
        dialog=catalog_item.dialog,
    )
    sec_catalog_bundle.create([bundle_name])
    third_bundle_name = "third_" + fauxfactory.gen_alphanumeric()
    third_catalog_bundle = CatalogBundle(
        name=third_bundle_name,
        description="catalog_bundle",
        display_in=True,
        catalog=catalog_item.catalog,
        dialog=catalog_item.dialog,
    )
    third_catalog_bundle.create([bundle_name, sec_bundle_name])
    service_catalogs = ServiceCatalogs(third_bundle_name)
    service_catalogs.order()
    flash.assert_no_errors()
    logger.info("Waiting for cfme provision request for service %s", bundle_name)
    row_description = third_bundle_name
    cells = {"Description": row_description}
    row, __ = wait_for(requests.wait_for_request, [cells, True], fail_func=requests.reload, num_sec=900, delay=20)
    # Success message differs between 5.6 and 5.7
    if version.current_version() >= "5.7":
        assert "Service [{}] Provisioned Successfully".format(third_bundle_name) in row.last_message.text
    else:
        assert row.last_message.text == "Request complete"
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:42,代码来源:test_generic_service_catalogs.py

示例11: test_bundles_in_bundle

# 需要导入模块: from cfme.services.catalogs.catalog_item import CatalogBundle [as 别名]
# 或者: from cfme.services.catalogs.catalog_item.CatalogBundle import create [as 别名]
def test_bundles_in_bundle(catalog_item):
    bundle_name = "first_" + generate_random_string()
    catalog_bundle = CatalogBundle(name=bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog)
    catalog_bundle.create([catalog_item.name])
    sec_bundle_name = "sec_" + generate_random_string()
    sec_catalog_bundle = CatalogBundle(name=sec_bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog)
    sec_catalog_bundle.create([bundle_name])
    third_bundle_name = "third_" + generate_random_string()
    third_catalog_bundle = CatalogBundle(name=third_bundle_name, description="catalog_bundle",
                   display_in=True, catalog=catalog_item.catalog, dialog=catalog_item.dialog)
    third_catalog_bundle.create([bundle_name, sec_bundle_name])
    service_catalogs = ServiceCatalogs("service_name")
    service_catalogs.order(catalog_item.catalog, third_catalog_bundle)
    flash.assert_no_errors()
    logger.info('Waiting for cfme provision request for service %s' % bundle_name)
    row_description = third_bundle_name
    cells = {'Description': row_description}
    row, __ = wait_for(requests.wait_for_request, [cells, True],
        fail_func=requests.reload, num_sec=900, delay=20)
    assert row.last_message.text == 'Request complete'
开发者ID:petrblaho,项目名称:cfme_tests,代码行数:24,代码来源:test_generic_service_catalogs.py


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