aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaine Stump <laine@laine.org>2012-08-04 03:09:47 -0400
committerLaine Stump <laine@laine.org>2012-08-14 15:47:20 -0400
commit1c02ed14217f383a77d16c24310503ff165292f2 (patch)
treec40767364483102fc025fcfea8b8f578f074b075 /src/libvirt_private.syms
parentutil: add openvswitch case to virNetDevVPortProfileEqual (diff)
downloadlibvirt-1c02ed14217f383a77d16c24310503ff165292f2.tar.gz
libvirt-1c02ed14217f383a77d16c24310503ff165292f2.tar.bz2
libvirt-1c02ed14217f383a77d16c24310503ff165292f2.zip
util: utility functions for virNetDevVPortProfile
This patch adds three utility functions that operate on virNetDevVPortProfile objects. * virNetDevVPortProfileCheckComplete() - verifies that all attributes required for the type of the given virtport are specified. * virNetDevVPortProfileCheckNoExtras() - verifies that there are no attributes specified which are inappropriate for the type of the given virtport. * virNetDevVPortProfileMerge3() - merges 3 virtports into a single, newly allocated virtport. If any attributes are specified in more than one of the three sources, and do not exactly match, an error is logged and the function fails. These new functions depend on new fields in the virNetDevVPortProfile object that keep track of whether or not each attribute was specified. Since the higher level parse function doesn't yet set those fields, these functions are not actually usable yet (but that's okay, because they also aren't yet used - all of that functionality comes in a later patch.) Note that these three functions return 0 on success and -1 on failure. This may seem odd for the first two Check functions, since they could also easily return true/false, but since they actually log an error when the requested condition isn't met (and should result in a failure of the calling function), I thought 0/-1 was more appropriate.
Diffstat (limited to 'src/libvirt_private.syms')
-rw-r--r--src/libvirt_private.syms3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 1905d6f85..4c4a9bd08 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1428,8 +1428,11 @@ virNetDevVethDelete;
# virnetdevvportprofile.h
virNetDevVPortProfileAssociate;
+virNetDevVPortProfileCheckComplete;
+virNetDevVPortProfileCheckNoExtras;
virNetDevVPortProfileDisassociate;
virNetDevVPortProfileEqual;
+virNetDevVPortProfileMerge3;
virNetDevVPortProfileOpTypeFromString;
virNetDevVPortProfileOpTypeToString;