Ejemplo n.º 1
0
    def test_reset_redeploy(self):
        """Reset environment after deploy changes

        Scenario:
            1. Add controller and compute nodes
            2. Click deploy
            3. Add new compute node and deploy changes
            4. Reset environment
            4. Verify that environment is reseted
        """
        Tabs().nodes.click()
        Nodes().add_controller_compute_nodes()
        Nodes().deploy_changes.click()
        DeployChangesPopup().deploy.click()
        TaskResultAlert().close.click()
        Nodes().add_nodes.click()
        Nodes().nodes_discovered[0].checkbox.click()
        RolesPanel().compute.click()
        Nodes().apply_changes.click()
        PageObject.wait_until_exists(Nodes().apply_changes)
        Nodes().deploy_changes.click()
        DeployChangesPopup().deploy.click()
        TaskResultAlert().close.click()
        Tabs().actions.click()
        Actions().reset_env()
        Tabs().nodes.click()
        for node in Nodes().nodes:
            self.assertEqual('pending addition', node.status.text.lower(),
                             'Node status is Pending Addition')
        self.assertTrue(Nodes().deploy_changes.is_enabled())
Ejemplo n.º 2
0
    def test_delete_node(self):
        """Delete one node and deploy changes

        Scenario:
            1. Add controller and compute node
            2. Deploy changes
            3. Delete one node
            4. Deploy changes
            5. Verify that only one node is present
        """
        self.test_add_nodes()

        with Nodes() as n:
            n.nodes[1].checkbox.click()
            n.delete_nodes.click()
        with DeleteNodePopup() as p:
            p.delete.click()
            p.wait_until_exists()
            time.sleep(1)

        self.assertEqual(
            'pending deletion', Nodes().nodes[1].status.text.lower(),
            'Node status is Pending Deletion')

        Nodes().deploy_changes.click()
        DeployChangesPopup().deploy.click()
        TaskResultAlert().close.click()

        with Nodes() as n:
            self.assertEqual(1, len(n.nodes), 'Nodes amount')
            for node in n.nodes:
                self.assertEqual('ready', node.status.text.lower(),
                                 'Node status is READY')
Ejemplo n.º 3
0
    def test_add_nodes(self):
        """Deploy environment with controller and compute nodes

        Scenario:
            1. Add controller and compute node
            2. Deploy changes
            3. Verify that nodes statuses are ready
        """
        Nodes().add_nodes.click()
        Nodes().nodes_discovered[0].checkbox.click()
        RolesPanel().controller.click()
        Nodes().apply_changes.click()
        time.sleep(2)
        Nodes().add_nodes.click()
        time.sleep(1)
        Nodes().nodes_discovered[0].checkbox.click()
        RolesPanel().compute.click()
        Nodes().apply_changes.click()
        time.sleep(1)

        for node in Nodes().nodes:
            self.assertEqual(
                'pending addition', node.status.text.lower(),
                'Node status is Pending Addition')

        Nodes().deploy_changes.click()
        DeployChangesPopup().deploy.click()
        TaskResultAlert().close.click()

        with Nodes() as n:
            self.assertEqual(2, len(n.nodes), 'Nodes amount')
            for node in n.nodes:
                self.assertEqual('ready', node.status.text.lower(),
                                 'Node status is READY')
Ejemplo n.º 4
0
    def test_stop_deploy(self):
        """Stop deploy

        Scenario:
            1. Add controller and compute nodes
            2. Click deploy
            3. Click stop
            4. Verify that environment isn't deployed
        """
        Tabs().nodes.click()
        Nodes().add_controller_compute_nodes()
        Nodes().deploy_changes.click()
        DeployChangesPopup().deploy.click()
        Actions().cancel_popup.click()
        Actions().stop_deploy_process()
        PageObject.find_element(Nodes(), 'nodes', 'status', 0)
        for node in Nodes().nodes:
            self.assertEqual('pending addition', node.status.text.lower(),
                             'Node status is Pending Addition')
        self.assertTrue(Nodes().deploy_changes.is_enabled())
Ejemplo n.º 5
0
    def test_cancel_reset(self):
        """Cancel reset environment

        Scenario:
            1. Add controller and compute nodes
            2. Deploy claster
            3. Click reset after deploying and click cancel on popup
            4. Verify that environment isn't reseted
        """
        Tabs().nodes.click()
        Nodes().add_controller_compute_nodes()
        Nodes().deploy_changes.click()
        DeployChangesPopup().deploy.click()
        TaskResultAlert().close.click()
        Tabs().actions.click()
        Actions().cancel_reset()
        Tabs().nodes.click()
        for node in Nodes().nodes:
            self.assertEqual('ready', node.status.text.lower(),
                             'Node status is Ready')
        Actions().verify_disabled_deploy
Ejemplo n.º 6
0
    def test_simple_reset(self):
        """Reset simple environment

        Scenario:
            1. Add controller and compute nodes
            2. Deploy claster
            3. Click reset after deploying
            4. Verify that environment is reseted
        """
        Tabs().nodes.click()
        Nodes().add_controller_compute_nodes()
        Nodes().deploy_changes.click()
        DeployChangesPopup().deploy.click()
        TaskResultAlert().close.click()
        Tabs().actions.click()
        Actions().reset_env()
        Tabs().nodes.click()
        for node in Nodes().nodes:
            self.assertEqual('pending addition', node.status.text.lower(),
                             'Node status is Pending Addition')
        self.assertTrue(Nodes().deploy_changes.is_enabled())
Ejemplo n.º 7
0
    def deploy_nodes(controllers=0, computes=0, cinders=0, cephs=0):
        def add(role, amount):
            if amount < 1:
                return

            Nodes().add_nodes.click()
            time.sleep(1)
            for i in range(amount):
                Nodes().nodes_discovered[i].checkbox.click()
            getattr(RolesPanel(), role).click()
            Nodes().apply_changes.click()
            time.sleep(1)

        add('controller', controllers)
        add('compute', computes)
        add('cinder', cinders)
        add('ceph_osd', cephs)

        time.sleep(1)
        Nodes().deploy_changes.click()
        DeployChangesPopup().deploy.click()
        TaskResultAlert().close.click()
Ejemplo n.º 8
0
    def test_stop_reset(self):
        """Stop and then reset environment

        Scenario:
            1. Add controller and compute nodes
            2. Click deploy
            3. Click stop
            4. Reset environment
            4. Verify that environment is reseted
        """
        Tabs().nodes.click()
        Nodes().add_controller_compute_nodes()
        Nodes().deploy_changes.click()
        DeployChangesPopup().deploy.click()
        Actions().cancel_popup.click()
        Actions().stop_deploy_process()
        Tabs().actions.click()
        Actions().reset_env()
        Tabs().nodes.click()
        for node in Nodes().nodes:
            self.assertEqual('pending addition', node.status.text.lower(),
                             'Node status is Pending Addition')
        self.assertTrue(Nodes().deploy_changes.is_enabled())
Ejemplo n.º 9
0
    def test_node_configure_networks_is_readonly(self):
        """Configure network interfaces after deploy

        Scenario:
            1. Add controller node
            2. Deploy changes
            3. Select controller node and click configure interfaces
            4. Drag and drop Storage network to eth1
            5. Verify that Storage network can't be dragged and dropped
            6. Apply, Load defaults, Cancel Changes buttons are not active
        """
        Nodes().add_nodes.click()
        Nodes().nodes_discovered[0].checkbox.click()
        RolesPanel().controller.click()
        Nodes().apply_changes.click()
        time.sleep(2)
        Nodes().deploy_changes.click()
        DeployChangesPopup().deploy.click()
        time.sleep(1)

        Nodes().nodes[0].details.click()
        NodeInfo().edit_networks.click()

        with InterfacesSettings() as s:
            ActionChains(browser.driver).drag_and_drop(
                s.interfaces[0].networks['storage'],
                s.interfaces[1].networks_box).perform()

            time.sleep(1)
            self.assertNotIn(
                'storage', s.interfaces[1].networks,
                'storage at eht1')
            self.assertFalse(s.apply.is_enabled(), 'Apply is disabled')
            self.assertFalse(s.load_defaults.is_enabled(),
                             'Load defaults is disabled')
            self.assertFalse(s.cancel_changes.is_enabled(),
                             'Cancel changes is disabled')
Ejemplo n.º 10
0
    def test_node_configure_disks_is_readonly(self):
        """Configure disks after deploy

        Scenario:
            1. Add controller node
            2. Deploy changes
            3. Select controller node and click configure disks
            4. Verify that volume inputs are disabled
            6. Apply, Load defaults, Cancel Changes buttons are not active
        """
        Nodes().add_nodes.click()
        Nodes().nodes_discovered[0].checkbox.click()
        RolesPanel().controller.click()
        Nodes().apply_changes.click()
        time.sleep(2)
        Nodes().deploy_changes.click()
        DeployChangesPopup().deploy.click()
        time.sleep(1)

        Nodes().nodes[0].details.click()
        NodeInfo().edit_disks.click()
        time.sleep(1)

        with DisksSettings() as s:
            for i in range(2):
                self.assertFalse(
                    s.disks[i].volume_group_os.input.is_enabled(),
                    'Base system input is disabled at disk #{0}'.format(i))
                self.assertFalse(
                    s.disks[i].volume_group_image.input.is_enabled(),
                    'Image storage input is disabled at disk #{0}'.format(i))
            self.assertFalse(s.apply.is_enabled(), 'Apply is disabled')
            self.assertFalse(s.load_defaults.is_enabled(),
                             'Load defaults is disabled')
            self.assertFalse(s.cancel_changes.is_enabled(),
                             'Cancel changes is disabled')