Code review comment for lp:~justin-fathomdb/nova/raw-disk-images

Revision history for this message
Jay Pipes (jaypipes) wrote :

Hi!

Good stuff, Justin! ++ for long option names :)

A couple tiny nits, though :)

27 + if not os.path.exists(mapped_device):
28 + raise exception.Error('Mapped device was not found: %s' % mapped_device)

There is a NotFound exception class in /nova/exception.py that may be better that raising the generic error here. Or, alternately, you could raise IOError, as that is what is raised by open() when the file does not exist?

77 + # This is correct for Ubuntu, but might not be right for other distros
78 + rulesfile = os.path.join(fs, 'etc', 'udev', 'rules.d', '70-persistent-net.rules')
79 + yield execute('rm -f %s' % rulesfile)

Best to add a TODO(justinsb) there so it's noted for future improvements :)

Finally, not sure about making Cheetah a dependency here...what do other think?

Cheers!
jay

review: Needs Fixing

« Back to merge proposal