$SUBJ:
lxc: Introduce lxcNetworkParseDataEntry
On 2/18/19 2:09 PM, Julio Faracco wrote:
This new method is responsible to verify is the settings correspond
to
network entry. Right now, it is only verifying "lxc.network.", but in
the future, it can be used to verify "lxc.net.X." too. Any other case
would be rejected.
On the other hand, the idea here is working only with types. If we know
that entry is part of network settings, after we just need to know which
type is. It keeps the hanlder simple.
*handler
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
src/lxc/lxc_native.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c
index 5bbbbf132c..c144f3c52e 100644
--- a/src/lxc/lxc_native.c
+++ b/src/lxc/lxc_native.c
@@ -648,6 +648,14 @@ lxcNetworkWalkCallback(const char *name, virConfValuePtr value, void
*data)
return 0;
}
+static int
+lxcNetworkParseDataEntry(const char *name, virConfValuePtr value, lxcNetworkParseData
*parseData)
Same thoughts as before w/r/t method headers.
However, because we require each patch to be able to compile separately,
things won't work in this order as lxcNetworkParseDataEntry is a static
method with no callers.
What needs to be done is this move this above lxcNetworkWalkCallback and
then merge in patch 4 to here and alter patch3 slightly.
That means patch4 gets dropped. I can do this and alter the commit
messages appropriately.
Reviewed-by: John Ferlan <jferlan(a)redhat.com>
John
[...]