On Tue, Oct 22, 2013 at 09:27:53PM +0530, Nehal J Wani wrote:
On Tue, Oct 22, 2013 at 9:10 PM, Eric Blake <eblake(a)redhat.com>
wrote:
> On 10/22/2013 04:15 PM, Daniel P. Berrange wrote:
>> On Tue, Oct 22, 2013 at 04:15:37PM +0530, Nehal J Wani wrote:
>>> Q1. The --dhcp-script option will require libvirt to provide a script
>>> or executable file to be run. Now as the man page says, this file is
>>> executed "Whenever a new DHCP ease is created, or an old one
>>> destroyed". Life was easy with the script, as it used the command sed
>>> to remove the destroyed lease. eblake had suggested me to use a C
>>> program instead. So I wanted to finalize whether to go with C or
>>> continue with shell script.
>>
>> Libvirt aims to avoid shell code whereever possible, since it is really
>> a very bad language from terms of reliability and security. eg quoting
>> rules are easy to get wrong, error handling is awful, portability is
>> non-trivial.
>
> For examples of writing a helper C program, see how src/util/iohelper.c
> is compiled into libvirt_iohelper.
>
What are libvirt's views on python as a helper program?
No to python for this role. This should be C.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|