Removed describe methods.

This commit is contained in:
Joshua Harlow
2012-02-09 20:44:49 -08:00
parent 95ea8f77e5
commit 4be2d8437a
16 changed files with 3 additions and 249 deletions

View File

@@ -333,19 +333,3 @@ def create_db(cfg, dbname):
else:
msg = BASE_ERROR % ('create', dbtype)
raise NotImplementedError(msg)
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the db component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -212,25 +212,3 @@ class GlanceRuntime(comp.PythonRuntime):
LOG.info("Waiting %s seconds so that glance can start up before image install." % (WAIT_ONLINE_TO))
time.sleep(WAIT_ONLINE_TO)
creator.ImageCreationService(self.cfg).install()
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
copts = """
{no_img_upload} - disables upload of test images to glance.
{glance_api} - only enable the glance api subcomponent.
{glance_reg} - only enable the glance registry subcomponent.
"""
params = dict()
params['component_opts'] = copts.strip("\n").format(no_img_upload=NO_IMG_START,
glance_api=GAPI, glance_reg=GREG)
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the glance component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -327,23 +327,7 @@ class HorizonRuntime(comp.EmptyRuntime):
combined = combined.lower()
if sysout.find("is running") != -1:
return comp.STATUS_STARTED
elif sysout.find("NOT running") != -1 or sysout.find("stopped") != -1:
elif sysout.find("not running") != -1 or sysout.find("stopped") != -1:
return comp.STATUS_STOPPED
else:
return comp.STATUS_UNKNOWN
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the horizon component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -222,19 +222,3 @@ def get_shared_params(config):
mp['KEYSTONE_SERVICE_PROTOCOL'] = config.get('keystone', 'keystone_service_protocol')
mp['SERVICE_TOKEN'] = config.get("passwords", "service_token")
return mp
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the keystone component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -50,19 +50,3 @@ class KeyStoneClientInstaller(comp.PythonInstallComponent):
class KeyStoneClientRuntime(comp.EmptyRuntime):
def __init__(self, *args, **kargs):
comp.EmptyRuntime.__init__(self, TYPE, *args, **kargs)
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the keystone client component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -177,19 +177,3 @@ class MelangeRuntime(comp.PythonRuntime):
mp = dict()
mp['CIDR_RANGE'] = self.cfg.get('melange', 'm_mac_range')
utils.execute_template(*CIDR_CREATE_CMD, params=mp)
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the melange component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -50,19 +50,3 @@ class MelangeClientInstaller(comp.PythonInstallComponent):
class MelangeClientRuntime(comp.EmptyRuntime):
def __init__(self, *args, **kargs):
comp.EmptyRuntime.__init__(self, TYPE, *args, **kargs)
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the melange client component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -762,19 +762,3 @@ class NovaConf(object):
full_line = key_str + ",".join(filled_opts)
gen_lines.append(full_line)
return gen_lines
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the nova component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -50,19 +50,3 @@ class NovaClientInstaller(comp.PythonInstallComponent):
class NovaClientRuntime(comp.EmptyRuntime):
def __init__(self, *args, **kargs):
comp.EmptyRuntime.__init__(self, TYPE, *args, **kargs)
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the nova client component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -83,19 +83,3 @@ class NoVNCRuntime(comp.ProgramRuntime):
def _get_app_options(self, app):
return APP_OPTIONS.get(app)
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the no-vnc component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -256,19 +256,3 @@ class QuantumRuntime(comp.ProgramRuntime):
elif app_name == APP_Q_SERVER:
param_dict['QUANTUM_CONFIG_FILE'] = sh.joinpths(self.appdir, CONFIG_DIR, QUANTUM_CONF)
return param_dict
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the quantum component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -50,19 +50,3 @@ class QuantumClientInstaller(comp.PythonInstallComponent):
class QuantumClientRuntime(comp.EmptyRuntime):
def __init__(self, *args, **kargs):
comp.EmptyRuntime.__init__(self, TYPE, *args, **kargs)
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the quantum client component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -142,19 +142,3 @@ class RabbitRuntime(comp.EmptyRuntime):
return 1
else:
return 0
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the rabbit-mq component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -213,19 +213,3 @@ class SwiftRuntime(comp.PythonRuntime):
def restart(self):
sh.execute(sh.joinpths(self.bindir, SWIFT_INIT), 'all', 'restart',
run_as_root=True)
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the swift component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -50,19 +50,3 @@ class SwiftKeystoneInstaller(comp.PythonInstallComponent):
class SwiftKeystoneRuntime(comp.PythonRuntime):
def __init__(self, *args, **kargs):
comp.PythonRuntime.__init__(self, TYPE, *args, **kargs)
def describe(opts=None):
description = """
Module: {module_name}
Description:
{description}
Component options:
{component_opts}
"""
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the swift keystone component."
out = description.format(**params)
return out.strip("\n")

View File

@@ -65,7 +65,7 @@ def parse():
default=True)
base_group.add_option("-r", "--ref-component",
action="append",
dest="r_component",
dest="ref_components",
metavar="COMPONENT",
help="component which will not have ACTION applied but will be referenced as if it was (ACTION dependent)")
base_group.add_option("-k", "--keep-packages",
@@ -87,7 +87,7 @@ def parse():
output = dict()
output['components'] = options.component
output['dir'] = options.dir
output['ref_components'] = options.r_component
output['ref_components'] = options.ref_components
output['action'] = options.action
output['force'] = not options.force
output['ignore_deps'] = not options.ensure_deps