Changes qos description to string; changes extension API names for get_host and get_instance_port

This commit is contained in:
Sumit Naiksatam 2011-08-25 17:42:16 -07:00
parent 3f700ddb9e
commit bfc07107e3
4 changed files with 17 additions and 17 deletions

View 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])

View 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)

View 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)

View 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]