HACKING fixes, TODO authors.

Looks like this fixes all HACKING problems that were around.
Thanks to Dina Belova and Alexander Kovalev for this work.

Change-Id: I63ae1ab2f1bb37daa236cde4096c3c893fd80dd2
This commit is contained in:
Yuriy Taraday 2012-03-06 12:47:47 +04:00
parent 4012a3f792
commit a123f26a3f
14 changed files with 21 additions and 20 deletions

View File

@ -1746,7 +1746,7 @@ class StorageManagerCommands(object):
flav['description']) flav['description'])
def flavor_create(self, label, desc): def flavor_create(self, label, desc):
# TODO flavor name must be unique # TODO(renukaapte) flavor name must be unique
try: try:
db.sm_flavor_create(context.get_admin_context(), db.sm_flavor_create(context.get_admin_context(),
dict(label=label, dict(label=label,
@ -1792,7 +1792,7 @@ class StorageManagerCommands(object):
b['config_params'],) b['config_params'],)
def backend_add(self, flavor_label, sr_type, *args): def backend_add(self, flavor_label, sr_type, *args):
# TODO Add backend_introduce. # TODO(renukaapte) Add backend_introduce.
ctxt = context.get_admin_context() ctxt = context.get_admin_context()
params = dict(map(self._splitfun, args)) params = dict(map(self._splitfun, args))
sr_uuid = utils.gen_uuid() sr_uuid = utils.gen_uuid()

View File

@ -64,7 +64,7 @@ class APIRequest(object):
_error = _('Unsupported API request: controller = %(controller)s,' _error = _('Unsupported API request: controller = %(controller)s,'
' action = %(action)s') % locals() ' action = %(action)s') % locals()
LOG.exception(_error) LOG.exception(_error)
# TODO: Raise custom exception, trap in apiserver, # TODO(gundlach): Raise custom exception, trap in apiserver,
# and reraise as 400 error. # and reraise as 400 error.
raise exception.InvalidRequest() raise exception.InvalidRequest()

View File

@ -277,7 +277,7 @@ def check_img_metadata_quota_limit(context, metadata):
def dict_to_query_str(params): def dict_to_query_str(params):
# TODO: we should just use urllib.urlencode instead of this # TODO(throughnothing): we should just use urllib.urlencode instead of this
# But currently we don't work with urlencoded url's # But currently we don't work with urlencoded url's
param_str = "" param_str = ""
for key, val in params.iteritems(): for key, val in params.iteritems():

View File

@ -596,7 +596,7 @@ class VsaVCController(servers.Controller):
def __init__(self): def __init__(self):
self.vsa_api = vsa_api.API() self.vsa_api = vsa_api.API()
self.compute_api = compute.API() self.compute_api = compute.API()
self.vsa_id = None # VP-TODO: temporary ugly hack self.vsa_id = None # VP-TODO(vladimir.p): temporary ugly hack
super(VsaVCController, self).__init__() super(VsaVCController, self).__init__()
def _get_servers(self, req, is_detail): def _get_servers(self, req, is_detail):
@ -624,7 +624,7 @@ class VsaVCController(servers.Controller):
LOG.audit(_("Index instances for VSA %s"), vsa_id) LOG.audit(_("Index instances for VSA %s"), vsa_id)
self.vsa_id = vsa_id # VP-TODO: temporary ugly hack self.vsa_id = vsa_id # VP-TODO(vladimir.p): temporary ugly hack
result = super(VsaVCController, self).detail(req) result = super(VsaVCController, self).detail(req)
self.vsa_id = None self.vsa_id = None
return result return result

View File

@ -322,7 +322,7 @@ class GlanceImageService(object):
# NOTE(parthi): only allow image deletions if the user # NOTE(parthi): only allow image deletions if the user
# is a member of the project owning the image, in case of # is a member of the project owning the image, in case of
# setup without keystone # setup without keystone
# TODO Currently this access control breaks if # TODO(parthi): Currently this access control breaks if
# 1. Image is not owned by a project # 1. Image is not owned by a project
# 2. Deleting user is not bound a project # 2. Deleting user is not bound a project
properties = image_meta['properties'] properties = image_meta['properties']

View File

@ -261,7 +261,7 @@ class ProxyBareMetalTestCase(test.TestCase):
# Code under test # Code under test
conn = proxy.get_connection(True) conn = proxy.get_connection(True)
# TODO: this is not a very good fake instance # TODO(mikalstill): this is not a very good fake instance
info = conn.get_info({'name': 'instance-00000001'}) info = conn.get_info({'name': 'instance-00000001'})
# Expected values # Expected values

View File

@ -132,7 +132,8 @@ class BaseRpcTestCase(test.TestCase):
"""Calls echo in the passed queue""" """Calls echo in the passed queue"""
LOG.debug(_("Nested received %(queue)s, %(value)s") LOG.debug(_("Nested received %(queue)s, %(value)s")
% locals()) % locals())
# TODO: so, it will replay the context and use the same REQID? # TODO(comstud):
# so, it will replay the context and use the same REQID?
# that's bizarre. # that's bizarre.
ret = self.rpc.call(context, ret = self.rpc.call(context,
queue, queue,

View File

@ -420,5 +420,5 @@ class AuthManagerDbTestCase(_AuthManagerBaseTestCase):
if __name__ == "__main__": if __name__ == "__main__":
# TODO: Implement use_fake as an option # TODO(anotherjesse): Implement use_fake as an option
unittest.main() unittest.main()

View File

@ -961,7 +961,7 @@ class LibvirtConnection(driver.ComputeDriver):
def get_vnc_port_for_instance(instance_name): def get_vnc_port_for_instance(instance_name):
virt_dom = self._lookup_by_name(instance_name) virt_dom = self._lookup_by_name(instance_name)
xml = virt_dom.XMLDesc(0) xml = virt_dom.XMLDesc(0)
# TODO: use etree instead of minidom # TODO(sleepsonthefloor): use etree instead of minidom
dom = minidom.parseString(xml) dom = minidom.parseString(xml)
for graphic in dom.getElementsByTagName('graphics'): for graphic in dom.getElementsByTagName('graphics'):

View File

@ -192,7 +192,7 @@ def _host_find(context, session, src, dst):
""" """
# NOTE: this would be a lot simpler if nova-compute stored # NOTE: this would be a lot simpler if nova-compute stored
# FLAGS.host in the XenServer host's other-config map. # FLAGS.host in the XenServer host's other-config map.
# TODO: improve according the note above # TODO(armando-migliaccio): improve according the note above
aggregate = db.aggregate_get_by_host(context, src) aggregate = db.aggregate_get_by_host(context, src)
uuid = session.call_xenapi('host.get_record', dst)['uuid'] uuid = session.call_xenapi('host.get_record', dst)['uuid']
for compute_host, host_uuid in aggregate.metadetails.iteritems(): for compute_host, host_uuid in aggregate.metadetails.iteritems():

View File

@ -1442,7 +1442,7 @@ class VMOps(object):
def get_console_output(self, instance): def get_console_output(self, instance):
"""Return snapshot of console.""" """Return snapshot of console."""
# TODO: implement this to fix pylint! # TODO(armando-migliaccio): implement this to fix pylint!
return 'FAKE CONSOLE OUTPUT of instance' return 'FAKE CONSOLE OUTPUT of instance'
def get_vnc_console(self, instance): def get_vnc_console(self, instance):

View File

@ -117,7 +117,7 @@ class XenSMDriver(nova.volume.driver.VolumeDriver):
"""Setup includes creating or introducing storage repos """Setup includes creating or introducing storage repos
existing in the database and destroying deleted ones.""" existing in the database and destroying deleted ones."""
# TODO purge storage repos # TODO(renukaapte) purge storage repos
self.ctxt = ctxt self.ctxt = ctxt
self._create_storage_repos(ctxt) self._create_storage_repos(ctxt)
@ -127,7 +127,7 @@ class XenSMDriver(nova.volume.driver.VolumeDriver):
# For now the scheduling logic will be to try to fit the volume in # For now the scheduling logic will be to try to fit the volume in
# the first available backend. # the first available backend.
# TODO better scheduling once APIs are in place # TODO(renukaapte) better scheduling once APIs are in place
sm_vol_rec = None sm_vol_rec = None
backends = self.db.sm_backend_conf_get_all(self.ctxt) backends = self.db.sm_backend_conf_get_all(self.ctxt)
for backend in backends: for backend in backends:
@ -191,7 +191,6 @@ class XenSMDriver(nova.volume.driver.VolumeDriver):
def create_export(self, context, volume): def create_export(self, context, volume):
"""Exports the volume.""" """Exports the volume."""
# !!! TODO
pass pass
def remove_export(self, context, volume): def remove_export(self, context, volume):

View File

@ -295,7 +295,8 @@ class API(base.Base):
vc_count = kwargs.get('vc_count', None) vc_count = kwargs.get('vc_count', None)
if vc_count is not None: if vc_count is not None:
# VP-TODO: This request may want to update number of VCs # VP-TODO(vladimir.p):
# This request may want to update number of VCs
# Get number of current VCs and add/delete VCs appropriately # Get number of current VCs and add/delete VCs appropriately
vsa = self.get(context, vsa_id) vsa = self.get(context, vsa_id)
vc_count = int(vc_count) vc_count = int(vc_count)
@ -317,13 +318,13 @@ class API(base.Base):
add_cnt = vc_count - old_vc_count add_cnt = vc_count - old_vc_count
LOG.debug(_("Adding %(add_cnt)s VCs to VSA %(vsa_name)s."), LOG.debug(_("Adding %(add_cnt)s VCs to VSA %(vsa_name)s."),
locals()) locals())
# VP-TODO: actual code for adding new VCs # VP-TODO(vladimir.p): actual code for adding new VCs
elif vc_count < old_vc_count: elif vc_count < old_vc_count:
del_cnt = old_vc_count - vc_count del_cnt = old_vc_count - vc_count
LOG.debug(_("Deleting %(del_cnt)s VCs from VSA %(vsa_name)s."), LOG.debug(_("Deleting %(del_cnt)s VCs from VSA %(vsa_name)s."),
locals()) locals())
# VP-TODO: actual code for deleting extra VCs # VP-TODO(vladimir.p): actual code for deleting extra VCs
def _force_volume_delete(self, ctxt, volume): def _force_volume_delete(self, ctxt, volume):
"""Delete a volume, bypassing the check that it must be available.""" """Delete a volume, bypassing the check that it must be available."""