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


Python MiddlewareDatasource.datasources_in_db方法代码示例

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


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

示例1: test_topology_details

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def test_topology_details(provider):
    """Tests items details in topology page from provider page

    Steps:
        * Get topology elements detail
        * Check details of `Servers`, `Domains`, `Messagings`,
        * `Datasources`, `Server Groups`, `Deployments` on topology page
    """

    # reload topology page to make sure all elements are loaded
    provider.topology.reload()
    provider.topology.refresh()

    verify_elements_match(MiddlewareServer.servers_in_db(),
                          provider.topology.elements(element_type='MiddlewareServer'))

    verify_elements_match(MiddlewareMessaging.messagings_in_db(),
                          provider.topology.elements(element_type='MiddlewareMessaging'))

    verify_elements_match(MiddlewareDatasource.datasources_in_db(),
                          provider.topology.elements(element_type='MiddlewareDatasource'))

    verify_elements_match(MiddlewareDomain.domains_in_db(),
                          provider.topology.elements(element_type='MiddlewareDomain'))

    server_groups = []
    for domain in MiddlewareDomain.domains_in_db():
        server_groups.extend(MiddlewareServerGroup.server_groups_in_db(domain))
    verify_elements_match(server_groups,
                          provider.topology.elements(element_type='MiddlewareServerGroup'))

    deployments = provider.topology.elements(element_type='MiddlewareDeployment')
    deployments.extend(provider.topology.elements(element_type='MiddlewareDeploymentWar'))
    deployments.extend(provider.topology.elements(element_type='MiddlewareDeploymentEar'))
    verify_elements_match(MiddlewareDeployment.deployments_in_db(), deployments)
开发者ID:hhovsepy,项目名称:cfme_tests,代码行数:37,代码来源:test_middleware_topology.py

示例2: test_datasource_tags

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def test_datasource_tags(provider):
    """Tests tags in datasources page

    Steps:
        * Select a datasource randomly from database
        * Run `_validate_tags` with `tags` input
    """
    ds_db = MiddlewareDatasource.datasources_in_db(provider=provider)
    assert len(ds_db) > 0, "There is no datasource(s) available in UI"
    datasource = get_random_list(ds_db, 1)[0]
    validate_tags(taggable=datasource, tags=tags)
开发者ID:FilipB,项目名称:cfme_tests,代码行数:13,代码来源:test_middleware_tags.py

示例3: get_random_datasource

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def get_random_datasource(provider, load_from="db"):
    load_from = load_from.lower()
    if load_from == "ui":
        datasources = MiddlewareDatasource.datasources(provider=provider)
    elif load_from == "db":
        datasources = MiddlewareDatasource.datasources_in_db(provider=provider)
    elif load_from == "mgmt":
        datasources = MiddlewareDatasource.datasources_in_mgmt(provider=provider)
    else:
        raise RuntimeError("Not supported option: '{}'".format(load_from))
    assert len(datasources) > 0, "There is no datasource(s) available in {}".format(load_from)
    return get_random_list(datasources, 1)[0]
开发者ID:ManageIQ,项目名称:integration_tests,代码行数:14,代码来源:random_methods.py

示例4: test_list_server_datasources

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def test_list_server_datasources(provider):
    """Gets servers list and tests datasources list for each server
    Steps:
        * Get Hawkular Local server
        * Get datasources list from UI of server
        * Get datasources list from Database of server
        * Compare size of all the list [UI, Database]
    """
    server = get_server(provider, HAWKULAR_PRODUCT_NAME)
    ui_dses = get_datasources_set(MiddlewareDatasource.datasources(server=server))
    db_dses = get_datasources_set(MiddlewareDatasource.datasources_in_db(server=server))
    assert ui_dses == db_dses, \
        ("Lists of datasources mismatch! UI:{}, DB:{}".format(ui_dses, db_dses))
开发者ID:RonnyPfannschmidt,项目名称:cfme_tests,代码行数:15,代码来源:test_middleware_datasource.py

示例5: test_list_provider_datasources

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def test_list_provider_datasources(provider):
    """Tests datasources list from current Provider between UI, DB and Management system

    Steps:
        * Get datasources list from UI of provider
        * Get datasources list from Database of provider
        * Get datasources list from Management system(Hawkular)
        * Compare size of all the list [UI, Database, Management system]
    """
    ui_dses = get_datasources_set(MiddlewareDatasource.datasources(provider=provider))
    db_dses = get_datasources_set(MiddlewareDatasource.datasources_in_db(provider=provider))
    mgmt_dses = get_datasources_set(MiddlewareDatasource.datasources_in_mgmt(provider=provider))
    assert ui_dses == db_dses == mgmt_dses, \
        ("Lists of datasources mismatch! UI:{}, DB:{}, MGMT:{}"
         .format(ui_dses, db_dses, mgmt_dses))
开发者ID:RonnyPfannschmidt,项目名称:cfme_tests,代码行数:17,代码来源:test_middleware_datasource.py

示例6: test_list_server_datasources

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def test_list_server_datasources():
    """Gets servers list and tests datasources list for each server
    Steps:
        * Get servers list from UI
        * Get datasources list from UI of server
        * Get datasources list from Database of server
        * Compare size of all the list [UI, Database]
    """
    servers = MiddlewareServer.servers()
    assert len(servers) > 0, "There is no server(s) available in UI"
    for server in get_random_list(servers, ITEMS_LIMIT):
        ui_dses = _get_datasources_set(MiddlewareDatasource.datasources(server=server))
        db_dses = _get_datasources_set(MiddlewareDatasource.datasources_in_db(server=server))
        assert ui_dses == db_dses, \
            ("Lists of datasources mismatch! UI:{}, DB:{}".format(ui_dses, db_dses))
开发者ID:FilipB,项目名称:cfme_tests,代码行数:17,代码来源:test_middleware_datasource.py

示例7: test_list_datasources

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def test_list_datasources():
    """Tests datasources list between UI, DB and Management system
    This test requires that no any other provider should exist before.

    Steps:
        * Get datasources list from UI
        * Get datasources list from Database
        * Get datasources list from Management system(Hawkular)
        * Compare size of all the list [UI, Database, Management system]
    """
    ui_dses = get_datasources_set(MiddlewareDatasource.datasources())
    db_dses = get_datasources_set(MiddlewareDatasource.datasources_in_db())
    mgmt_dses = get_datasources_set(MiddlewareDatasource.datasources_in_mgmt())
    assert ui_dses == db_dses == mgmt_dses, \
        ("Lists of datasources mismatch! UI:{}, DB:{}, MGMT:{}"
         .format(ui_dses, db_dses, mgmt_dses))
开发者ID:RonnyPfannschmidt,项目名称:cfme_tests,代码行数:18,代码来源:test_middleware_datasource.py

示例8: test_topology_server_hierarchy

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def test_topology_server_hierarchy(provider):
    """Tests all server's hierarchical content in topology

    Steps:
        * Read Servers in topology.
        * For each server read elements in topology.
        * Compare elements from topology with server's elements from DB.
    """

    # reload topology page to make sure all elements are loaded
    provider.topology.reload()
    provider.topology.refresh()

    for ui_server in provider.topology.elements(element_type='MiddlewareServer'):
        elements = []
        server = MiddlewareServer.servers_in_db(name=ui_server.name)[0]
        elements.extend(MiddlewareDeployment.deployments_in_db(server, provider, strict=False))
        elements.extend(MiddlewareDatasource.datasources_in_db(server, provider, strict=False))
        elements.extend(MiddlewareMessaging.messagings_in_db(server, provider, strict=False))
        verify_elements_included(elements, ui_server.children)
开发者ID:hhovsepy,项目名称:cfme_tests,代码行数:22,代码来源:test_middleware_topology.py

示例9: test_datasource_details

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def test_datasource_details(provider):
    """Tests datasource details on UI

    Steps:
        * Get datasources list from UI
        * Select each datasource details in UI
        * Compare selected datasource UI details with CFME database and MGMT system
    """
    ds_list = MiddlewareDatasource.datasources_in_db(provider=provider)
    for ds in get_random_list(ds_list, ITEMS_LIMIT):
        ds_ui = ds.datasource(method='ui')
        ds_db = ds.datasource(method='db')
        ds_mgmt = ds_ui.datasource(method='mgmt')
        assert ds_ui, "Datasource was not found in UI"
        assert ds_db, "Datasource was not found in DB"
        assert ds_mgmt, "Datasource was not found in MGMT system"
        assert ds_ui.name == ds_db.name == ds_mgmt.name, \
            ("datasource name does not match between UI:{}, DB:{}, MGMT:{}"
             .format(ds_ui.name, ds_db.name, ds_mgmt.name))
        ds_db.validate_properties()
        ds_mgmt.validate_properties()
开发者ID:dajohnso,项目名称:cfme_tests,代码行数:23,代码来源:test_middleware_datasource.py

示例10: test_list_provider_server_datasources

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def test_list_provider_server_datasources(provider):
    """Tests datasources list from current Provider for each server
    between UI, DB and Management system
    Steps:
        * Get Hawkular Local server
        * Get datasources list for the server
        * Get datasources list from UI of provider, server
        * Get datasources list from Database of provider, server
        * Get datasources list from Database of provider, server
        * Get datasources list from Management system(Hawkular) of server
        * Compare size of all the list [UI, Database, Management system]
    """
    server = get_server(provider, HAWKULAR_PRODUCT_NAME)
    ui_dses = get_datasources_set(
        MiddlewareDatasource.datasources(provider=provider, server=server))
    db_dses = get_datasources_set(
        MiddlewareDatasource.datasources_in_db(provider=provider, server=server))
    mgmt_dses = get_datasources_set(
        MiddlewareDatasource.datasources_in_mgmt(provider=provider, server=server))
    assert ui_dses == db_dses == mgmt_dses, \
        ("Lists of datasources mismatch! UI:{}, DB:{}, MGMT:{}"
         .format(ui_dses, db_dses, mgmt_dses))
开发者ID:RonnyPfannschmidt,项目名称:cfme_tests,代码行数:24,代码来源:test_middleware_datasource.py

示例11: test_list_provider_server_datasources

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def test_list_provider_server_datasources(provider):
    """Tests datasources list from current Provider for each server
    between UI, DB and Management system
    Steps:
        * Get servers list from UI of provider
        * Get datasources list for the server
        * Get datasources list from UI of provider, server
        * Get datasources list from Database of provider, server
        * Get datasources list from Database of provider, server
        * Get datasources list from Management system(Hawkular) of server
        * Compare size of all the list [UI, Database, Management system]
    """
    servers = MiddlewareServer.servers(provider=provider)
    assert len(servers) > 0, "There is no server(s) available in UI"
    for server in get_random_list(servers, ITEMS_LIMIT):
        ui_dses = _get_datasources_set(
            MiddlewareDatasource.datasources(provider=provider, server=server))
        db_dses = _get_datasources_set(
            MiddlewareDatasource.datasources_in_db(provider=provider, server=server))
        mgmt_dses = _get_datasources_set(
            MiddlewareDatasource.datasources_in_mgmt(provider=provider, server=server))
        assert ui_dses == db_dses == mgmt_dses, \
            ("Lists of datasources mismatch! UI:{}, DB:{}, MGMT:{}"
             .format(ui_dses, db_dses, mgmt_dses))
开发者ID:FilipB,项目名称:cfme_tests,代码行数:26,代码来源:test_middleware_datasource.py

示例12: get_random_datasource

# 需要导入模块: from cfme.middleware.datasource import MiddlewareDatasource [as 别名]
# 或者: from cfme.middleware.datasource.MiddlewareDatasource import datasources_in_db [as 别名]
def get_random_datasource(provider):
    datasources = MiddlewareDatasource.datasources_in_db(provider=provider, strict=False)
    assert len(datasources) > 0, "There is no datasource(s) available in DB"
    return get_random_list(datasources, 1)[0]
开发者ID:jteehan,项目名称:cfme_tests,代码行数:6,代码来源:random_methods.py


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