[virt-tools-list] [PATCH 4/6] Add functions to know if a config can/must be set

Fabiano Fidêncio fabiano at fidencio.org
Wed Jul 25 14:36:03 UTC 2012


On Wed, Jul 25, 2012 at 4:34 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
> On Wed, Jul 25, 2012 at 04:28:54PM +0200, Fabiano Fidêncio wrote:
>> On Wed, Jul 25, 2012 at 3:18 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
>> > On Tue, Jul 24, 2012 at 10:05:16PM +0200, Fabiano Fidêncio wrote:
>> >> @@ -128,6 +129,12 @@ const GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script,
>> >>                                                     GCancellable *cancellable,
>> >>                                                     GError **error);
>> >>
>> >> +gboolean osinfo_install_script_is_config(OsinfoInstallScript *script,
>> >> +                                         const gchar *config);
>> >> +
>> >> +gboolean osinfo_install_script_is_config_required(OsinfoInstallScript *script,
>> >> +                                                  const gchar *config);
>> >
>> > How about having an enum
>> >
>> >    typedef enum {
>> >      OSINFO_INSTALL_SCRIPT_CONFIG_POLICY_NONE,
>> >      OSINFO_INSTALL_SCRIPT_CONFIG_POLICY_REQUIRED,
>> >      OSINFO_INSTALL_SCRIPT_CONFIG_POLICY_OPTIONAL,
>> >    } OsinfoInstallScriptConfigPolicy;
>> >
>>
>> it makes sense, but how xml will know about this enum?
>> should I set as 0, 1, 2 in the xml?
>
> No, you only need deal with this is in the 'get_config_parameter' method.
> At the XML level just use the strings as you already have.

So, agreed!

>
> 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 :|



-- 
Fabiano Fidêncio




More information about the virt-tools-list mailing list