Beispiel #1
0
from . import details_page

list_tbl = CheckboxTable(table_locator="//div[@id='list_grid']//table")

nav.add_branch(
    'containers_containers', {
        'containers_container':
        lambda ctx: list_tbl.select_row_by_cells(
            {
                'Name': ctx['container'].name,
                'Pod Name': ctx['container'].pod.name
            }),
        'containers_container_detail':
        lambda ctx: list_tbl.click_row_by_cells(
            {
                'Name': ctx['container'].name,
                'Pod Name': ctx['container'].pod.name
            }),
    })


class Container(Taggable, SummaryMixin):
    def __init__(self, name, pod):
        self.name = name
        self.pod = pod

    def _on_detail_page(self):
        return sel.is_displayed(
            '//div//h1[contains(., "{} (Summary)")]'.format(self.name))

    def load_details(self, refresh=False):
Beispiel #2
0
from cfme.fixtures import pytest_selenium as sel
from cfme.web_ui import toolbar as tb, CheckboxTable
from cfme.web_ui.menu import nav
from . import details_page

list_tbl = CheckboxTable(table_locator="//div[@id='list_grid']//table")

nav.add_branch(
    'containers_replicators',
    {
        'containers_replicator':
        lambda ctx: list_tbl.select_row_by_cells(
            {'Name': ctx['replicator'].name, 'Provider': ctx['replicator'].provider.name}),

        'containers_replicator_detail':
        lambda ctx: list_tbl.click_row_by_cells(
            {'Name': ctx['replicator'].name, 'Provider': ctx['replicator'].provider.name}),
    }
)


class Replicator(Taggable, SummaryMixin):

    def __init__(self, name, provider):
        self.name = name
        self.provider = provider

    def _on_detail_page(self):
        return sel.is_displayed('//div//h1[contains(., "{} (Summary)")]'.format(self.name))

    def load_details(self, refresh=False):
        if not self._on_detail_page():
Beispiel #3
0
from cfme.fixtures import pytest_selenium as sel
from cfme.web_ui import CheckboxTable, toolbar as tb
from cfme.web_ui.menu import nav
from . import details_page

list_tbl = CheckboxTable(table_locator="//div[@id='list_grid']//table")

nav.add_branch(
    'containers_containers',
    {
        'containers_container':
        lambda ctx: list_tbl.select_row_by_cells(
            {'Name': ctx['container'].name, 'Pod Name': ctx['container'].pod.name}),

        'containers_container_detail':
        lambda ctx: list_tbl.click_row_by_cells(
            {'Name': ctx['container'].name, 'Pod Name': ctx['container'].pod.name}),
    }
)


class Container(Taggable, SummaryMixin):

    def __init__(self, name, pod):
        self.name = name
        self.pod = pod

    def _on_detail_page(self):
        return sel.is_displayed(
            '//div//h1[contains(., "{} (Summary)")]'.format(self.name))

    def load_details(self, refresh=False):
Beispiel #4
0
from cfme.fixtures import pytest_selenium as sel
from cfme.web_ui import toolbar as tb, CheckboxTable
from cfme.web_ui.menu import nav
from . import details_page

list_tbl = CheckboxTable(table_locator="//div[@id='list_grid']//table")

nav.add_branch(
    'containers_services',
    {
        'containers_service':
        lambda ctx: list_tbl.select_row_by_cells(
            {'Name': ctx['service'].name, 'Provider': ctx['service'].provider.name}),

        'containers_service_detail':
        lambda ctx: list_tbl.click_row_by_cells(
            {'Name': ctx['service'].name, 'Provider': ctx['service'].provider.name}),
    }
)


class Service(Taggable, SummaryMixin):

    def __init__(self, name, provider):
        self.name = name
        self.provider = provider

    def _on_detail_page(self):
        return sel.is_displayed(
            '//div//h1[contains(., "{} (Summary)")]'.format(self.name))

    def load_details(self, refresh=False):
Beispiel #5
0
                                   t_mds.properties).join(t_ms,
                                            t_mds.server_id == t_ms.id).join(t_ems,
                                            t_mds.ems_id == t_ems.id)
    if name:
        query = query.filter(t_mds.name == name)
    if server:
        query = query.filter(t_mds.nativeid.like('%{}%'.format(server)))
    if provider:
        query = query.filter(t_ems.name == provider)
    return query

nav.add_branch(
    'middleware_datasources', {
        'middleware_datasource': lambda ctx: list_tbl.select_row('Datasource Name', ctx['name']),
        'middleware_datasource_detail':
            lambda ctx: list_tbl.click_row_by_cells({'Datasource Name': ctx['name']}),
    }
)


class MiddlewareDatasource(MiddlewareBase, Taggable):
    """
    MiddlewareDatasource class provides details on datasource page.
    Class methods available to get existing datasources list

    Args:
        name: Name of the datasource
        provider: Provider object (HawkularProvider)
        id: Native id (internal id) of datasource
        server: Server name of the datasource
        properties: Datasource driver name, connection URL and JNDI name
Beispiel #6
0
                                   t_md.ems_ref, t_ms.name, t_ems.name).join(t_ms,
                                            t_md.server_id == t_ms.id).join(t_ems,
                                            t_md.ems_id == t_ems.id)
    if name:
        query = query.filter(t_md.name == name)
    if server:
        query = query.filter(t_md.nativeid.like('%{}%'.format(server)))
    if provider:
        query = query.filter(t_ems.name == provider)
    return query

nav.add_branch(
    'middleware_deployments', {
        'middleware_deployment': lambda ctx: list_tbl.select_row('Deployment Name', ctx['name']),
        'middleware_deployment_detail':
            lambda ctx: list_tbl.click_row_by_cells({'Deployment Name': ctx['name']}),
    }
)


class MiddlewareDeployment(MiddlewareBase):
    """
    MiddlewareDeployment class provides details on deployment page.
    Class methods available to get existing deployments list

    Args:
        name: Name of the deployment
        provider: Provider object (HawkularProvider)
        id: Native id (internal id) of deployment
        server: Server name of the deployment
Beispiel #7
0
from . import details_page

list_tbl = CheckboxTable(table_locator="//div[@id='list_grid']//table")

nav.add_branch(
    'containers_services', {
        'containers_service':
        lambda ctx: list_tbl.select_row_by_cells(
            {
                'Name': ctx['service'].name,
                'Provider': ctx['service'].provider.name
            }),
        'containers_service_detail':
        lambda ctx: list_tbl.click_row_by_cells(
            {
                'Name': ctx['service'].name,
                'Provider': ctx['service'].provider.name
            }),
    })


class Service(Taggable, SummaryMixin):
    def __init__(self, name, provider):
        self.name = name
        self.provider = provider

    def _on_detail_page(self):
        return sel.is_displayed(
            '//div//h1[contains(., "{} (Summary)")]'.format(self.name))

    def load_details(self, refresh=False):
Beispiel #8
0
from cfme.common import SummaryMixin, Taggable
from cfme.fixtures import pytest_selenium as sel
from cfme.web_ui import CheckboxTable, toolbar as tb
from cfme.web_ui.menu import nav

list_tbl = CheckboxTable(table_locator="//div[@id='list_grid']//table")

nav.add_branch(
    'containers_image_registries',
    {
        'containers_image_registry':
        lambda ctx: list_tbl.select_row_by_cells(
            {'Host': ctx['image_registry'].host, 'Provider': ctx['image_registry'].provider.name}),

        'containers_image_registry_detail':
        lambda ctx: list_tbl.click_row_by_cells(
            {'Host': ctx['image_registry'].host, 'Provider': ctx['image_registry'].provider.name}),
    }
)


class ImageRegistry(Taggable, SummaryMixin):

    def __init__(self, host, provider):
        self.host = host
        self.provider = provider

    def load_details(self, refresh=False):
        if not self._on_detail_page():
            self.navigate(detail=True)
        elif refresh:
            tb.refresh()
Beispiel #9
0
    t_ems = cfmedb()['ext_management_systems']
    query = cfmedb().session.query(t_ms.name, t_ms.feed,
                                   t_ms.product, t_ems.name).join(t_ems, t_ms.ems_id == t_ems.id)
    if name:
        query = query.filter(t_ms.name == name)
    if server:
        query = query.filter(t_ms.nativeid.like('%{}%'.format(server)))
    if provider:
        query = query.filter(t_ems.name == provider)
    return query

nav.add_branch(
    'middleware_servers', {
        'middleware_server': lambda ctx: list_tbl.select_row('Server Name', ctx['name']),
        'middleware_server_detail':
            lambda ctx: list_tbl.click_row_by_cells({'Server Name': ctx['name']}),
    }
)


class MiddlewareServer(MiddlewareBase, Taggable):
    """
    MiddlewareServer class provides actions and details on Server page.
    Class method available to get existing servers list

    Args:
        name: name of the server
        provider: Provider object (HawkularProvider)
        product: Product type of the server
        id: Native id(internal id) of the server