예제 #1
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())
예제 #2
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())
예제 #3
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())
예제 #4
0
    def test_ha_mode(self):
        """Create environment with HA mode

        Scenario:
            1. Create environment with HA mode
            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
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_CENTOS)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_CENTOS)
            w.next.click()
            w.mode_ha_compact.click()
            for i in range(5):
                w.next.click()
            w.create.click()
            w.wait_until_exists()

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

        with Nodes() as n:
            self.assertEqual(PageObject.get_text(n, 'env_name'),
                             OPENSTACK_CENTOS)
            PageObject.click_element(n, 'info_icon')
            self.assertIn(OPENSTACK_CENTOS, PageObject.get_text
                          (n, 'env_details'))
            self.assertIn('Multi-node with HA', n.env_details.text)
예제 #5
0
    def setUpClass(cls):
        """Global precondition

        Steps:
            1. Create simple environment with default values
            2. Add one controller node
            3. Add other nodes as compute
        """
        BaseTestCase.setUpClass()
        BaseTestCase.get_home()
        preconditions.Environment().simple_flat()
        BaseTestCase.get_home()
        Environments().create_cluster_boxes[0].click()
        time.sleep(1)

        # Add controller
        Nodes().add_nodes.click()
        time.sleep(1)
        Nodes().nodes_discovered[0].checkbox.click()
        RolesPanel().controller.click()
        Nodes().apply_changes.click()
        time.sleep(1)

        # Add other discovered nodes as compute
        Nodes().add_nodes.click()
        time.sleep(1)
        for n in Nodes().nodes_discovered:
            n.checkbox.click()
        RolesPanel().compute.click()
        Nodes().apply_changes.click()
    def test_simple_mode(self):
        """Create environment with simple mode

        Scenario:
            1. Create environment with simple mode
            2. Click on created environment
            3. Verify that correct environment name is displayed
            4. Verify all information is displayed correctly
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_CENTOS)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_CENTOS)
            w.next.click()
            w.mode_multinode.click()
            for i in range(5):
                w.next.click()
            w.create.click()
            w.wait_until_exists()

        self.get_home()
        cb = Environments().create_cluster_boxes[0]
        cb.click()

        with Nodes() as n:
            self.assertIn(OPENSTACK_CENTOS,
                          PageObject.get_text(n, 'env_summary'))
            self.assertIn('Multi-node', n.env_summary.text)
예제 #7
0
    def test_name_exists(self):
        """Test existing environment name

        Scenario:
            1. Create environment with 'test name'
            2. Click create environment again
            3. Enter 'test name'
            4. Click next button
            5. Verify that message 'Environment with name test name
               already exists' appears
        """
        name = 'test name'
        with Wizard() as w:
            w.name.send_keys(name)
            for i in range(6):
                w.next.click()
            w.create.click()
            w.wait_until_exists()

        self.get_home()
        Environments().create_cluster_box.click()
        with Wizard() as w:
            w.name.send_keys(name)
            w.next.click()
            time.sleep(1)
            self.assertIn(
                'Environment with name "{}" already exists'.format(name),
                w.name.find_element_by_xpath('..').text)
예제 #8
0
    def test_cancel_button(self):
        """Cancel environment wizard

        Scenario:
            1. Enter environment name
            2. Select Havana on Ubuntu in release list and click next
            3. Select HA mode and click next
            4. Select KVM hypervisor and click next
            5. Select Neutron with GRE and click next
            6. Select Ceph options for Cinder and Glance and click next
            7. Select install Savanna, Murano and click next
            8. Click cancel button
            9. Click create environment again and check that
               all default values are selected
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_RELEASE_UBUNTU)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_UBUNTU)
            w.next.click()
            w.mode_ha_compact.click()
            w.next.click()
            w.hypervisor_kvm.click()
            w.next.click()
            w.network_neutron_gre.click()
            w.next.click()
            w.storage_cinder_ceph.click()
            w.storage_glance_ceph.click()
            w.next.click()
            w.install_savanna.click()
            w.install_murano.click()
            w.next.click()
            w.cancel.click()
            PageObject.wait_until_exists(w.parent)

        Environments().create_cluster_box.click()
        with Wizard() as w:
            self.assertEqual(w.name.get_attribute('value'), '')
            self.assertEqual(w.release.first_selected_option.text,
                             OPENSTACK_RELEASE_CENTOS)
            w.name.send_keys(OPENSTACK_RELEASE_UBUNTU)
            w.next.click()
            self.assertTrue(w.mode_multinode.
                            find_element_by_tag_name('input').is_selected())
            w.next.click()
            self.assertTrue(w.hypervisor_qemu.
                            find_element_by_tag_name('input').is_selected())
            w.next.click()
            self.assertTrue(w.network_nova.
                            find_element_by_tag_name('input').is_selected())
            w.next.click()
            self.assertTrue(w.storage_cinder_default.
                            find_element_by_tag_name('input').is_selected())
            self.assertTrue(w.storage_glance_default.
                            find_element_by_tag_name('input').is_selected())
            w.next.click()
            self.assertFalse(w.install_savanna.
                             find_element_by_tag_name('input').is_selected())
            self.assertFalse(w.install_murano.
                             find_element_by_tag_name('input').is_selected())
예제 #9
0
    def setUp(self):
        """Each test precondition

        Steps:
            1. Click on create environment
        """
        BaseTestCase.setUp(self)
        Environments().create_cluster_box.click()
예제 #10
0
    def setUp(self):
        """Each test precondition

        Steps:
            1. Click on create environment
        """
        self.clear_nailgun_database()
        BaseTestCase.setUp(self)
        Environments().create_cluster_box.click()
예제 #11
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()
예제 #12
0
 def simple_flat(name=OPENSTACK_CENTOS, release=OPENSTACK_RELEASE_CENTOS):
     BaseTestCase.get_home()
     Environments().create_cluster_box.click()
     with Wizard() as w:
         w.name.send_keys(name)
         w.release.select_by_visible_text(release)
         for i in range(6):
             w.next.click()
         w.create.click()
         w.wait_until_exists()
예제 #13
0
    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()
예제 #14
0
    def setUp(self):
        """Each test precondition

        Steps:
            1. Create simple environment with default values
            2. Click on created environment
        """
        BaseTestCase.clear_nailgun_database()
        BaseTestCase.setUp(self)
        preconditions.Environment.simple_flat()
        Environments().create_cluster_boxes[0].click()
        time.sleep(1)
예제 #15
0
    def setUp(self):
        """Each test precondition

        Steps:
            1. Click on created simple environment
            2. Click 'Add nodes'
        """
        BaseTestCase.setUp(self)
        Environments().create_cluster_boxes[0].click()
        time.sleep(1)
        Nodes().add_nodes.click()
        time.sleep(1)
예제 #16
0
    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()
예제 #17
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
예제 #18
0
    def test_delete(self):
        """Delete environment

        Scenario:
            1. Click delete environment
            2. Click delete on confirmation pop-up
            3. Verify that environment is deleted
        """
        with Actions() as a:
            a.delete.click()
            DeleteEnvironmentPopup().delete.click()
            time.sleep(1)
        self.assertEqual(0, len(Environments().create_cluster_boxes),
                         'Environment has been deleted')
예제 #19
0
    def setUp(self):
        """Each test precondition

        Steps:
            1. Create simple environment with default values
            2. Click on created environment
            3. Deploy environment with 1 controller and 2 compute nodes
        """
        BaseTestCase.clear_nailgun_database()
        BaseTestCase.setUp(self)
        preconditions.Environment.simple_flat()
        Environments().create_cluster_boxes[0].click()
        time.sleep(1)
        preconditions.Environment().deploy_nodes(1, 2)
예제 #20
0
    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()
        Environments().create_cluster_boxes[0].click()
        Tabs().networks.click()
        with Networks() as n:
            n.vlan_manager.click()
            n.save_settings.click()
            time.sleep(1)
예제 #21
0
    def setUpClass(cls):
        """Global precondition

        Steps:
            1. Create simple environment with Neutron with GRE segmentation
        """
        BaseTestCase.setUpClass()
        cls.get_home()
        Environments().create_cluster_box.click()
        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()
            for i in range(3):
                w.next.click()
            w.create.click()
            w.wait_until_exists()
예제 #22
0
    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()
        Environments().create_cluster_boxes[0].click()
        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()
예제 #23
0
    def test_services(self):
        """Create environment with Savanna, Murano, Ceilometer selected

        Scenario:
            1. Create environment with Install Savanna,
               Murano, Ceilometer selected
            2. Click on created environment
            3. Open settings tab
            4. Verify that Install Savanna, 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_savanna.click()
            w.install_murano.click()
            w.install_ceilometer.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.install_savanna.
                            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())
예제 #24
0
    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()
        Environments().create_cluster_boxes[0].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)
        Nodes().nodes[0].details.click()
        NodeInfo().edit_networks.click()
예제 #25
0
 def setUp(self):
     BaseTestCase.setUp(self)
     Environments().create_cluster_boxes[0].click()
     time.sleep(1)
     Nodes().add_nodes.click()
     time.sleep(1)
예제 #26
0
 def setUp(self):
     BaseTestCase.setUp(self)
     Environments().create_cluster_boxes[0].click()
     Tabs().networks.click()
     time.sleep(1)