[PATCH 4/5] conf: Rename virNetworkObjAssignDef to virNetworkObjUpdateAssignDef

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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 3b5f27d..481c151 100644
--- a/src/conf/virnetworkobj.c
+++ b/src/conf/virnetworkobj.c
@@ -275,7 +275,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
@@ -291,9 +291,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
@@ -377,9 +377,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 ffc0c71..bae0f4e 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -915,7 +915,6 @@ virNetworkConfigChangeSetup;
 virNetworkDeleteConfig;
 virNetworkLoadAllConfigs;
 virNetworkLoadAllState;
-virNetworkObjAssignDef;
 virNetworkObjEndAPI;
 virNetworkObjFindByName;
 virNetworkObjFindByNameLocked;
@@ -934,6 +933,7 @@ virNetworkObjSetDefTransient;
 virNetworkObjTaint;
 virNetworkObjUnsetDefTransient;
 virNetworkObjUpdate;
+virNetworkObjUpdateAssignDef;
 virNetworkRemoveInactive;
 virNetworkSaveStatus;
 
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 20098f5..c675f1e 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3433,7 +3433,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;
     }
 
@@ -3497,7 +3497,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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux