[libvirt] [libvirt-glib PATCH] Add filterref and filterref parameter support.

Christophe Fergeau cfergeau at redhat.com
Tue Oct 22 08:25:26 UTC 2013


Hey,

On Mon, Oct 21, 2013 at 11:36:25AM -0700, Ian Main wrote:
> On Wed, Oct 16, 2013 at 11:12:46AM +0200, Christophe Fergeau wrote:
> > I'm wondering if we should call that method
> > gvir_config_domain_interface_filterref_set_filter_name()
> > so that in the future we can have
> > gvir_config_domain_interface_filterref_set_filter(GVirConfigDomainInterfaceFilterref *ref,
> >                                                   GVirConfigNwFilter *filter);
> 
> Where would the GVirConfigNwFilter come from?  This would be an
> interface to actually create the filter definition or get a handle for
> one?

The former. Hopefully one day libvirt-gconfig will have API like

GVirConfigNwFilter *filter;
GVirConfigNwFilterRule *rule;

filter = gvir_config_nw_filter_new();
gvir_config_nw_filter_set_name(filter, "my-filter");
rule = gvir_config_nw_filter_rule_new();
gvir_config_nw_filter_rule_set_action(rule, GVIR_CONFIG_NW_FILTER_RULE_ACTION_DROP);
gvir_config_nw_filter_add_rule(filter, rule);

which would just generate the XML for the rule.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131022/01c6e57d/attachment-0001.sig>


More information about the libvir-list mailing list