Rename the API to be a better description of what it does. Besides, a
subsequent patch will rename virNetworkAssignDef to virNetworkObjAssignDef
so rather than make that patch confusing we'll take the intermittent step
in this patch.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/conf/virnetworkobj.c | 14 +++++++-------
src/conf/virnetworkobj.h | 6 +++---
src/libvirt_private.syms | 2 +-
src/network/bridge_driver.c | 4 ++--
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c
index 216c7ae..55730e4 100644
--- a/src/conf/virnetworkobj.c
+++ b/src/conf/virnetworkobj.c
@@ -276,7 +276,7 @@ virNetworkObjListDispose(void *obj)
/*
- * virNetworkObjAssignDef:
+ * virNetworkObjUpdateAssignDef:
* @network: the network object to update
* @def: the new NetworkDef (will be consumed by this function)
* @live: is this new def the "live" version, or the "persistent"
version
@@ -292,9 +292,9 @@ virNetworkObjListDispose(void *obj)
*
*/
void
-virNetworkObjAssignDef(virNetworkObjPtr network,
- virNetworkDefPtr def,
- bool live)
+virNetworkObjUpdateAssignDef(virNetworkObjPtr network,
+ virNetworkDefPtr def,
+ bool live)
{
if (live) {
/* before setting new live def, save (into newDef) any
@@ -378,9 +378,9 @@ virNetworkAssignDefLocked(virNetworkObjListPtr nets,
}
}
- virNetworkObjAssignDef(network,
- def,
- !!(flags & VIR_NETWORK_OBJ_LIST_ADD_LIVE));
+ virNetworkObjUpdateAssignDef(network,
+ def,
+ !!(flags & VIR_NETWORK_OBJ_LIST_ADD_LIVE));
} else {
/* UUID does not match, but if a name matches, refuse it */
if ((network = virNetworkObjFindByNameLocked(nets, def->name))) {
diff --git a/src/conf/virnetworkobj.h b/src/conf/virnetworkobj.h
index 431721b..0b6fbfe 100644
--- a/src/conf/virnetworkobj.h
+++ b/src/conf/virnetworkobj.h
@@ -95,9 +95,9 @@ virNetworkAssignDef(virNetworkObjListPtr nets,
unsigned int flags);
void
-virNetworkObjAssignDef(virNetworkObjPtr network,
- virNetworkDefPtr def,
- bool live);
+virNetworkObjUpdateAssignDef(virNetworkObjPtr network,
+ virNetworkDefPtr def,
+ bool live);
int
virNetworkObjSetDefTransient(virNetworkObjPtr network,
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 3e2cb6b..6aaa3f9 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -925,7 +925,6 @@ virNetworkConfigChangeSetup;
virNetworkDeleteConfig;
virNetworkLoadAllConfigs;
virNetworkLoadAllState;
-virNetworkObjAssignDef;
virNetworkObjEndAPI;
virNetworkObjFindByName;
virNetworkObjFindByNameLocked;
@@ -944,6 +943,7 @@ virNetworkObjSetDefTransient;
virNetworkObjTaint;
virNetworkObjUnsetDefTransient;
virNetworkObjUpdate;
+virNetworkObjUpdateAssignDef;
virNetworkRemoveInactive;
virNetworkSaveStatus;
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index f45c2a8..b30caf5 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3490,7 +3490,7 @@ static virNetworkPtr networkDefineXML(virConnectPtr conn, const char
*xml)
* definition by making it transient.
* XXX - this isn't necessarily the correct thing to do.
*/
- virNetworkObjAssignDef(network, NULL, false);
+ virNetworkObjUpdateAssignDef(network, NULL, false);
goto cleanup;
}
@@ -3554,7 +3554,7 @@ networkUndefine(virNetworkPtr net)
/* if the network still exists, it was active, and we need to make
* it transient (by deleting the persistent def)
*/
- virNetworkObjAssignDef(network, NULL, false);
+ virNetworkObjUpdateAssignDef(network, NULL, false);
}
ret = 0;
--
2.9.3