Commit e0e44476 authored by Michele Tartara's avatar Michele Tartara
Browse files

Fix some wrong indentations in the code



Fix all instances of pep8's error: "E128 continuation line under-indented for
visual indent".
Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 6294e2b4
......@@ -343,8 +343,9 @@ commands = {
"Lists all available fields for node groups"),
"modify": (
SetGroupParams, ARGS_ONE_GROUP,
[DRY_RUN_OPT] + SUBMIT_OPTS + [ALLOC_POLICY_OPT, NODE_PARAMS_OPT,
HV_STATE_OPT, DISK_STATE_OPT, DISK_PARAMS_OPT, PRIORITY_OPT]
[DRY_RUN_OPT] + SUBMIT_OPTS +
[ALLOC_POLICY_OPT, NODE_PARAMS_OPT, HV_STATE_OPT, DISK_STATE_OPT,
DISK_PARAMS_OPT, PRIORITY_OPT]
+ INSTANCE_POLICY_OPTS,
"<group_name>", "Alters the parameters of a node group"),
"remove": (
......
......@@ -717,7 +717,7 @@ class LUNetworkDisconnect(LogicalUnit):
_NetworkConflictCheck(
self, lambda nic: nic.network == self.network_uuid, "disconnect from",
[instance_info for (_, instance_info) in
self.cfg.GetMultiInstanceInfoByName(owned_instances)])
self.cfg.GetMultiInstanceInfoByName(owned_instances)])
def Exec(self, feedback_fn):
# Disconnect the network and update the group only if network is connected
......
......@@ -1945,16 +1945,16 @@ def _GetInstanceDiskFields():
fields.extend([
(_MakeField("disk.size/%s" % i, "Disk/%s" % i, QFT_UNIT,
"Disk size of %s disk" % numtext),
IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDiskSize)),
IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDiskSize)),
(_MakeField("disk.spindles/%s" % i, "DiskSpindles/%s" % i, QFT_NUMBER,
"Spindles of %s disk" % numtext),
IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDiskSpindles)),
(_MakeField("disk.name/%s" % i, "DiskName/%s" % i, QFT_TEXT,
"Name of %s disk" % numtext),
IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceName)),
IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceName)),
(_MakeField("disk.uuid/%s" % i, "DiskUUID/%s" % i, QFT_TEXT,
"UUID of %s disk" % numtext),
IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceUUID))])
IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceUUID))])
return fields
......@@ -2794,7 +2794,7 @@ def _BuildNetworkFields():
# Add fields for usage statistics
fields.extend([
(_MakeField(name, title, kind, doc), NETQ_STATS, 0,
compat.partial(_GetNetworkStatsField, name, kind))
compat.partial(_GetNetworkStatsField, name, kind))
for (name, (title, kind, _, doc)) in _NETWORK_STATS_FIELDS.items()])
# Add timestamps
......
......@@ -499,12 +499,12 @@ def TestClusterModifyFileBasedStorageDir(
for fail, cmd in [
(False, ["gnt-cluster", "modify",
"--enabled-disk-templates=%s" % file_disk_template,
"--ipolicy-disk-templates=%s" % file_disk_template]),
"--enabled-disk-templates=%s" % file_disk_template,
"--ipolicy-disk-templates=%s" % file_disk_template]),
(False, ["gnt-cluster", "modify",
"--%s=%s" % (option_name, file_storage_dir)]),
"--%s=%s" % (option_name, file_storage_dir)]),
(False, ["gnt-cluster", "modify",
"--%s=%s" % (option_name, invalid_file_storage_dir)]),
"--%s=%s" % (option_name, invalid_file_storage_dir)]),
# file storage dir is set to an inacceptable path, thus verify
# should fail
(True, ["gnt-cluster", "verify"]),
......@@ -513,24 +513,24 @@ def TestClusterModifyFileBasedStorageDir(
(True, ["gnt-cluster", "modify",
"--%s=" % option_name]),
(False, ["gnt-cluster", "modify",
"--%s=%s" % (option_name, file_storage_dir)]),
"--%s=%s" % (option_name, file_storage_dir)]),
(False, ["gnt-cluster", "modify",
"--enabled-disk-templates=%s" % other_disk_template,
"--ipolicy-disk-templates=%s" % other_disk_template]),
"--enabled-disk-templates=%s" % other_disk_template,
"--ipolicy-disk-templates=%s" % other_disk_template]),
(False, ["gnt-cluster", "modify",
"--%s=%s" % (option_name, invalid_file_storage_dir)]),
"--%s=%s" % (option_name, invalid_file_storage_dir)]),
# file storage is set to an inacceptable path, but file storage
# is disabled, thus verify should not fail
(False, ["gnt-cluster", "verify"]),
# unsetting the file storage dir while file storage is not enabled
# should be fine
(False, ["gnt-cluster", "modify",
"--%s=" % option_name]),
"--%s=" % option_name]),
# resetting everything to sane values
(False, ["gnt-cluster", "modify",
"--%s=%s" % (option_name, file_storage_dir),
"--enabled-disk-templates=%s" % ",".join(enabled_disk_templates),
"--ipolicy-disk-templates=%s" % ",".join(enabled_disk_templates)])
"--%s=%s" % (option_name, file_storage_dir),
"--enabled-disk-templates=%s" % ",".join(enabled_disk_templates),
"--ipolicy-disk-templates=%s" % ",".join(enabled_disk_templates)])
]:
AssertCommand(cmd, fail=fail)
......
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