Esempio n. 1
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()
        PageObject.click_element(TaskResultAlert(), "close")

        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")
    def test_rhsm(self):
        """Download RHEL and RHOS by RHSM

        Scenario:
            1. Enter environment name
            2. Select RHOS in release list
            3. Enter Redhat username and password
            4. Click next till the end and click create
            5. Open releases tab
            6. Verify that RHOS status is active
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_RELEASE_REDHAT)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_REDHAT)
            w.license_rhsm.click()
            w.redhat_username.send_keys(REDHAT_USERNAME)
            w.redhat_password.send_keys(REDHAT_PASSWORD)
            for i in range(6):
                w.next.click()
            w.create.click()
            w.wait_until_exists()
        Header().releases.click()
        with Releases() as r:
            PageObject.wait_until_exists(
                r.dict[OPENSTACK_REDHAT].download_progress, timeout=20)
            self.assertEqual(
                'Active', r.dict[OPENSTACK_REDHAT].status.text,
                'RHOS status is active')
Esempio n. 3
0
    def test_rhn_satellite(self):
        """Download RHEL with RHN option

        Scenario:
            1. Open releases tab
            2. Click Configure button in actions column
            3. Select 'RHN' radiobutton
            4. Enter username and password
            5. Enter satellite hostname, activation key and click apply
            6. Check that RHOS status is active
        """
        Releases().rhel_setup.click()
        with RedhatAccountPopup() as p:
            p.license_rhn.click()
            p.redhat_username.send_keys(REDHAT_USERNAME)
            p.redhat_password.send_keys(REDHAT_PASSWORD)
            p.redhat_satellite.send_keys(REDHAT_SATELLITE)
            p.redhat_activation_key.send_keys(REDHAT_ACTIVATION_KEY)
            p.apply.click()
            p.wait_until_exists()
        with Releases() as r:
            PageObject.wait_until_exists(
                r.dict[OPENSTACK_REDHAT].download_progress, timeout=20)
            self.assertEqual(
                'Active', r.dict[OPENSTACK_REDHAT].status.text,
                'RHOS status is active')
    def test_rhn_satellite(self):
        """Download RHEL and RHOS by RHN satellite

        Scenario:
            1. Enter environment name
            2. Select RHOS in release list
            3. Select RHN option
            4. Enter Redhat username and password, satellite
               hostname and activation key
            5. Click next till the end and click create
            6. Open releases tab
            7. Verify that RHOS status is active
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_RELEASE_REDHAT)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_REDHAT)
            w.license_rhn.click()
            w.redhat_username.send_keys(REDHAT_USERNAME)
            w.redhat_password.send_keys(REDHAT_PASSWORD)
            w.redhat_satellite.send_keys(REDHAT_SATELLITE)
            w.redhat_activation_key.send_keys(REDHAT_ACTIVATION_KEY)
            for i in range(6):
                w.next.click()
            w.create.click()
            w.wait_until_exists()
        Header().releases.click()
        with Releases() as r:
            PageObject.wait_until_exists(
                r.dict[OPENSTACK_REDHAT].download_progress, timeout=20)
            self.assertEqual(
                'Active', r.dict[OPENSTACK_REDHAT].status.text,
                'RHOS status is active')
Esempio n. 5
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)
    def test_rhn_satellite(self):
        """Download RHEL with RHN option

        Scenario:
            1. Open releases tab
            2. Click Configure button in actions column
            3. Select 'RHN' radiobutton
            4. Enter username and password
            5. Enter satellite hostname, activation key and click apply
            6. Check that RHOS status is active
        """
        Releases().rhel_setup.click()
        with RedhatAccountPopup() as p:
            p.license_rhn.click()
            p.redhat_username.send_keys(REDHAT_USERNAME)
            p.redhat_password.send_keys(REDHAT_PASSWORD)
            p.redhat_satellite.send_keys(REDHAT_SATELLITE)
            p.redhat_activation_key.send_keys(REDHAT_ACTIVATION_KEY)
            p.apply.click()
            p.wait_until_exists()
        with Releases() as r:
            PageObject.wait_until_exists(
                r.dict[OPENSTACK_REDHAT].download_progress, timeout=20)
            self.assertEqual('Active', r.dict[OPENSTACK_REDHAT].status.text,
                             'RHOS status is active')
    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())
Esempio n. 8
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')
Esempio n. 9
0
    def test_rhsm(self):
        """Download RHEL and RHOS by RHSM

        Scenario:
            1. Enter environment name
            2. Select RHOS in release list
            3. Enter Redhat username and password
            4. Click next till the end and click create
            5. Open releases tab
            6. Verify that RHOS status is active
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_RELEASE_REDHAT)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_REDHAT)
            w.license_rhsm.click()
            w.redhat_username.send_keys(REDHAT_USERNAME)
            w.redhat_password.send_keys(REDHAT_PASSWORD)
            for i in range(6):
                w.next.click()
            w.create.click()
            w.wait_until_exists()
        Header().releases.click()
        with Releases() as r:
            PageObject.wait_until_exists(
                r.dict[OPENSTACK_REDHAT].download_progress, timeout=20)
            self.assertEqual('Active', r.dict[OPENSTACK_REDHAT].status.text,
                             'RHOS status is active')
Esempio n. 10
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())
Esempio n. 11
0
    def test_rhn_satellite(self):
        """Download RHEL and RHOS by RHN satellite

        Scenario:
            1. Enter environment name
            2. Select RHOS in release list
            3. Select RHN option
            4. Enter Redhat username and password, satellite
               hostname and activation key
            5. Click next till the end and click create
            6. Open releases tab
            7. Verify that RHOS status is active
        """
        with Wizard() as w:
            w.name.send_keys(OPENSTACK_RELEASE_REDHAT)
            w.release.select_by_visible_text(OPENSTACK_RELEASE_REDHAT)
            w.license_rhn.click()
            w.redhat_username.send_keys(REDHAT_USERNAME)
            w.redhat_password.send_keys(REDHAT_PASSWORD)
            w.redhat_satellite.send_keys(REDHAT_SATELLITE)
            w.redhat_activation_key.send_keys(REDHAT_ACTIVATION_KEY)
            for i in range(6):
                w.next.click()
            w.create.click()
            w.wait_until_exists()
        Header().releases.click()
        with Releases() as r:
            PageObject.wait_until_exists(
                r.dict[OPENSTACK_REDHAT].download_progress, timeout=20)
            self.assertEqual('Active', r.dict[OPENSTACK_REDHAT].status.text,
                             'RHOS status is active')
Esempio n. 12
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')
Esempio n. 13
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()
        PageObject.click_element(TaskResultAlert(), 'close')

        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')
Esempio n. 14
0
 def test_diagnostic_snapshot(self):
     Support().generate_snapshot.click()
     with Support() as s:
         PageObject.wait_element(s, 'download_snapshot')
         self.assertTrue(
             s.download_snapshot.is_enabled(),
             '"Diagnostic Snapshot" is displayed')
Esempio n. 15
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 Sahara, 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_sahara.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_ha_compact.
                            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_sahara.
                             find_element_by_tag_name('input').is_selected())
            self.assertFalse(w.install_murano.
                             find_element_by_tag_name('input').is_selected())
Esempio n. 16
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())
    def test_bond_buttons_inactive(self):
        """Check bond buttons are inactive by default

        Scenario:
            1. Verify bond and unbond buttons are disabled
        """
        PageObject.find_element(InterfacesSettings(), 'bond_interfaces')
        self.assertFalse(InterfacesSettings().bond_interfaces.is_enabled())
        self.assertFalse(InterfacesSettings().unbond_interfaces.is_enabled())
Esempio n. 18
0
    def test_capacity_audit(self):
        """View capacity audit

        Scenario:
            1. Click view capacity audit
            2. Verify that system information is present
        """
        Support().view_capacity_audit.click()
        PageObject.wait_element(Support(), 'capacity_report')
        self.assertEqual('Home/Support/Capacity',
                         Header().breadcrumb.text, 'Breadcrumb text')
    def test_inactive_one_selected(self):
        """Check bond buttons are inactive if one interface is selected

        Scenario:
            1. Select one interface
            2. Verify bond and unbond buttons are disabled
        """
        with InterfacesSettings() as s:
            PageObject.click_element(s, 'interfaces', 'interface_checkbox', 0)
            self.assertFalse(s.bond_interfaces.is_enabled())
            self.assertFalse(s.unbond_interfaces.is_enabled())
Esempio n. 20
0
    def test_diagnostic_snapshot(self):
        """Generate diagnostic snapshot

        Scenario:
            1. Click generate diagnostic snapshot
            2. Verify that snapshot is available to download
        """
        Support().generate_snapshot.click()
        with Support() as s:
            PageObject.wait_element(s, "download_snapshot")
            self.assertTrue(s.download_snapshot.is_enabled(), '"Diagnostic Snapshot" is displayed')
Esempio n. 21
0
 def add_controller_compute_nodes(cls):
     PageObject.click_element(Nodes(), 'add_nodes')
     Nodes().nodes_discovered[0].checkbox.click()
     RolesPanel().controller.click()
     Nodes().apply_changes.click()
     PageObject.wait_until_exists(Nodes().apply_changes)
     PageObject.click_element(Nodes(), 'add_nodes')
     PageObject.click_element(Nodes(), 'nodes_discovered', 'checkbox', 0)
     RolesPanel().compute.click()
     Nodes().apply_changes.click()
     PageObject.wait_until_exists(Nodes().apply_changes)
Esempio n. 22
0
 def add_controller_compute_nodes(cls):
     PageObject.click_element(Nodes(), 'add_nodes')
     Nodes().nodes_discovered[0].checkbox.click()
     RolesPanel().controller.click()
     Nodes().apply_changes.click()
     PageObject.wait_until_exists(Nodes().apply_changes)
     PageObject.click_element(Nodes(), 'add_nodes')
     PageObject.click_element(Nodes(), 'nodes_discovered', 'checkbox', 0)
     RolesPanel().compute.click()
     Nodes().apply_changes.click()
     PageObject.wait_until_exists(Nodes().apply_changes)
    def test_bond_buttons_inactive(self):
        """Check bond buttons are inactive by default

        Scenario:
            1. Verify bond and unbond buttons are disabled
        """
        self.assertFalse(PageObject.find_element
                         (InterfacesSettings(), 'bond_interfaces').
                         is_enabled())
        self.assertFalse(PageObject.find_element
                         (InterfacesSettings(), 'unbond_interfaces').
                         is_enabled())
Esempio n. 24
0
    def test_diagnostic_snapshot(self):
        """Generate diagnostic snapshot

        Scenario:
            1. Click generate diagnostic snapshot
            2. Verify that snapshot is available to download
        """
        Support().generate_snapshot.click()
        with Support() as s:
            PageObject.wait_element(s, 'download_snapshot')
            self.assertTrue(s.download_snapshot.is_enabled(),
                            '"Diagnostic Snapshot" is displayed')
Esempio n. 25
0
    def test_cancel_button(self):
        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())
Esempio n. 26
0
    def test_capacity_audit(self):
        """View capacity audit

        Scenario:
            1. Click view capacity audit
            2. Verify that system information is present
        """
        Support().view_capacity_audit.click()
        PageObject.wait_element(Support(), 'capacity_report')
        self.assertEqual(
            'Home/Support/Capacity',
            Header().breadcrumb.text,
            'Breadcrumb text'
        )
Esempio n. 27
0
 def test_rhsm(self):
     Releases().rhel_setup.click()
     with RedhatAccountPopup() as p:
         p.license_rhsm.click()
         p.redhat_username.send_keys(REDHAT_USERNAME)
         p.redhat_password.send_keys(REDHAT_PASSWORD)
         p.apply.click()
         p.wait_until_exists()
     with Releases() as r:
         PageObject.wait_until_exists(
             r.dict[OPENSTACK_REDHAT].download_progress, timeout=20)
         self.assertEqual(
             'Active', r.dict[OPENSTACK_REDHAT].status.text,
             'RHOS status is active')
    def test_cancel_bonding(self):
        """Cancel bonding

        Scenario:
            1. Select two interfaces
            2. Click bond interfaces
            3. Click cancel changes
            4. Verify that interfaces aren't bonded
        """
        with InterfacesSettings() as s:
            PageObject.click_element(s, 'interfaces', 'interface_checkbox', 0)
            s.interfaces[1].interface_checkbox.click()
            s.bond_interfaces.click()
            s.cancel_changes.click()
            self.assertEqual(len(s.interfaces), 3, 'Interfaces amount')
Esempio n. 29
0
    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)
    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)
    def test_bond_interfaces(self):
        """Bond two interfaces

        Scenario:
            1. Select two interfaces
            2. Click bond interfaces
            3. Verify that interfaces were bonded
        """
        with InterfacesSettings() as s:
            PageObject.click_element(s, 'interfaces', 'interface_checkbox', 0)
            s.interfaces[1].interface_checkbox.click()
            self.assertTrue(s.bond_interfaces.is_enabled())
            s.bond_interfaces.click()
            s.interfaces[0].bond_mode
            self.assertFalse(s.bond_interfaces.is_enabled())
            self.assertFalse(s.unbond_interfaces.is_enabled())
    def test_unbond_interfaces(self):
        """Unbond interfaces

        Scenario:
            1. Select two interfaces
            2. Click bond interfaces
            3. Click unbond defaults
            4. Verify that interfaces aren't bonded
        """
        with InterfacesSettings() as s:
            PageObject.click_element(s, 'interfaces', 'interface_checkbox', 0)
            s.interfaces[1].interface_checkbox.click()
            s.bond_interfaces.click()
            s.interfaces[0].interface_checkbox.click()
            s.unbond_interfaces.click()
            self.assertEqual(len(s.interfaces), 3, 'Interfaces amount not 3')
Esempio n. 33
0
 def test_rhsm(self):
     with Wizard() as w:
         w.name.send_keys(OPENSTACK_RELEASE_REDHAT)
         w.release.select_by_visible_text(OPENSTACK_RELEASE_REDHAT)
         w.license_rhsm.click()
         w.redhat_username.send_keys(REDHAT_USERNAME)
         w.redhat_password.send_keys(REDHAT_PASSWORD)
         for i in range(6):
             w.next.click()
         w.create.click()
         w.wait_until_exists()
     Header().releases.click()
     with Releases() as r:
         PageObject.wait_until_exists(
             r.dict[OPENSTACK_REDHAT].download_progress, timeout=20)
         self.assertEqual(
             'Active', r.dict[OPENSTACK_REDHAT].status.text,
             'RHOS status is active')
Esempio n. 34
0
    def test_load_default_bonding(self):
        """Load default bonding

        Scenario:
            1. Select two interfaces
            2. Click bond interfaces
            3. Click load defaults
            4. Verify that interfaces aren't bonded
        """
        with InterfacesSettings() as s:
            s.interfaces[0].interface_checkbox.click()
            s.interfaces[1].interface_checkbox.click()
            s.bond_interfaces.click()
            s.apply.click()
            time.sleep(2)
            self.assertEqual(len(s.interfaces), 2, 'Interfaces amount not 2')
            PageObject.click_element(s, 'load_defaults')
            PageObject.wait_until_exists(s.interfaces[0].bond_mode)
            self.assertEqual(len(s.interfaces), 3, 'Interfaces amount not 3')
Esempio n. 35
0
    def test_load_default_bonding(self):
        """Load default bonding

        Scenario:
            1. Select two interfaces
            2. Click bond interfaces
            3. Click load defaults
            4. Verify that interfaces aren't bonded
        """
        with InterfacesSettings() as s:
            s.interfaces[0].interface_checkbox.click()
            s.interfaces[1].interface_checkbox.click()
            s.bond_interfaces.click()
            s.apply.click()
            time.sleep(2)
            self.assertEqual(len(s.interfaces), 2, 'Interfaces amount not 2')
            PageObject.click_element(s, 'load_defaults')
            PageObject.wait_until_exists(s.interfaces[0].bond_mode)
            self.assertEqual(len(s.interfaces), 3, 'Interfaces amount not 3')
Esempio n. 36
0
 def aut(cls):
     Authorization().login_inputfield.click()
     Authorization().login_inputfield.send_keys(Fuel_UI_Login)
     Authorization().password_inputfield.click()
     Authorization().password_inputfield.send_keys(Fuel_UI_Password)
     Authorization().login_button.click()
     PageObject.wait_until_exists(Header().logo)
     Header().logo.is_displayed()
     browser.driver.execute_script('jQuery.fx.off = true')
     browser.driver.execute_script('''
                 $('head').append(
                     '<style type="text/css">
                         * {
                     -webkit-transition-duration: 0.00000001s !important;
                     -moz-transition: 0.00000001s !important;
                     transition-duration: 0.00000001s !important;
                         }
                     </style>')
             '''.replace('\n', ''))
Esempio n. 37
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())
Esempio n. 38
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())
    def test_bond_mode(self):
        """Change bond modes

        Scenario:
            1. Select two interfaces
            2. Click bond interfaces
            3. Change bond modes
            4. Verify that modes are saved correctly
        """
        with InterfacesSettings() as s:
            PageObject.click_element(s, 'interfaces', 'interface_checkbox', 0)
            s.interfaces[1].interface_checkbox.click()
            s.bond_interfaces.click()
            s.interfaces[0].select_mode.select_by_visible_text('Balance SLB')
            self.assertEqual(s.interfaces[0].select_mode.
                             first_selected_option.text,
                             'Balance SLB', 'Text is Balance SLB')
            s.interfaces[0].select_mode.\
                select_by_visible_text('LACP Balance TCP')
            self.assertEqual(s.interfaces[0].select_mode.
                             first_selected_option.text,
                             'LACP Balance TCP', 'Text is LACP Balance TCP')
Esempio n. 40
0
 def aut(cls):
     Authorization().login_inputfield.click()
     Authorization().login_inputfield.send_keys(Fuel_UI_Login)
     Authorization().password_inputfield.click()
     Authorization().password_inputfield.send_keys(Fuel_UI_Password)
     Authorization().login_button.click()
     PageObject.wait_until_exists(Header().logo)
     Header().logo.is_displayed()
     browser.driver.execute_script("jQuery.fx.off = true")
     browser.driver.execute_script(
         """
                 $('head').append(
                     '<style type="text/css">
                         * {
                     -webkit-transition-duration: 0.00000001s !important;
                     -moz-transition: 0.00000001s !important;
                     transition-duration: 0.00000001s !important;
                         }
                     </style>')
             """.replace(
             "\n", ""
         )
     )
    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()
        for node in Nodes().nodes:
            self.assertEqual(
                "pending addition", PageObject.get_lower_text(node, "status"), "Node status is Pending Addition"
            )
        self.assertTrue(Nodes().deploy_changes.is_enabled())
    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()
Esempio n. 43
0
 def __init__(self):
     el = browser.driver.\
         find_element_by_css_selector('div.neutron-parameters')
     PageObject.__init__(self, el)
Esempio n. 44
0
 def cancel_reset(cls):
     Actions().reset.click()
     PageObject.click_element(Actions(), 'cancel_popup')
     PageObject.click_element(Tabs(), 'nodes')
Esempio n. 45
0
 def __init__(self):
     element = browser.driver.\
         find_element_by_css_selector('div.alert-success')
     PageObject.__init__(self, element)
Esempio n. 46
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')
Esempio n. 47
0
 def reset_env(cls):
     PageObject.click_element(Actions(), 'reset')
     Actions().reset_popup.click()
     PageObject.long_wait_element(Actions(), 'pending_nodes')
Esempio n. 48
0
 def stop_deploy_process(cls):
     PageObject.click_element(Actions(), 'stop_deploy')
     Actions().stop_deploy_popup.click()
     PageObject.long_wait_element(Actions(), 'pending_nodes')
Esempio n. 49
0
 def reset_env(cls):
     PageObject.click_element(Actions(), 'reset')
     Actions().reset_popup.click()
     PageObject.long_wait_element(Actions(), 'pending_nodes')
Esempio n. 50
0
 def __init__(self, name):
     el = browser.driver.\
         find_element_by_xpath('//div[legend="{}"]'.format(name))
     PageObject.__init__(self, el)
Esempio n. 51
0
 def stop_deploy_process(cls):
     PageObject.click_element(Actions(), 'stop_deploy')
     Actions().stop_deploy_popup.click()
     PageObject.long_wait_element(Actions(), 'pending_nodes')
Esempio n. 52
0
 def __init__(self, element):
     PageObject.__init__(self, parent=element)
Esempio n. 53
0
 def __init__(self, element):
     PageObject.__init__(self, parent=element)