Beispiel #1
0
    def test_two_nodes(self):
        """Verify network with two added nodes

        Scenario:
            1. Add two compute nodes
            2. Open Networks tab
            3. Click Verify Networks
            4. Verify that message 'Verification succeeded.
               Your network is configured correctly' appears
        """
        Tabs().nodes.click()
        time.sleep(1)
        Nodes().add_nodes.click()
        time.sleep(1)
        Nodes().nodes_discovered[0].checkbox.click()
        Nodes().nodes_discovered[1].checkbox.click()
        RolesPanel().compute.click()
        Nodes().apply_changes.click()
        time.sleep(1)
        Tabs().networks.click()
        time.sleep(1)
        with Networks() as n:
            n.verify_networks.click()
            self.assertIn(
                'Verification succeeded. '
                'Your network is configured correctly.',
                n.verification_alert.text, 'Verification succeeded')
    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())
    def test_vlan_id_labels_visibility(self):
        """Checking vlan id label when vlan tagging is disabled

        Scenario:
            1. Open Networks tab
            2. Disable vlan tagging for Management, Storage, VM(Fixed)
            3. Open Nodes tab
            4. Select controller node
            5. Click configure interfaces
            6. Verify that 'Vlan Id' isn't visible on Storage,
               Management, VM(Fixed) network boxes
        """
        label = 'VLAN ID'
        Tabs().networks.click()
        with Networks() as n:
            n.management.vlan_tagging.click()
            n.storage.vlan_tagging.click()
            n.fixed.vlan_tagging.click()
            n.save_settings.click()
            time.sleep(1)
        Tabs().nodes.click()
        Nodes().nodes[0].details.click()
        NodeInfo().edit_networks.click()
        with InterfacesSettings() as s:
            self.assertNotIn(label, s.interfaces[0].networks['storage'].text,
                             'vlan id is visible. Storage network')
            self.assertNotIn(label,
                             s.interfaces[0].networks['management'].text,
                             'vlan id is visible. Management network')
            self.assertNotIn(label,
                             s.interfaces[0].networks['vm (fixed)'].text,
                             'vlan id is visible. VM (Fixed) network')
    def test_configure_interfaces_of_several_nodes(self):
        """Configure interfaces on several nodes

        Scenario:
            1. Add compute node
            2. Select compute and controller node
               and click Configure interfaces
            3. Drag and drop Public network from eth0 to eth1
            4. Drag and drop Storage network from eth0 to eth2
            5. Drag and drop Management network from eth0 to eth1
            6. Click Apply
            7. Verify that Public and Management networks
               are on eth1 interface, Storage is on eth2
        """
        # Go back to nodes page
        Tabs().nodes.click()
        # Add second node
        time.sleep(1)
        Nodes().add_nodes.click()
        Nodes().nodes_discovered[2].checkbox.click()
        RolesPanel().compute.click()
        Nodes().apply_changes.click()
        time.sleep(1)
        Tabs().nodes.click()
        time.sleep(1)
        Nodes().add_nodes.click()
        Nodes().nodes_discovered[1].checkbox.click()
        RolesPanel().compute.click()
        Nodes().apply_changes.click()
        time.sleep(1)
        # rearrange interfaces
        with Nodes() as n:
            n.nodes[1].checkbox.click()
            n.nodes[2].checkbox.click()
            n.configure_interfaces.click()
        with InterfacesSettings() as s:
            ActionChains(browser.driver).drag_and_drop(
                s.interfaces[0].networks['management'],
                s.interfaces[1].networks_box).perform()
            ActionChains(browser.driver).drag_and_drop(
                s.interfaces[0].networks['storage'],
                s.interfaces[1].networks_box).perform()
            s.apply.click()
            time.sleep(1)

        for i in range(1, 3):
            # Go to nodes page
            Tabs().nodes.click()
            # Verify interfaces settings of each node
            Nodes().nodes[i].details.click()
            NodeInfo().edit_networks.click()
            self.assertIn(
                'management', s.interfaces[1].networks,
                'management at eht1. Node #{0}'.format(i))
            self.assertIn(
                'storage', s.interfaces[1].networks,
                'storage at eht1. Node #{0}'.format(i))
Beispiel #5
0
    def test_configure_disks_of_several_nodes(self):
        """Configure disks for several nodes

        Scenario:
            1. Add two compute nodes
            2. Select this two nodes and click configure disks
            3. Allocate size for Base system volume
            4. Click apply changes
            5. Verify that changes are correctly applied
        """
        values = [random.randint(100000, 500000) for i in range(4)]

        # Go back to nodes page
        Tabs().nodes.click()
        time.sleep(1)
        # Add second node
        Nodes().add_nodes.click()
        time.sleep(1)
        Nodes().select_all_in_group[1].click()
        RolesPanel().compute.click()
        Nodes().apply_changes.click()
        time.sleep(1)
        # change volumes size
        with Nodes() as n:
            n.select_all_in_group[1].click()
            n.configure_disks.click()
            time.sleep(1)

        with DisksSettings() as s:
            for i, v in enumerate(values):
                s.disks[i].volume_storage.parent.click()
                time.sleep(1)
                s.disks[i].volume_group_storage.input.\
                    clear()
                s.disks[i].volume_group_storage.input.\
                    send_keys(v)
            s.apply.click()
            time.sleep(1)

        for i in range(1, 3):
            # Go to nodes page
            Tabs().nodes.click()
            time.sleep(1)
            # Verify disks settings of each node
            Nodes().nodes[i].details.click()
            NodeInfo().edit_disks.click()
            time.sleep(1)

            for j, v in enumerate(values):
                self.assertEqual(
                    "{:,}".format(v),
                    s.disks[j].volume_group_storage.input.get_attribute(
                        'value'),
                    'Image volume size of disk {0} of node {0} is correct'.
                    format(j, i))
Beispiel #6
0
    def test_default_settings(self):
        """Create default environment

        Scenario:
            1. Create environment with default values
            2. Click on created environment
            3. Verify that correct environment name is displayed
            4. Click on information icon and verify all
               information is displayed correctly
            5. Verify all info on Networks and Settings tab
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_CENTOS)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_CENTOS)
            for i in range(6):
                w.next.click()
            w.create.click()
            w.wait_until_exists()

        cb = Environments().create_cluster_boxes[0]
        self.assertIn(OPENSTACK_CENTOS, cb.text)
        cb.click()

        with Nodes() as n:
            time.sleep(1)
            self.assertEqual(n.env_name.text, OPENSTACK_CENTOS)
            n.info_icon.click()
            self.assertIn('display: block;',
                          n.env_details.get_attribute('style'))
            self.assertIn(OPENSTACK_CENTOS, n.env_details.text)
            self.assertIn('New', n.env_details.text)
            self.assertIn('Multi-node', n.env_details.text)
            self.assertNotIn('with HA', n.env_details.text)
            n.info_icon.click()
            self.assertIn('display: none;',
                          n.env_details.get_attribute('style'))
        Tabs().networks.click()
        with Networks() as n:
            self.assertTrue(n.flatdhcp_manager.
                            find_element_by_tag_name('input').is_selected())
        Tabs().settings.click()
        with Settings() as s:
            self.assertFalse(s.install_savanna.
                             find_element_by_tag_name('input').is_selected())
            self.assertFalse(s.install_murano.
                             find_element_by_tag_name('input').is_selected())
            self.assertFalse(s.install_ceilometer.
                             find_element_by_tag_name('input').is_selected())
            self.assertTrue(s.hypervisor_qemu.
                            find_element_by_tag_name('input').is_selected())
        pass
Beispiel #7
0
    def test_storage_ceph(self):
        """Create environment with Ceph storage

        Scenario:
            1. Create environment with Ceph storage for Cinder and Glance
            2. Click on created environment
            3. Open settings tab
            4. Verify that Cinder for volumes, Ceph for volumes
               and images are selected, Ceph for rados isn't selected
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_CENTOS)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_CENTOS)
            for i in range(4):
                w.next.click()
            w.storage_cinder_ceph.click()
            w.storage_glance_ceph.click()
            w.next.click()
            w.next.click()
            w.create.click()
            w.wait_until_exists()

        cb = Environments().create_cluster_boxes[0]
        cb.click()
        Tabs().settings.click()

        with Settings() as s:
            self.assertTrue(s.ceph_for_volumes.
                            find_element_by_tag_name('input').is_selected())
            self.assertTrue(s.ceph_for_images.
                            find_element_by_tag_name('input').is_selected())
            self.assertFalse(s.ceph_rados_gw.
                             find_element_by_tag_name('input').is_selected())
Beispiel #8
0
    def test_neutron_vlan(self):
        """Create environment with Neutron VLAN network

        Scenario:
            1. Create environment with Neutron VLAN network
            2. Click on created environment
            3. Open networks tab
            4. Verify Neutron parameters are displayed and
               Neutron with vlan segmentation text is displayed
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_CENTOS)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_CENTOS)
            for i in range(3):
                w.next.click()
            w.network_neutron_vlan.click()
            for i in range(3):
                w.next.click()
            w.create.click()
            w.wait_until_exists()

        cb = Environments().create_cluster_boxes[0]
        cb.click()
        Tabs().networks.click()

        with Networks() as n:
            self.assertEqual(n.segmentation_type.text,
                             'Neutron with vlan segmentation')
            self.assertTrue(NeutronParameters().parent.is_displayed())
Beispiel #9
0
    def test_hypervisor_kvm(self):
        """Create environment with KVM hypervisor

        Scenario:
            1. Create environment with KVM hypervisor
            2. Click on created environment
            3. Open settings tab
            4. Verify KVM hypervisor is selected
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_CENTOS)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_CENTOS)
            w.next.click()
            w.next.click()
            w.hypervisor_kvm.click()
            for i in range(4):
                w.next.click()
            w.create.click()
            w.wait_until_exists()

        cb = Environments().create_cluster_boxes[0]
        cb.click()
        Tabs().settings.click()

        with Settings() as s:
            self.assertTrue(s.hypervisor_kvm.
                            find_element_by_tag_name('input').is_selected())
Beispiel #10
0
 def reset_env(cls):
     PageObject.click_element(Actions(), 'reset')
     PageObject.wait_element(Actions(), 'reset_popup')
     time.sleep(2)
     PageObject.click_element(Actions(), 'reset_popup')
     PageObject.click_element(Tabs(), 'nodes')
     PageObject.long_wait_element(Actions(), 'pending_nodes')
    def test_vlan_id_values(self):
        """Checking correctness of vlan id on Networks tab

        Scenario:
            1. Open Networks tab
            2. Enable vlan tagging for Management, Storage, VM(Fixed)
               and enter values in range from 110 to 200
            3. Open Nodes tab
            4. Select controller node
            5. Click configure interfaces
            6. Verify that 'Vlan Id' values are correct on Storage,
               Management, VM(Fixed) network boxes
        """
        label = 'VLAN ID: {0}'
        vlans = [random.randint(110, 200) for i in range(3)]
        Tabs().networks.click()
        with Networks() as n:
            n.management.vlan_id.clear()
            n.management.vlan_id.send_keys(vlans[0])

            n.storage.vlan_id.clear()
            n.storage.vlan_id.send_keys(vlans[1])

            n.fixed.vlan_id.clear()
            n.fixed.vlan_id.send_keys(vlans[2])

            n.save_settings.click()
            time.sleep(1)

        Tabs().nodes.click()
        Nodes().nodes[0].details.click()
        NodeInfo().edit_networks.click()
        with InterfacesSettings() as s:
            self.assertIn(
                label.format(vlans[0]), s.interfaces[0].
                networks['management'].text,
                'vlan id is correct. Management network')
            self.assertIn(
                label.format(vlans[1]), s.interfaces[0].
                networks['storage'].text,
                'vlan id is correct. Storage network')
            self.assertIn(
                label.format(vlans[2]), s.interfaces[0].
                networks['vm (fixed)'].text,
                'vlan id is correct. VM (Fixed) network')
Beispiel #12
0
    def setUp(self):
        """Each test precondition

        Steps:
            1. Click on created environment
            2. Open Settings tab
        """
        BaseTestCase.setUp(self)
        Environments().create_cluster_boxes[0].click()
        Tabs().settings.click()
    def setUp(self):
        """Each test precondition

        Steps:
            1. Create environment with default values
            2. Open created environment
            3. Open actions tab
        """
        BaseTestCase.clear_nailgun_database()
        preconditions.Environment.simple_flat()
        Environments().create_cluster_boxes[0].click()
        Tabs().actions.click()
    def setUp(self):
        """Each test precondition

        Steps:
            1. Create simple environment with default values
            2. Click on created environment and open Networks tab
        """
        BaseTestCase.clear_nailgun_database()
        BaseTestCase.setUp(self)
        preconditions.Environment.simple_flat()
        Tabs().networks.click()
        time.sleep(1)
    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
    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())
    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())
    def setUpClass(cls):
        """Global precondition

        Steps:
            1. Create simple environment with default values
            2. Click on created environment and open networks tab
            3. Select VLAN Manager and save settings
        """
        BaseTestCase.setUpClass()
        preconditions.Environment.simple_flat()
        Tabs().networks.click()
        with Networks() as n:
            n.vlan_manager.click()
            n.save_settings.click()
            time.sleep(1)
Beispiel #19
0
    def test_one_node(self):
        """Verify network with one added nodes

        Scenario:
            1. Add one controller node
            2. Open Networks tab
            3. Click Verify Networks
            4. Verify that message 'At least two nodes are required' appears
        """
        Tabs().nodes.click()
        time.sleep(1)
        Nodes().add_nodes.click()
        time.sleep(1)
        Nodes().nodes_discovered[0].checkbox.click()
        RolesPanel().controller.click()
        Nodes().apply_changes.click()
        time.sleep(1)
        Tabs().networks.click()
        time.sleep(1)
        with Networks() as n:
            n.verify_networks.click()
            self.assertIn(
                'At least two nodes are required', n.verification_alert.text,
                'Alert text contains "At least two nodes are required"')
    def test_rename(self):
        """Rename environment

        Scenario:
            1. Clear environment name
            2. Enter new name
            3. Click Rename
            4. Verify environment name is changed
        """
        value = 'Happy environment'
        with Actions() as a:
            a.name.clear()
            a.name.send_keys(value)
            a.rename.click()
            time.sleep(1)
        Tabs().nodes.click()
        self.assertEqual(value,
                         Nodes().env_name.text, 'Environment has been renamed')
    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())
    def test_services(self):
        """Create environment with Sahara, Murano, Ceilometer selected

        Scenario:
            1. Create environment with Install Sahara,
               Murano, Ceilometer selected
            2. Click on created environment
            3. Open settings tab
            4. Verify that Install Sahara, Murano,
               Ceilometer checkboxes are selected
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_CENTOS)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_CENTOS)
            for i in range(3):
                w.next.click()
            w.network_neutron_gre.click()
            w.next.click()
            w.next.click()
            w.install_sahara.click()
            w.install_murano.click()
            w.install_ceilometer.click()
            w.next.click()
            w.create.click()
            w.wait_until_exists()

        Tabs().settings.click()

        with Settings() as s:
            self.assertTrue(
                s.install_sahara.find_element_by_tag_name(
                    'input').is_selected())
            self.assertTrue(
                s.install_murano.find_element_by_tag_name(
                    'input').is_selected())
            self.assertTrue(
                s.install_ceilometer.find_element_by_tag_name(
                    'input').is_selected())
Beispiel #23
0
    def test_unallocated_nodes_counter(self):
        """Unallocated nodes counter

        Scenario:
            1. Add new node with compute role
            2. Verify that number of unallocated nodes was reduced on 1
        """
        initial = int(Header().unallocated_nodes.text)
        discovered = len(Nodes().nodes_discovered)

        Tabs().nodes.click()
        for i in range(discovered):
            time.sleep(1)
            Nodes().add_nodes.click()
            time.sleep(1)
            Nodes().nodes_discovered[0].checkbox.click()
            RolesPanel().compute.click()
            Nodes().apply_changes.click()
            time.sleep(1)

            self.assertEqual(str(initial - i - 1),
                             Header().unallocated_nodes.text,
                             'Unallocated nodes amount')
Beispiel #24
0
 def stop_deploy_process(cls):
     PageObject.click_element(Actions(), 'stop_deploy')
     PageObject.wait_element(Actions, "stop_deploy_popup")
     PageObject.click_element(Actions(), 'stop_deploy_popup')
     PageObject.click_element(Tabs(), 'nodes')
     PageObject.long_wait_element(Actions(), 'pending_nodes')
Beispiel #25
0
 def cancel_reset(cls):
     Actions().reset.click()
     PageObject.click_element(Actions(), 'cancel_popup')
     PageObject.click_element(Tabs(), 'nodes')
Beispiel #26
0
 def setUp(self):
     BaseTestCase.setUp(self)
     Environments().create_cluster_boxes[0].click()
     Tabs().networks.click()
     time.sleep(1)