char *nfs_group;
uid_t nfs_uid;
gid_t nfs_gid;
+
+ /* We need a flag to remember that the threshold event for this source was
+ * registered with a full index (vda[3]) so that we can properly report just
+ * one event for it */
+ bool thresholdEventWithIndex;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virStorageSource, virObjectUnref);
g_autofree char *encalias = NULL;
g_autofree char *httpcookiealias = NULL;
g_autofree char *tlskeyalias = NULL;
+ g_autofree char *thresholdEventWithIndex = NULL;
src->nodestorage = virXPathString("string(./nodenames/nodename[@type='storage']/@name)", ctxt);
src->nodeformat = virXPathString("string(./nodenames/nodename[@type='format']/@name)", ctxt);
if (virStorageSourcePrivateDataParseRelPath(ctxt, src) < 0)
return -1;
+ if ((thresholdEventWithIndex = virXPathString("string(./thresholdEvent/@indexUsed)", ctxt)) &&
+ virTristateBoolTypeFromString(thresholdEventWithIndex) == VIR_TRISTATE_BOOL_YES)
+ src->thresholdEventWithIndex = true;
+
return 0;
}
virXMLFormatElement(buf, "objects", NULL, &tmp);
+ if (src->thresholdEventWithIndex)
+ virBufferAddLit(buf, "<thresholdEvent indexUsed='yes'/>\n");
+
return 0;
}