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


Python ServiceCatalogs.add_to_shopping_cart方法代码示例

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


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

示例1: test_quota_tagging_infra_via_services

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_quota_tagging_infra_via_services(request, appliance, admin_email, context,
                                          set_entity_quota_tag, custom_prov_data, prov_data,
                                          catalog_item):
    """This test case verifies the quota tagging is working correctly for the infra providers.

    Polarion:
        assignee: ghubale
        casecomponent: Quota
        caseimportance: medium
        initialEstimate: 1/6h
        tags: quota
    """

    prov_data.update(custom_prov_data)
    with appliance.context.use(context):
        service_catalogs = ServiceCatalogs(appliance, catalog_item.catalog, catalog_item.name)
        if context is ViaSSUI:
            service_catalogs.add_to_shopping_cart()
        service_catalogs.order()
    # nav to requests page to check quota validation
    request_description = 'Provisioning Service [{0}] from [{0}]'.format(catalog_item.name)
    provision_request = appliance.collections.requests.instantiate(request_description)
    provision_request.wait_for_request(method='ui')
    request.addfinalizer(provision_request.remove_request)
    assert provision_request.row.reason.text == "Quota Exceeded"
开发者ID:nachandr,项目名称:cfme_tests,代码行数:27,代码来源:test_quota_tagging.py

示例2: test_quota_catalog_bundle_infra

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_quota_catalog_bundle_infra(request, appliance, admin_email, entities, custom_prov_data,
                                    prov_data, catalog_bundle, context, vm_name, template_name):
    """This test case verifies the quota assigned by automation method for user and group
       is working correctly for the infra providers by ordering catalog bundle.

    Polarion:
        assignee: ghubale
        initialEstimate: 1/4h
        casecomponent: Quota
        caseimportance: high
        tags: quota
        testSteps:
            1. Navigate to Automation > Automate > Explorer
            2. Add quota automation methods to domain
            3. Change 'quota_source_type' to 'user' or 'group'
            4. Create one or more catalogs to test quota by provisioning VMs over quota limit via UI
               or SSUI for user and group
            5. Add more than one catalog to catalog bundle and order catalog bundle
            6. Check whether quota is exceeded or not
    """
    prov_data.update(custom_prov_data)
    with appliance.context.use(context):
        service_catalogs = ServiceCatalogs(appliance, catalog_bundle.catalog, catalog_bundle.name)
        if context is ViaSSUI:
            service_catalogs.add_to_shopping_cart()
        service_catalogs.order()
    # nav to requests page to check quota validation
    request_description = 'Provisioning Service [{0}] from [{0}]'.format(catalog_bundle.name)
    provision_request = appliance.collections.requests.instantiate(request_description)
    provision_request.wait_for_request(method='ui')
    request.addfinalizer(provision_request.remove_request)
    assert provision_request.row.reason.text == "Quota Exceeded"
开发者ID:nachandr,项目名称:cfme_tests,代码行数:34,代码来源:test_quota_tagging.py

示例3: test_quota_cloud_via_services

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_quota_cloud_via_services(appliance, request, admin_email, entities, prov_data,
                                  catalog_item, context):
    """This test case verifies the quota assigned by automation method for user and group
       is working correctly for the cloud providers.

    Polarion:
        assignee: ghubale
        initialEstimate: 1/4h
        casecomponent: Cloud
        tags: quota
        testSteps:
           1. Navigate to Automation > Automate > Explorer
           2. Add quota automation methods to domain
           3. Change 'quota_source_type' to 'user' or 'group'
           4. Test quota by provisioning instances over quota limit via UI or
              SSUI for user and group
           5. Check whether quota is exceeded or not
    """
    with appliance.context.use(context):
        service_catalogs = ServiceCatalogs(appliance, catalog_item.catalog, catalog_item.name)
        if context is ViaSSUI:
            service_catalogs.add_to_shopping_cart()
        service_catalogs.order()
    # nav to requests page to check quota validation
    request_description = ("Provisioning Service [{catalog_item_name}] from [{catalog_item_name}]"
                           .format(catalog_item_name=catalog_item.name))
    provision_request = appliance.collections.requests.instantiate(request_description)
    provision_request.wait_for_request(method='ui')
    request.addfinalizer(provision_request.remove_request)
    assert provision_request.row.reason.text == "Quota Exceeded"
开发者ID:apagac,项目名称:cfme_tests,代码行数:32,代码来源:test_quota_tagging.py

示例4: test_tenant_quota_enforce_via_service_cloud

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_tenant_quota_enforce_via_service_cloud(request, appliance, provider, setup_provider,
                                                context, set_roottenant_quota, set_default,
                                                custom_prov_data, extra_msg, template_name,
                                                catalog_item):
    """Test Tenant Quota in UI and SSUI

    Polarion:
        assignee: ghubale
        casecomponent: Cloud
        initialEstimate: 1/10h
    """
    with appliance.context.use(context):
        service_catalogs = ServiceCatalogs(appliance, catalog_item.catalog, catalog_item.name)
        if context is ViaSSUI:
            service_catalogs.add_to_shopping_cart()
        service_catalogs.order()
    # nav to requests page to check quota validation
    request_description = 'Provisioning Service [{0}] from [{0}]'.format(catalog_item.name)
    provision_request = appliance.collections.requests.instantiate(request_description)
    provision_request.wait_for_request(method='ui')
    assert provision_request.row.reason.text == "Quota Exceeded"

    @request.addfinalizer
    def delete():
        provision_request.remove_request()
        catalog_item.delete()
开发者ID:mkoura,项目名称:cfme_tests,代码行数:28,代码来源:test_tenant_quota.py

示例5: test_service_catalog_crud

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_service_catalog_crud(appliance, setup_provider, context, order_catalog_item_in_ops_ui):
    """Tests Service Catalog in SSUI."""

    service_name = order_catalog_item_in_ops_ui.name
    with appliance.context.use(context):
        appliance.server.login()
        service = ServiceCatalogs(appliance, name=service_name)
        service.add_to_shopping_cart()
        service.order()
开发者ID:akarol,项目名称:cfme_tests,代码行数:11,代码来源:test_ssui_service_catalogs.py

示例6: test_service_catalog_crud_ui

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_service_catalog_crud_ui(appliance, context, order_ansible_service_in_ops_ui, request):
    """Tests Ansible Service Catalog in SSUI."""

    service_name = order_ansible_service_in_ops_ui
    with appliance.context.use(context):
        service = ServiceCatalogs(appliance, name=service_name)
        service.add_to_shopping_cart()
        service.order()

        @request.addfinalizer
        def _finalize():
            _service = MyService(appliance, service_name)
            _service.delete()
开发者ID:lcouzens,项目名称:cfme_tests,代码行数:15,代码来源:test_ssui_ansible_service.py

示例7: test_service_catalog_crud_ssui

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_service_catalog_crud_ssui(appliance, setup_provider,
                                   context, order_service):
    """Tests Service Catalog in SSUI."""

    catalog_item = order_service
    with appliance.context.use(context):
        if appliance.version >= '5.9':
            dialog_values = {'service_name': "ssui_{}".format(fauxfactory.gen_alphanumeric())}
            service = ServiceCatalogs(appliance, name=catalog_item.name,
                                      dialog_values=dialog_values)
        else:
            service = ServiceCatalogs(appliance, name=catalog_item.name)
        service.add_to_shopping_cart()
        service.order()
开发者ID:LandoCalrizzian,项目名称:cfme_tests,代码行数:16,代码来源:test_ssui_service_catalogs.py

示例8: test_quota_tagging_cloud_via_services

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_quota_tagging_cloud_via_services(appliance, request, provider, setup_provider, context,
                                          admin_email, set_entity_quota_tag, catalog_item):
    """Test Group and User Quota in UI and SSUI using tagging"""
    with appliance.context.use(context):
        service_catalogs = ServiceCatalogs(appliance, catalog_item.catalog, catalog_item.name)
        if context is ViaSSUI:
            service_catalogs.add_to_shopping_cart()
        service_catalogs.order()
    # nav to requests page to check quota validation
    request_description = 'Provisioning Service [{0}] from [{0}]'.format(catalog_item.name)
    provision_request = appliance.collections.requests.instantiate(request_description)
    provision_request.wait_for_request(method='ui')
    request.addfinalizer(provision_request.remove_request)
    assert provision_request.row.reason.text == "Quota Exceeded"
开发者ID:lcouzens,项目名称:cfme_tests,代码行数:16,代码来源:test_quota_tagging.py

示例9: test_tenant_quota_enforce_via_service_infra

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_tenant_quota_enforce_via_service_infra(request, appliance, provider, setup_provider,
                                                context, set_roottenant_quota, extra_msg,
                                                custom_prov_data, catalog_item):
    with appliance.context.use(context):
        service_catalogs = ServiceCatalogs(appliance, catalog_item.catalog, catalog_item.name)
        if context is ViaSSUI:
            service_catalogs.add_to_shopping_cart()
        service_catalogs.order()
    # nav to requests page to check quota validation
    request_description = 'Provisioning Service [{0}] from [{0}]'.format(catalog_item.name)
    provision_request = appliance.collections.requests.instantiate(request_description)
    provision_request.wait_for_request(method='ui')
    assert provision_request.row.reason.text == "Quota Exceeded"

    @request.addfinalizer
    def delete():
        provision_request.remove_request()
        catalog_item.delete()
开发者ID:LandoCalrizzian,项目名称:cfme_tests,代码行数:20,代码来源:test_tenant_quota.py

示例10: test_service_catalog_crud_ui

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_service_catalog_crud_ui(appliance, context, order_ansible_service_in_ops_ui, request):
    """Tests Ansible Service Catalog in SSUI.

    Polarion:
        assignee: nansari
        initialEstimate: 1/4h
        casecomponent: Services
        tags: service
    """

    service_name = order_ansible_service_in_ops_ui
    with appliance.context.use(context):
        service = ServiceCatalogs(appliance, name=service_name)
        service.add_to_shopping_cart()
        service.order()

        @request.addfinalizer
        def _finalize():
            _service = MyService(appliance, service_name)
            _service.delete()
开发者ID:apagac,项目名称:cfme_tests,代码行数:22,代码来源:test_ssui_ansible_service.py

示例11: test_service_infra_tenant_quota_with_default_entry_point

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_service_infra_tenant_quota_with_default_entry_point(request, appliance, context,
                                                             set_roottenant_quota, extra_msg,
                                                             set_default, custom_prov_data,
                                                             catalog_item):
    """Test Tenant Quota in UI and SSUI by selecting field entry points.
       Quota has to be checked if it is working with field entry points also.

    Polarion:
        assignee: ghubale
        casecomponent: Infra
        caseimportance: medium
        initialEstimate: 1/12h
        tags: quota
        setup:
            1. Add infrastructure provider
            2. Set quota for root tenant - 'My Company'
            3. Navigate to services > catalogs
            4. Create catalog item with selecting following field entry points:
                a.provisioning_entry_point = /ManageIQ (Locked)/Infrastructure/VM/Provisioning
                /StateMachines/ProvisionRequestApproval/Default
                b.retirement_entry_point = /Service/Retirement/StateMachines/ServiceRetirement
                /Default
            5. Add other information required in catalog for provisioning VM
        testSteps:
            1. Order the catalog item via UI and SSUI individually
        expectedResults:
            1. Request of vm provisioning via service catalog should be denied with reason:
               "Quota Exceeded"
    """
    with appliance.context.use(context):
        service_catalogs = ServiceCatalogs(appliance, catalog_item.catalog, catalog_item.name)
        if context is ViaSSUI:
            service_catalogs.add_to_shopping_cart()
        service_catalogs.order()
    # nav to requests page to check quota validation
    request_description = 'Provisioning Service [{name}] from [{name}]'.format(
        name=catalog_item.name)
    provision_request = appliance.collections.requests.instantiate(request_description)
    provision_request.wait_for_request(method='ui')
    request.addfinalizer(provision_request.remove_request)
    assert provision_request.row.reason.text == "Quota Exceeded"
开发者ID:apagac,项目名称:cfme_tests,代码行数:43,代码来源:test_tenant_quota.py

示例12: test_service_catalog_crud_ssui

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_service_catalog_crud_ssui(appliance, setup_provider,
                                   context, order_service):
    """Tests Service Catalog in SSUI.

    Metadata:
        test_flag: ssui

    Polarion:
        assignee: nansari
        casecomponent: SelfServiceUI
        initialEstimate: 1/4h
        tags: ssui
    """

    catalog_item = order_service
    with appliance.context.use(context):
        dialog_values = {'service_name': "ssui_{}".format(fauxfactory.gen_alphanumeric())}
        service = ServiceCatalogs(appliance, name=catalog_item.name,
                                  dialog_values=dialog_values)
        service.add_to_shopping_cart()
        service.order()
开发者ID:apagac,项目名称:cfme_tests,代码行数:23,代码来源:test_ssui_service_catalogs.py

示例13: test_tenant_quota_enforce_via_service_infra

# 需要导入模块: from cfme.services.service_catalogs import ServiceCatalogs [as 别名]
# 或者: from cfme.services.service_catalogs.ServiceCatalogs import add_to_shopping_cart [as 别名]
def test_tenant_quota_enforce_via_service_infra(request, appliance, context, set_roottenant_quota,
                                                extra_msg, set_default, custom_prov_data,
                                                catalog_item):
    """Tests quota enforcement via service infra

    Polarion:
        assignee: ghubale
        casecomponent: Infra
        caseimportance: high
        initialEstimate: 1/8h
        tags: quota
    """
    with appliance.context.use(context):
        service_catalogs = ServiceCatalogs(appliance, catalog_item.catalog, catalog_item.name)
        if context is ViaSSUI:
            service_catalogs.add_to_shopping_cart()
        service_catalogs.order()
    # nav to requests page to check quota validation
    request_description = 'Provisioning Service [{0}] from [{0}]'.format(catalog_item.name)
    provision_request = appliance.collections.requests.instantiate(request_description)
    provision_request.wait_for_request(method='ui')
    request.addfinalizer(provision_request.remove_request)
    assert provision_request.row.reason.text == "Quota Exceeded"
开发者ID:apagac,项目名称:cfme_tests,代码行数:25,代码来源:test_tenant_quota.py


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