]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Minor Fix in ucs tests
authorShweta P <shweta.ap05@gmail.com>
Fri, 9 Sep 2011 22:20:07 +0000 (15:20 -0700)
committerShweta P <shweta.ap05@gmail.com>
Fri, 9 Sep 2011 22:20:07 +0000 (15:20 -0700)
quantum/plugins/cisco/tests/unit/test_ucs_inventory.py
quantum/plugins/cisco/tests/unit/test_ucs_plugin.py

index 7276f4e0ddb15960a2fc97a2a1f425cdf353844a..13fd9bb4d2ec0c6b0b255a17d8a54463b4d8dc2f 100644 (file)
@@ -183,10 +183,6 @@ class TestUCSInventory(unittest.TestCase):
         """Test that the UCS Inventory returns a valid UCM"""
         self._test_with_port_creation('unplug_interface')
 
-    def test_delete_port_not_found(self):
-        """Test that the UCS Inventory raises a PortNotFound exception"""
-        self._test_port_not_found('delete_port')
-
     def test_update_port_not_found(self):
         """Test that the UCS Inventory raises a PortNotFound exception"""
         self._test_port_not_found('update_port')
index 721532be5c06b7fbf00518a0a8551ebf2e81b32b..6c1e54a70189544553339a69c613385626918e02 100644 (file)
@@ -158,20 +158,20 @@ class UCSVICTestPlugin(unittest.TestCase):
                             new_port1[const.UUID], device_ip=self.device_ip,
                             ucs_inventory=self._ucs_inventory,
                             least_rsvd_blade_dict=self._ucs_inventory.\
-                            get_least_reserved_blade())
+                            _get_least_reserved_blade())
         new_port2 = db.port_create(new_network[const.UUID], const.PORT_UP)
         port_dict2 = self._cisco_ucs_plugin.create_port(
                                self.tenant_id, self.net_id, const.PORT_UP,
                                new_port2[const.UUID], device_ip=self.device_ip,
                                ucs_inventory=self._ucs_inventory,
                                least_rsvd_blade_dict=self._ucs_inventory.\
-                               get_least_reserved_blade())
+                               _get_least_reserved_blade())
         ports_on_net = self._cisco_ucs_plugin.get_all_ports(
                            self.tenant_id, new_net_dict[const.NET_ID],
                            device_ip=self.device_ip,
                            ucs_inventory=self._ucs_inventory,
                            least_rsvd_blade_dict=self._ucs_inventory.\
-                           get_least_reserved_blade())
+                           _get_least_reserved_blade())
         port_list = [port_dict1, port_dict2]
         self.assertTrue(str(ports_on_net[1]) == str(port_list[1]) or
                         str(ports_on_net[1]) == str(port_list[0]))
@@ -186,7 +186,7 @@ class UCSVICTestPlugin(unittest.TestCase):
                      blade_intf_distinguished_name=self.\
                      blade_intf_distinguished_name,
                      least_rsvd_blade_dict=self._ucs_inventory.\
-                     get_least_reserved_blade())
+                     _get_least_reserved_blade())
         self.tearDownNetworkPort(
                  self.tenant_id, new_net_dict[const.NET_ID],
                  port_dict2[const.PORTID])
@@ -210,7 +210,7 @@ class UCSVICTestPlugin(unittest.TestCase):
                             new_port[const.UUID], device_ip=self.device_ip,
                             ucs_inventory=self._ucs_inventory,
                             least_rsvd_blade_dict=self._ucs_inventory.\
-                            get_least_reserved_blade())
+                            _get_least_reserved_blade())
         self.assertEqual(port_dict[const.PORTID], new_port[const.UUID])
         profile_name = self._cisco_ucs_plugin.\
                            _get_profile_name(port_dict[const.PORTID])
@@ -240,7 +240,7 @@ class UCSVICTestPlugin(unittest.TestCase):
                             new_port[const.UUID], device_ip=self.device_ip,
                             ucs_inventory=self._ucs_inventory,
                             least_rsvd_blade_dict=self._ucs_inventory.\
-                            get_least_reserved_blade())
+                            _get_least_reserved_blade())
         port_bind = self._cisco_ucs_plugin.delete_port(
                          self.tenant_id, new_net_dict[const.NET_ID],
                          port_dict[const.PORTID], device_ip=self.device_ip,
@@ -249,7 +249,7 @@ class UCSVICTestPlugin(unittest.TestCase):
                          blade_intf_distinguished_name=self.\
                          blade_intf_distinguished_name,
                          least_rsvd_blade_dict=self._ucs_inventory.\
-                         get_least_reserved_blade())
+                         _get_least_reserved_blade())
 
         self.assertEqual(port_bind[const.PORTID], new_port[const.UUID])
         self.tearDownNetwork(self.tenant_id, new_net_dict[const.NET_ID])
@@ -273,7 +273,7 @@ class UCSVICTestPlugin(unittest.TestCase):
                             new_port[const.UUID], device_ip=self.device_ip,
                             ucs_inventory=self._ucs_inventory,
                             least_rsvd_blade_dict=self._ucs_inventory.\
-                            get_least_reserved_blade())
+                            _get_least_reserved_blade())
 
         port_detail = self._cisco_ucs_plugin.get_port_details(
                             self.tenant_id, new_net_dict[const.NET_ID],
@@ -350,7 +350,7 @@ class UCSVICTestPlugin(unittest.TestCase):
                             device_ip=self.device_ip,
                             ucs_inventory=self._ucs_inventory,
                             least_rsvd_blade_dict=self._ucs_inventory.\
-                            get_least_reserved_blade())
+                            _get_least_reserved_blade())
         cdb.update_vlan_binding(new_network[const.UUID],
                                 str(new_vlanid), new_vlan_name)
         port_bind = self._cisco_ucs_plugin.plug_interface(
@@ -384,7 +384,7 @@ class UCSVICTestPlugin(unittest.TestCase):
                             device_ip=self.device_ip,
                             ucs_inventory=self._ucs_inventory,
                             least_rsvd_blade_dict=self._ucs_inventory.\
-                            get_least_reserved_blade())
+                            _get_least_reserved_blade())
         cdb.update_vlan_binding(new_network[const.UUID],
                                 str(new_vlanid), new_vlan_name)
         self._cisco_ucs_plugin.plug_interface(
@@ -450,7 +450,7 @@ class UCSVICTestPlugin(unittest.TestCase):
                           blade_intf_distinguished_name=self.\
                           blade_intf_distinguished_name,
                           least_rsvd_blade_dict=self._ucs_inventory.\
-                          get_least_reserved_blade())
+                          _get_least_reserved_blade())
 
         self.tearDownNetwork(self.tenant_id, new_net_dict[const.NET_ID])
 
@@ -471,7 +471,7 @@ class UCSVICTestPlugin(unittest.TestCase):
                     blade_intf_distinguished_name=self.\
                     blade_intf_distinguished_name,
                     least_rsvd_blade_dict=self._ucs_inventory.\
-                    get_least_reserved_blade())
+                    _get_least_reserved_blade())
         self.tearDownNetwork(tenant_id, net_id)
 
     def tearDownNetworkPortInterface(self, tenant_id, net_id, port_id):