class HostManagePoliciesView(BaseLoggedInPage):
    """Host's Manage Policies view."""
    policies = BootstrapTreeview("protectbox")
    entities = View.nested(BaseNonInteractiveEntitiesView)
    save_button = Button("Save")
    reset_button = Button("Reset")
    cancel_button = Button("Cancel")

    @property
    def is_displayed(self):
        return False
Exemple #2
0
class StorageManagePoliciesView(StorageManagerView):
    """The policies page for Storage Manager or Provider"""
    breadcrumb = BreadCrumb()
    policies = BootstrapTreeview("protectbox")
    save = Button("Save")
    reset = Button("Reset")
    cancel = Button("Cancel")

    @property
    def is_displayed(self):
        return (self.in_manager and self.breadcrumb.active_location
                == "'Storage Manager' Policy Assignment")
class PhysicalServerManagePoliciesView(BaseLoggedInPage):
    """PhysicalServer's Manage Policies view."""
    policies = BootstrapTreeview("protectbox")
    entities = View.nested(BaseNonInteractiveEntitiesView)
    save = Button("Save")
    reset = Button("Reset")
    cancel = Button("Cancel")
    breadcrumb = BreadCrumb(locator='.//ol[@class="breadcrumb"]')

    @property
    def is_displayed(self):
        title = "'Physical Server' Policy Assignment"
        return self.breadcrumb.active_location == title
Exemple #4
0
class ProvidersManagePoliciesView(BaseLoggedInPage):
    """
     Provider's Manage Policies view
    """
    policies = VersionPick({Version.lowest(): DynaTree('protect_treebox'),
                            '5.7': BootstrapTreeview('protectbox')})
    save = Button('Save')
    reset = Button('Reset')
    cancel = Button('Cancel')

    @property
    def is_displayed(self):
        return False
class DeploymentRoleManagePoliciesView(DeploymentRoleView):
    """Deployment role Manage Policies view."""
    breadcrumb = BreadCrumb()
    policies = BootstrapTreeview("protectbox")
    save_button = Button("Save")
    reset_button = Button("Reset")
    cancel_button = Button("Cancel")

    @property
    def is_displayed(self):
        """Is this page currently displayed"""
        return (self.in_dep_role
                and (self.breadcrumb.active_location
                     == "'Cluster / Deployment Role' Policy Assignment"
                     or self.breadcrumb.active_location
                     == "'Deployment Role' Policy Assignment"))
class ProvidersManagePoliciesView(BaseLoggedInPage):
    """
     Provider's Manage Policies view
    """
    policies = VersionPick({
        Version.lowest(): DynaTree('protect_treebox'),
        '5.7': BootstrapTreeview('protectbox')
    })

    @View.nested
    class entities(BaseNonInteractiveEntitiesView):  # noqa
        @property
        def entity_class(self):
            return ProviderEntity().pick(self.browser.product_version)

    save = Button('Save')
    reset = Button('Reset')
    cancel = Button('Cancel')

    @property
    def is_displayed(self):
        return False