コード例 #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")
コード例 #2
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)
コード例 #3
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')
コード例 #4
0
    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())
コード例 #5
0
    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')
コード例 #6
0
    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')
コード例 #7
0
    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())
コード例 #8
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')
コード例 #9
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()
        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()
コード例 #10
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')
コード例 #11
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')
コード例 #12
0
ファイル: actions.py プロジェクト: Fiware/ops.Fuel-main-dev
 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')
コード例 #13
0
    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')
コード例 #14
0
ファイル: nodes.py プロジェクト: naveenzhang/fuel-main_5.1.2
 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)
コード例 #15
0
ファイル: nodes.py プロジェクト: Fiware/ops.Fuel-main-dev
 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)
コード例 #16
0
ファイル: actions.py プロジェクト: Fiware/ops.Fuel-main-dev
 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')
コード例 #17
0
 def cancel_reset(cls):
     Actions().reset.click()
     PageObject.click_element(Actions(), 'cancel_popup')
     PageObject.click_element(Tabs(), 'nodes')
コード例 #18
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')
コード例 #19
0
ファイル: actions.py プロジェクト: amit213/fuel-main
 def stop_deploy_process(cls):
     PageObject.click_element(Actions(), 'stop_deploy')
     Actions().stop_deploy_popup.click()
     PageObject.long_wait_element(Actions(), 'pending_nodes')
コード例 #20
0
ファイル: actions.py プロジェクト: amit213/fuel-main
 def reset_env(cls):
     PageObject.click_element(Actions(), 'reset')
     Actions().reset_popup.click()
     PageObject.long_wait_element(Actions(), 'pending_nodes')
コード例 #21
0
 def stop_deploy_process(cls):
     PageObject.click_element(Actions(), 'stop_deploy')
     Actions().stop_deploy_popup.click()
     PageObject.long_wait_element(Actions(), 'pending_nodes')
コード例 #22
0
 def reset_env(cls):
     PageObject.click_element(Actions(), 'reset')
     Actions().reset_popup.click()
     PageObject.long_wait_element(Actions(), 'pending_nodes')
コード例 #23
0
ファイル: actions.py プロジェクト: Fiware/ops.Fuel-main-dev
 def cancel_reset(cls):
     Actions().reset.click()
     PageObject.click_element(Actions(), 'cancel_popup')
     PageObject.click_element(Tabs(), 'nodes')