[node-patches] Change in ovirt-node[master]: edit-node pep8 cleanup blank line issues
jboggs at redhat.com
jboggs at redhat.com
Wed May 15 16:24:23 UTC 2013
Joey Boggs has uploaded a new change for review.
Change subject: edit-node pep8 cleanup blank line issues
......................................................................
edit-node pep8 cleanup blank line issues
Signed-off-by: Joey Boggs <jboggs at redhat.com>
Change-Id: I737b9080a059079e490dadb1534f1c781e6cf093
---
M tools/edit-node
1 file changed, 9 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/52/14752/1
diff --git a/tools/edit-node b/tools/edit-node
index f9e9208..cc50c53 100755
--- a/tools/edit-node
+++ b/tools/edit-node
@@ -42,6 +42,7 @@
from imgcreate import read_kickstart
from optparse import Option
+
class MultipleOption(Option):
ACTIONS = Option.ACTIONS + ("extend",)
STORE_ACTIONS = Option.STORE_ACTIONS + ("extend",)
@@ -54,6 +55,7 @@
else:
Option.take_action(self, action, dest, opt, value, values, parser)
+
class ExistingSparseLoopbackDisk(SparseLoopbackDisk):
"""don't want to expand the disk"""
def __init__(self, lofile, size):
@@ -63,7 +65,9 @@
#self.expand(create = True)
LoopbackDisk.create(self)
+
class LiveImageEditor(LiveImageCreator):
+
def __init__(self, name, docleanup=True):
self.name = name
self.docleanup = docleanup
@@ -279,7 +283,6 @@
self.__instloop.cleanup()
-
def __copy_img_root(self, base_on):
"""helper function to copy root content of the base LiveIMG to
ISOdir"""
@@ -304,7 +307,6 @@
subprocess.call(['sync'])
finally:
imgmnt.cleanup()
-
def mount(self, base_on, cachedir = None):
"""mount existing file system.
@@ -410,7 +412,6 @@
self.__instloop.cleanup()
-
def __copy_img_root(self, base_on):
"""helper function to copy root content of the base LiveIMG to
ISOdir"""
@@ -435,7 +436,6 @@
subprocess.call(['sync'])
finally:
imgmnt.cleanup()
-
def _brand (self, _builder):
"""Adjust the image branding to show its variation from original
@@ -485,7 +485,6 @@
self._releasefile = ntext
self.name += '-' + os.uname()[4] + '-' + time.strftime('%Y%m%d.%H%M')
-
def _configure_bootloader(self, isodir):
"""Restore the boot configuration files for an iso image boot."""
@@ -697,6 +696,7 @@
output, err = f.communicate()
print "\n%s\n" % output
return True
+
def _list_plugins(self):
plugin_info_dir = "%s/etc/ovirt-plugins.d" % self._instroot
if os.path.exists(plugin_info_dir):
@@ -998,6 +998,7 @@
# bind mount resolv.conf
os.system("touch %s/etc/resolv.conf" % self._instroot)
os.system("mount -o bind /etc/resolv.conf %s/etc/resolv.conf" % self._instroot)
+
def _setup_yum_repo(self, options):
print "Configuring Yum Repo"
self.dd_dir = tempfile.mkdtemp(dir = os.path.abspath(self.tmpdir), prefix = "dd-iso")
@@ -1337,7 +1338,6 @@
parser.add_option_group(m_grp)
-
setup_logging(parser)
(options, args) = parser.parse_args()
@@ -1348,6 +1348,7 @@
print args[0]
return (args[0], options)
+
def get_fsvalue(filesystem, tag):
dev_null = os.open('/dev/null', os.O_WRONLY)
@@ -1363,6 +1364,7 @@
return fs_type.rstrip()
+
def rebuild_iso_symlinks(isodir):
# remove duplicate files and rebuild symlinks to reduce iso size
efi_vmlinuz = "%s/EFI/BOOT/vmlinuz0" % isodir
@@ -1378,6 +1380,7 @@
os.system("ln -s ../../isolinux/initrd0.img .")
os.chdir(cwd)
+
def main():
# LiveOS set to <LIVEIMG.src>
(LiveOS, options) = parse_options(sys.argv[1:])
--
To view, visit http://gerrit.ovirt.org/14752
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I737b9080a059079e490dadb1534f1c781e6cf093
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>
More information about the node-patches
mailing list