Exemple #1
0
 def test_popup(node):
     node.details.click()
     with NodeInfo() as details:
         self.assertEqual(node.name.text, details.header.text,
                          'Node name')
         details.close.click()
         details.wait_until_exists()
    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))
Exemple #4
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))
    def setUp(self):
        """Each test precondition

        Steps:
            1. Click on created environment
            2. Select controller node
            3. Click Configure Interfaces
        """
        BaseTestCase.setUp(self)
        Environments().create_cluster_boxes[0].click()
        Nodes().nodes[0].details.click()
        NodeInfo().edit_networks.click()
    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')
    def setUp(self):
        """Each test precondition

        Steps:
            1. Create environment with Neutron gre
            2. Open created environment
            3. Add controller node
            4. Open interface configuration of the node
        """
        BaseTestCase.clear_nailgun_database()
        BaseTestCase.setUp(self)
        preconditions.Environment.simple_neutron_gre()
        PageObject.click_element(Nodes(), 'add_nodes')
        PageObject.click_element(Nodes(), 'nodes_discovered', 'checkbox', 0)
        RolesPanel().controller.click()
        Nodes().apply_changes.click()
        PageObject.wait_until_exists(Nodes().apply_changes)
        Nodes().nodes[0].details.click()
        NodeInfo().edit_networks.click()
    def setUp(self):
        """Each test precondition

        Steps:
            1. Create simple environment with default values
            2. Click on created environment
            3. Create controller node
            4. Select controller node
            5. Click Configure Interfaces
        """
        BaseTestCase.clear_nailgun_database()
        BaseTestCase.setUp(self)
        preconditions.Environment.simple_flat()
        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)
        Nodes().nodes[0].details.click()
        NodeInfo().edit_networks.click()
        time.sleep(1)
Exemple #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')
Exemple #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')