Commit 317a3fdb authored by Michele Tartara's avatar Michele Tartara
Browse files

Fix indentation for newer lints



Newer versions of pylint are more strict regarding indentation rules. This
commit fixes a couple of indentations that they consider wrong.
Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
Reviewed-by: default avatarJose A. Lopes <jabolopes@google.com>
parent f56ab6d1
......@@ -616,37 +616,37 @@ def _TestClusterModifyDiskTemplatesDrbdHelper(enabled_disk_templates):
drbd_usermode_helper = qa_config.get("drbd-usermode-helper", "/bin/true")
bogus_usermode_helper = "/tmp/pinkbunny"
for command, fail in \
[(["gnt-cluster", "modify",
"--enabled-disk-templates=%s" % constants.DT_DRBD8,
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=%s" % drbd_usermode_helper], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=%s" % bogus_usermode_helper], True),
# unsetting helper when DRBD is enabled should not work
(["gnt-cluster", "modify",
"--drbd-usermode-helper="], True),
(["gnt-cluster", "modify",
"--enabled-disk-templates=%s" % constants.DT_PLAIN,
"--ipolicy-disk-templates=%s" % constants.DT_PLAIN], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper="], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=%s" % drbd_usermode_helper], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=%s" % drbd_usermode_helper,
"--enabled-disk-templates=%s" % constants.DT_DRBD8,
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=",
"--enabled-disk-templates=%s" % constants.DT_PLAIN,
"--ipolicy-disk-templates=%s" % constants.DT_PLAIN], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=%s" % drbd_usermode_helper,
"--enabled-disk-templates=%s" % constants.DT_DRBD8,
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False),
]:
for command, fail in [
(["gnt-cluster", "modify",
"--enabled-disk-templates=%s" % constants.DT_DRBD8,
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=%s" % drbd_usermode_helper], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=%s" % bogus_usermode_helper], True),
# unsetting helper when DRBD is enabled should not work
(["gnt-cluster", "modify",
"--drbd-usermode-helper="], True),
(["gnt-cluster", "modify",
"--enabled-disk-templates=%s" % constants.DT_PLAIN,
"--ipolicy-disk-templates=%s" % constants.DT_PLAIN], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper="], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=%s" % drbd_usermode_helper], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=%s" % drbd_usermode_helper,
"--enabled-disk-templates=%s" % constants.DT_DRBD8,
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=",
"--enabled-disk-templates=%s" % constants.DT_PLAIN,
"--ipolicy-disk-templates=%s" % constants.DT_PLAIN], False),
(["gnt-cluster", "modify",
"--drbd-usermode-helper=%s" % drbd_usermode_helper,
"--enabled-disk-templates=%s" % constants.DT_DRBD8,
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False),
]:
AssertCommand(command, fail=fail)
_RestoreEnabledDiskTemplates()
......
......@@ -115,7 +115,7 @@ class CmdlibTestCase(testutils.GanetiTestCase):
doc="Default OS")
os_name_variant = property(
fget=lambda self: self.os.name + objects.OS.VARIANT_DELIM +
self.os.supported_variants[0],
self.os.supported_variants[0],
doc="OS name and variant string")
def setUp(self):
......
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