]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Changes qos description to string; changes extension API names for get_host and get_i...
authorSumit Naiksatam <snaiksat@cisco.com>
Fri, 26 Aug 2011 00:42:16 +0000 (17:42 -0700)
committerSumit Naiksatam <snaiksat@cisco.com>
Fri, 26 Aug 2011 00:42:16 +0000 (17:42 -0700)
quantum/plugins/cisco/l2network_plugin.py
quantum/plugins/cisco/models/l2network_multi_blade.py
quantum/plugins/cisco/models/l2network_single_blade.py
quantum/plugins/cisco/ucs/cisco_ucs_inventory.py

index 2a5ada6ff307d23ade9155e435ead8208e18c281..84f5602b903bf6bbb10288cc1ee152fa4fa020db 100644 (file)
@@ -381,7 +381,7 @@ class L2Network(QuantumPluginBase):
     def create_qos(self, tenant_id, qos_name, qos_desc):
         """Create a QoS level"""
         LOG.debug("create_qos() called\n")
-        qos = cdb.add_qos(tenant_id, qos_name, qos_desc)
+        qos = cdb.add_qos(tenant_id, qos_name, str(qos_desc))
         return qos
 
     def delete_qos(self, tenant_id, qos_id):
@@ -451,19 +451,19 @@ class L2Network(QuantumPluginBase):
         credential = cdb.update_credential(tenant_id, credential_id, new_name)
         return credential
 
-    def get_host(self, tenant_id, instance_id, instance_desc):
+    def schedule_host(self, tenant_id, instance_id, instance_desc):
         """Provides the hostname on which a dynamic vnic is reserved"""
-        LOG.debug("get_host() called\n")
+        LOG.debug("schedule_host() called\n")
         host_list = self._invoke_device_plugins(self._func_name(), [tenant_id,
                                                                instance_id,
                                                                instance_desc])
         return host_list
 
-    def get_instance_port(self, tenant_id, instance_id, instance_desc):
+    def associate_port(self, tenant_id, instance_id, instance_desc):
         """
         Get the portprofile name and the device namei for the dynamic vnic
         """
-        LOG.debug("get_instance_port() called\n")
+        LOG.debug("associate_port() called\n")
         return self._invoke_device_plugins(self._func_name(), [tenant_id,
                                                                instance_id,
                                                                instance_desc])
index 9f8958b2bf9dd30a59bc13b34ebc17b7857fb8b2..acd24d5ee674e8b040d904edd7a6a052f680ea22 100644 (file)
@@ -158,16 +158,16 @@ class L2NetworkMultiBlade(L2NetworkModelBase):
         self._invoke_plugin_per_device(const.UCS_PLUGIN, self._func_name(),
                                        args)
 
-    def get_host(self, args):
+    def schedule_host(self, args):
         """Provides the hostname on which a dynamic vnic is reserved"""
-        LOG.debug("get_host() called\n")
+        LOG.debug("schedule_host() called\n")
         return self._invoke_inventory(const.UCS_PLUGIN, self._func_name(),
                                       args)
 
-    def get_instance_port(self, args):
+    def associate_port(self, args):
         """
         Get the portprofile name and the device namei for the dynamic vnic
         """
-        LOG.debug("get_instance_port() called\n")
+        LOG.debug("associate_port() called\n")
         return self._invoke_inventory(const.UCS_PLUGIN, self._func_name(),
                                       args)
index 9cb0a89e03c08dd767a24d057c0e5bd4b6997c4d..617d1a55d6b611f61ec57e959c62c205bac41005 100644 (file)
@@ -149,16 +149,16 @@ class L2NetworkSingleBlade(L2NetworkModelBase):
         self._invoke_plugin_per_device(const.UCS_PLUGIN, self._func_name(),
                                        args)
 
-    def get_host(self, args):
+    def schedule_host(self, args):
         """Provides the hostname on which a dynamic vnic is reserved"""
-        LOG.debug("get_host() called\n")
+        LOG.debug("schedule_host() called\n")
         return self._invoke_inventory(const.UCS_PLUGIN, self._func_name(),
                                       args)
 
-    def get_instance_port(self, args):
+    def associate_port(self, args):
         """
         Get the portprofile name and the device namei for the dynamic vnic
         """
-        LOG.debug("get_instance_port() called\n")
+        LOG.debug("associate_port() called\n")
         return self._invoke_inventory(const.UCS_PLUGIN, self._func_name(),
                                       args)
index 7b13982d66657c5af6a46165906dd9295effc667..2a90824bb8eb115c9d3936beb6d5361f3e4dcecb 100644 (file)
@@ -597,9 +597,9 @@ class UCSInventory(L2NetworkDeviceInventoryBase):
         LOG.debug("unplug_interface() called\n")
         return self._get_blade_for_port(args)
 
-    def get_host(self, args):
+    def schedule_host(self, args):
         """Provides the hostname on which a dynamic vnic is reserved"""
-        LOG.debug("get_host() called\n")
+        LOG.debug("schedule_host() called\n")
         instance_id = args[1]
         tenant_id = args[2][const.PROJECT_ID]
         host_name = self._get_host_name_for_rsvd_intf(tenant_id, instance_id)
@@ -607,11 +607,11 @@ class UCSInventory(L2NetworkDeviceInventoryBase):
         LOG.debug("host_list is: %s" % host_list)
         return host_list
 
-    def get_instance_port(self, args):
+    def associate_port(self, args):
         """
         Get the portprofile name and the device name for the dynamic vnic
         """
-        LOG.debug("get_instance_port() called\n")
+        LOG.debug("associate_port() called\n")
         instance_id = args[1]
         tenant_id = args[2][const.PROJECT_ID]
         vif_id = args[2][const.VIF_ID]