示例#1
0
class ResourcePoolEntities(View):
    """Entities on the main list page"""
    title = Text('//div[@id="main-content"]//h1')
    table = Table("//div[@id='list_grid']//table")
    search = View.nested(Search)
    # element attributes changed from id to class in upstream-fine+, capture both with locator
    flash = FlashMessages('.//div[@id="flash_msg_div"]'
                          '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]')
示例#2
0
class TimeProfileForm(View):
    description = Input(id='description')
    scope = BootstrapSelect('profile_type')
    timezone = BootstrapSelect('profile_tz')
    days = BootstrapSwitch(name='all_days')
    hours = BootstrapSwitch(name='all_hours')
    cancel = Button('Cancel')
    help_block = Text('//span[contains(@class, "help-block")]')
示例#3
0
class ClusterDetailsEntities(View):
    """A cluster properties on the details page"""
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
    relationships = SummaryTable(title='Relationships')
    totals_for_hosts = SummaryTable(title='Totals for Hosts')
    totals_for_vms = SummaryTable(title='Totals for VMs')
    configuration = SummaryTable(title='Configuration')
    smart_management = SummaryTable(title='Smart Management')
示例#4
0
class StackOutputsEntities(View):
    """The entities of the resources page"""
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
    outputs = Table('//div[@id="list_grid"]//table')
    # element attributes changed from id to class in upstream-fine+, capture both with locator
    flash = FlashMessages(
        './/div[@id="flash_msg_div"]'
        '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]')
示例#5
0
class ClusterEntities(View):
    """A list of clusters"""
    title = Text('//div[@id="main-content"]//h1')
    table = Table('//div[@id="list_grid"]//table')
    search = View.nested(Search)
    # element attributes changed from id to class in upstream-fine+, capture both with locator
    flash = FlashMessages(
        './/div[@id="flash_msg_div"]'
        '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]')
class KeyPairDetailsEntities(View):
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
    flash = FlashMessages(
        './/div[@id="flash_msg_div"]'
        '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]')
    properties = SummaryTable(title='Properties')
    relationships = SummaryTable(title='Relationships')
    smart_management = SummaryTable(title='Smart Management')
class ResourcePoolView(BaseLoggedInPage):
    """Base view for header and nav checking, navigatable views should inherit this"""
    title = Text('//div[@id="main-content"]//h1')

    @property
    def in_resource_pool(self):
        nav_chain = ['Compute', 'Infrastructure', 'Resource Pools']
        return (self.logged_in_as_current_user
                and self.navigation.currently_selected == nav_chain)
示例#8
0
class NodeUtilizationView(NodeView):
    """View for utilization of a node"""
    title = Text('//div[@id="main-content"]//h1')

    @property
    def is_displayed(self):
        """Is this page currently being displayed"""
        return (self.in_node
                and self.title.text == '{} Capacity & Utilization'.format(
                    self.context['object'].name))
示例#9
0
class TenantDetailsEntities(View):
    """The entities on the details page"""
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
    relationships = SummaryTable(title='Relationships')
    quotas = SummaryTable(title='Quotas')
    smart_management = SummaryTable(title='Smart Management')
    # element attributes changed from id to class in upstream-fine+, capture both with locator
    flash = FlashMessages('.//div[@id="flash_msg_div"]'
                          '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]')
示例#10
0
class DeploymentRoleView(BaseLoggedInPage):
    """A base view for all the Deployment Role pages"""
    title = Text('.//div[@id="center_div" or @id="main-content"]//h1')

    @property
    def in_dep_role(self):
        """Determine if the Deployment page is currently open"""
        return (self.logged_in_as_current_user
                and self.navigation.currently_selected
                == ['Compute', 'Infrastructure', 'Deployment Roles'])
示例#11
0
class ClusterDetailsEntities(View):
    """A cluster properties on the details page"""
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
    relationships = SummaryTable(title='Relationships')
    totals_for_hosts = SummaryTable(title='Totals for Hosts')
    totals_for_vms = SummaryTable(title='Totals for VMs')
    configuration = SummaryTable(title='Configuration')
    smart_management = SummaryTable(title='Smart Management')
    # element attributes changed from id to class in upstream-fine+, capture both with locator
    flash = FlashMessages('.//div[@id="flash_msg_div"]'
                          '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]')
示例#12
0
class TimeProfileAddForm(View):
    description = Input(id='description')
    scope = BootstrapSelect('profile_type')
    timezone = BootstrapSelect('profile_tz')
    days = BootstrapSwitch(name='all_days')
    hours = BootstrapSwitch(name='all_hours')
    save_button = Button(VersionPick({Version.lowest(): 'Save', '5.9': 'Add'}))
    configuration = Dropdown('Configuration')
    table = Table("//div[@id='main_div']//table")
    save_edit_button = Button('Save')
    cancel_button = Button('Cancel')
    help_block = Text("//span[contains(@class, 'help-block')]")
示例#13
0
class FlavorEditTagsView(FlavorView):
    @property
    def is_displayed(self):
        return (self.in_availability_zones
                and self.entities.title.text == 'Tag Assignment'
                and '{} (Summary)'.format(self.context['object'].name)
                in self.entities.breadcrumb.locations)

    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h3')
    save = Button('Save')
    reset = Button('Reset')
    cancel = Button('Cancel')
示例#14
0
class DeploymentRoleEditTagsView(DeploymentRoleView):
    """The edit tags of Deployment Role"""
    breadcrumb = BreadCrumb()
    title = Text('#explorer_title_text')
    select_tag = BootstrapSelect('tag_cat')
    select_value = BootstrapSelect('tag_add')
    save_button = Button('Save')
    reset_button = Button('Reset')
    cancel = Button('Cancel')

    @property
    def is_displayed(self):
        """Is this page currently being displayed"""
        return (self.in_dep_role
                and self.breadcrumb.active_location == 'Tag Assignment')
class AvailabilityZoneEditTagsView(AvailabilityZoneView):
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h3')
    # TODO Add tag table support when rowspan is supported in SummaryTable
    # TODO Add quadicon area
    save = Button('Save')
    reset = Button('Reset')
    cancel = Button('Cancel')

    @property
    def is_displayed(self):
        return (
            self.in_availability_zones and
            self.title.text == 'Tag Assignment' and
            '{} (Summary)'.format(self.context['object'].name) in self.breadcrumb.locations)
示例#16
0
class MySettingsEntities(View):
    table = Table('//div[@id="main_div"]//table')
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h3')
示例#17
0
class TenantEditTagEntities(View):
    """The entities on the edit tags page"""
    breadcrumb = BreadCrumb()
    title = Text('#explorer_title_text')
    included_widgets = View.include(BaseNonInteractiveEntitiesView,
                                    use_parent=True)
示例#18
0
class TenantEditEntities(View):
    """The entities on the add/edit page"""
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
示例#19
0
class KeyPairAddEntities(View):
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
示例#20
0
class StackParametersEntities(View):
    """The entities of the resources page"""
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
    parameters = Table('//div[@id="list_grid"]//table')
示例#21
0
class KeyPairDetailsEntities(View):
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
    properties = SummaryTable(title='Properties')
    relationships = SummaryTable(title='Relationships')
    smart_management = SummaryTable(title='Smart Management')
class AvailabilityZoneDetailsEntities(View):
    """View containing the widgets for the main content pane on the details page"""
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
    relationships = SummaryTable(title='Relationships')
    smart_management = SummaryTable(title='Smart Management')
示例#23
0
class TimeprofileAddEntities(View):
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h3')
示例#24
0
class StackOutputsEntities(View):
    """The entities of the resources page"""
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
    outputs = Table('//div[@id="gtl_div"]//table')
示例#25
0
class FlavorEntities(View):
    title = Text('//div[@id="main-content"]//h1')
    table = Table("//div[@id='gtl_div']//table")
    search = View.nested(Search)
示例#26
0
class SecurityGroupAddEntities(View):
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h1')
示例#27
0
class AvailabilityZoneEntities(View):
    """View containing the widgets for the main content pane"""
    title = Text('//div[@id="main-content"]//h1')
    table = Table("//div[@id='gtl_div']//table")
    search = View.nested(Search)
示例#28
0
class InfraNetworkingEntities(View):
    """Entities on the main page"""
    title = Text('//div[@id="main-content"]//h1')
示例#29
0
class TimeProfilesView(BaseLoggedInPage):
    table = Table("//div[@id='main_div']//table")
    help_block = Text("//span[contains(@class, 'help-block')]")
    configuration = Dropdown('Configuration')
示例#30
0
class TimeProfileEntities(View):
    table = Table('//div[@id="main_div"]//table')
    breadcrumb = BreadCrumb()
    title = Text('//div[@id="main-content"]//h3')