Commit f781222d authored by Niklas Hambuechen's avatar Niklas Hambuechen

Refactoring: Move options from cli.py to cli_opts.py

The cli.py module exceeded our max-module-lines limit and needs to be
split.

This pulls out all command line option definitions into a separate module.

It uses cli_opts instead of cli.opts since importing a module below
your own path causes problems if you want to re-export everything
from the lower module (which we want in this case).
Signed-off-by: default avatarNiklas Hambuechen <niklash@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 2c5557b1
......@@ -420,6 +420,7 @@ pkgpython_PYTHON = \
lib/backend.py \
lib/bootstrap.py \
lib/cli.py \
lib/cli_opts.py \
lib/compat.py \
lib/config.py \
lib/constants.py \
......
This diff is collapsed.
This diff is collapsed.
......@@ -265,7 +265,12 @@ def ModifyOS(opts, args):
@return: the desired exit code
"""
os = args[0]
# We have to disable pylint for this assignment because of a Pylint bug:
# Even though there is no `os` in scope, it claims
# Redefining name 'os' from outer scope
# It is supposed to come from `from ganeti.cli import *`, but that doesn't
# export `os` since it has `__all__` set.
os = args[0] # pylint: disable=W0621
if opts.hvparams:
os_hvp = {os: dict(opts.hvparams)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment