當前位置: 首頁>>代碼示例>>Python>>正文


Python catalog_item.CatalogBundle類代碼示例

本文整理匯總了Python中cfme.services.catalogs.catalog_item.CatalogBundle的典型用法代碼示例。如果您正苦於以下問題:Python CatalogBundle類的具體用法?Python CatalogBundle怎麽用?Python CatalogBundle使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了CatalogBundle類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_bundles_in_bundle

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,代碼行數:25,代碼來源:test_generic_service_catalogs.py

示例2: test_service_generic_catalog_bundle

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,代碼行數:14,代碼來源:test_generic_service_catalogs.py

示例3: test_service_generic_catalog_bundle

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,代碼行數:14,代碼來源:test_generic_service_catalogs.py

示例4: test_order_catalog_bundle

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,代碼行數:18,代碼來源:test_service_catalogs.py

示例5: catalog_bundle

def catalog_bundle(catalog_item):
    """ Create catalog bundle
        Args:
            catalog_item: as resource for bundle creation
    """
    catalog_item.create()
    bundle_name = "bundle" + 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])
    yield catalog_bundle

    # fixture cleanup
    try:
        catalog_bundle.delete()
    except NoSuchElementException:
        logger.warning('test_catalog_item: catalog_item yield fixture cleanup, catalog item "{}" '
                       'not found'.format(catalog_bundle.name))
開發者ID:dajohnso,項目名稱:cfme_tests,代碼行數:19,代碼來源:test_catalog_item.py

示例6: test_order_catalog_bundle

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,代碼行數:21,代碼來源:test_service_catalogs.py

示例7: test_service_circular_reference

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,代碼行數:14,代碼來源:test_generic_service_catalogs.py

示例8: test_service_circular_reference

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,代碼行數:14,代碼來源:test_generic_service_catalogs.py

示例9: test_service_generic_catalog_bundle

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(bundle_name)
    service_catalogs.order()
    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)
    # Success message differs between 5.6 and 5.7
    if version.current_version() >= "5.7":
        assert "Service [{}] Provisioned Successfully".format(bundle_name) in row.last_message.text
    else:
        assert row.last_message.text == "Request complete"
開發者ID:ManageIQ,項目名稱:integration_tests,代碼行數:22,代碼來源:test_generic_service_catalogs.py

示例10: test_order_catalog_bundle

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,代碼行數:22,代碼來源:test_service_catalogs.py

示例11: test_order_catalog_bundle

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,代碼行數:24,代碼來源:test_service_catalogs.py

示例12: test_bundles_in_bundle

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,代碼行數:22,代碼來源:test_generic_service_catalogs.py


注:本文中的cfme.services.catalogs.catalog_item.CatalogBundle類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。