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


Python myservice.MyService类代码示例

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


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

示例1: test_reconfigure_service

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,代码行数:25,代码来源:test_provision_stack.py

示例2: _finalize

 def _finalize():
     _service = MyService(appliance, cat_item_name)
     if service_request.exists():
         service_request.wait_for_request()
         service_request.remove_request()
     if _service.exists:
         _service.delete()
开发者ID:mkoura,项目名称:cfme_tests,代码行数:7,代码来源:test_embedded_ansible_services.py

示例3: test_reconfigure_service

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,代码行数:25,代码来源:test_provision_stack.py

示例4: _finalize

 def _finalize():
     _service = MyService(appliance, cat_item_name)
     if service_request.exists():
         service_request.wait_for_request()
         appliance.rest_api.collections.service_requests.action.delete(id=service_id.id)
     if _service.exists:
         _service.delete()
开发者ID:sbulage,项目名称:integration_tests,代码行数:7,代码来源:test_embedded_ansible_services.py

示例5: test_reconfigure_service

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,代码行数:33,代码来源:test_provision_stack.py

示例6: service

def service(appliance, ansible_catalog_item):
    _service = MyService(appliance, ansible_catalog_item.name)
    yield _service
    try:
        if _service.exists:
            _service.delete()
    except ItemNotFound:
        pass
开发者ID:apagac,项目名称:cfme_tests,代码行数:8,代码来源:test_embedded_ansible_automate.py

示例7: test_service_link

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,代码行数:9,代码来源:test_myservice.py

示例8: _cleanup

def _cleanup(appliance=None, provision_request=None, service=None):
    if not service:
        last_message = provision_request.get_request_row_from_ui()['Last Message'].text
        service_name = last_message.split()[2].strip('[]')
        myservice = MyService(appliance, service_name)
    else:
        myservice = service
    if myservice.exists:
        myservice.delete()
开发者ID:lcouzens,项目名称:cfme_tests,代码行数:9,代码来源:test_provision_stack.py

示例9: test_retire_service

def test_retire_service(appliance, context, myservice):
    """Tests my service

    Metadata:
        test_flag: provision
    """
    service_name, vm_name = myservice
    with appliance.context.use(context):
        myservice = MyService(appliance, name=service_name, vm_name=vm_name)
        myservice.retire()
开发者ID:akarol,项目名称:cfme_tests,代码行数:10,代码来源:test_myservice.py

示例10: test_download_file

def test_download_file(appliance, context, needs_firefox, myservice, filetype):
    """Tests my service download files

    Metadata:
        test_flag: provision
    """
    service_name, vm_name = myservice
    with appliance.context.use(context):
        myservice = MyService(appliance, name=service_name, vm_name=vm_name)
        myservice.download_file(filetype)
开发者ID:akarol,项目名称:cfme_tests,代码行数:10,代码来源:test_myservice.py

示例11: test_retire_service_ssui

def test_retire_service_ssui(appliance, setup_provider,
                        context, order_service, request):
    """Test retire service."""
    catalog_item = order_service
    with appliance.context.use(context):
        my_service = MyService(appliance, catalog_item.name)
        my_service.retire()

        @request.addfinalizer
        def _finalize():
            my_service.delete()
开发者ID:LandoCalrizzian,项目名称:cfme_tests,代码行数:11,代码来源:test_ssui_myservice.py

示例12: test_retire_service_on_date

def test_retire_service_on_date(appliance, context, myservice):
    """Tests my service retirement

    Metadata:
        test_flag: provision
    """
    service_name, vm_name = myservice
    with appliance.context.use(context):
        myservice = MyService(appliance, name=service_name, vm_name=vm_name)
        dt = datetime.utcnow()
        myservice.retire_on_date(dt)
开发者ID:akarol,项目名称:cfme_tests,代码行数:11,代码来源:test_myservice.py

示例13: test_myservice_crud

def test_myservice_crud(appliance, setup_provider, context, order_service):
    """Test Myservice crud in SSUI."""
    catalog_item = order_service
    with appliance.context.use(context):
        my_service = MyService(appliance, catalog_item.name)
        my_service.set_ownership("Administrator", "EvmGroup-approver")
        my_service.update({'description': '{}_edited'.format(catalog_item.name)})
        if appliance.version > "5.8":
            my_service.edit_tags("Cost Center", "Cost Center 001")
        my_service.delete()
开发者ID:LandoCalrizzian,项目名称:cfme_tests,代码行数:10,代码来源:test_ssui_myservice.py

示例14: order_ansible_service_in_ops_ui

def order_ansible_service_in_ops_ui(appliance, ansible_catalog_item,
                                    ansible_service_catalog):
    """Tests if ansible playbook service provisioning is shown in service requests."""
    ansible_service_catalog.order()
    cat_item_name = ansible_catalog_item.name
    request_descr = "Provisioning Service [{0}] from [{0}]".format(cat_item_name)
    service_request = appliance.collections.requests.instantiate(description=request_descr)
    if service_request.exists():
        service_request.wait_for_request()
        service_request.remove_request()
    yield cat_item_name
    service = MyService(appliance, cat_item_name)
    if service.exists:
        service.delete()
开发者ID:lcouzens,项目名称:cfme_tests,代码行数:14,代码来源:ansible_fixtures.py

示例15: test_download_file

def test_download_file(appliance, context, needs_firefox, myservice, filetype):
    """Tests my service download files

    Metadata:
        test_flag: provision

    Polarion:
        assignee: nansari
        initialEstimate: 1/16h
    """
    service_name, vm_name = myservice
    with appliance.context.use(context):
        myservice = MyService(appliance, name=service_name, vm_name=vm_name)
        myservice.download_file(filetype)
开发者ID:mkoura,项目名称:cfme_tests,代码行数:14,代码来源:test_myservice.py


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