diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-01-23 15:17:17 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-01-23 15:17:17 -0500 |
commit | 573ee6d9d641356374ac616f53cb254d4da7c9db (patch) | |
tree | e96228256276875c47c5031160bd2f3cbe3b5398 /cloudinit/config/cc_growpart.py | |
parent | 1781668dd65737a800c2c8fdbb79c6f1288d3ef2 (diff) | |
parent | c833a84f08019ba4413937f2f1b1f12a4ffe5632 (diff) | |
download | vyos-cloud-init-573ee6d9d641356374ac616f53cb254d4da7c9db.tar.gz vyos-cloud-init-573ee6d9d641356374ac616f53cb254d4da7c9db.zip |
merge from trunk
Diffstat (limited to 'cloudinit/config/cc_growpart.py')
-rw-r--r-- | cloudinit/config/cc_growpart.py | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/cloudinit/config/cc_growpart.py b/cloudinit/config/cc_growpart.py index 29d8b49b..1d3a4412 100644 --- a/cloudinit/config/cc_growpart.py +++ b/cloudinit/config/cc_growpart.py @@ -80,30 +80,6 @@ class ResizeFailedException(Exception): pass -class ResizeParted(object): - def available(self): - myenv = os.environ.copy() - myenv['LANG'] = 'C' - - try: - (out, _err) = util.subp(["parted", "--help"], env=myenv) - if re.search(r"COMMAND.*resizepart\s+", out, re.DOTALL): - return True - - except util.ProcessExecutionError: - pass - return False - - def resize(self, diskdev, partnum, partdev): - before = get_size(partdev) - try: - util.subp(["parted", diskdev, "resizepart", partnum]) - except util.ProcessExecutionError as e: - raise ResizeFailedException(e) - - return (before, get_size(partdev)) - - class ResizeGrowPart(object): def available(self): myenv = os.environ.copy() @@ -318,6 +294,4 @@ def handle(_name, cfg, _cloud, log, _args): else: log.debug("'%s' %s: %s" % (entry, action, msg)) -# LP: 1212444 FIXME re-order and favor ResizeParted -#RESIZERS = (('growpart', ResizeGrowPart),) -RESIZERS = (('growpart', ResizeGrowPart), ('parted', ResizeParted), ('gpart', ResizeGpart)) +RESIZERS = (('growpart', ResizeGrowPart), ('gpart', ResizeGpart)) |