diff options
Diffstat (limited to 'cloudinit/config/cc_resizefs.py')
-rw-r--r-- | cloudinit/config/cc_resizefs.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cloudinit/config/cc_resizefs.py b/cloudinit/config/cc_resizefs.py index 0bbbf81e..44b27933 100644 --- a/cloudinit/config/cc_resizefs.py +++ b/cloudinit/config/cc_resizefs.py @@ -27,13 +27,16 @@ from cloudinit import util frequency = PER_ALWAYS -def _resize_btrfs(mount_point, devpth): + +def _resize_btrfs(mount_point, devpth): # pylint: disable=W0613 return ('btrfs', 'filesystem', 'resize', 'max', mount_point) -def _resize_ext(mount_point, devpth): + +def _resize_ext(mount_point, devpth): # pylint: disable=W0613 return ('resize2fs', devpth) -def _resize_xfs(mount_point, devpth): + +def _resize_xfs(mount_point, devpth): # pylint: disable=W0613 return ('xfs_growfs', devpth) # Do not use a dictionary as these commands should be able to be used @@ -116,8 +119,8 @@ def get_mount_info(path, log): # Get the path to the device. try: - fs_type = parts[i+1] - devpth = parts[i+2] + fs_type = parts[i + 1] + devpth = parts[i + 2] except IndexError: log.debug("Too few columns in %s after '-' column", mountinfo_path) return None @@ -130,6 +133,7 @@ def get_mount_info(path, log): else: return None + def handle(name, cfg, _cloud, log, args): if len(args) != 0: resize_root = args[0] |