Change in vdsm[master]: rename variables to be consistent in vdsm-restore-net-config

ibarkan at redhat.com ibarkan at redhat.com
Thu Mar 26 07:16:06 UTC 2015


Ido Barkan has uploaded a new change for review.

Change subject: rename variables to be consistent in vdsm-restore-net-config
......................................................................

rename variables to be consistent in vdsm-restore-net-config

Change-Id: I2fcd57818ecf75a502d56f2e76e7edd0350a656f
Signed-off-by: Ido Barkan <ibarkan at redhat.com>
---
M vdsm/vdsm-restore-net-config
1 file changed, 16 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/39215/1

diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index 9bfd7a8..dccf32b 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -51,20 +51,20 @@
     Builds a setupNetworks command from the persistent configuration to set it
     as running configuration.
     """
-    runningConfig = RunningConfig()
-    removeNetworks = {}
-    removeBonds = {}
-    for network in runningConfig.networks:
-        removeNetworks[network] = {'remove': True}
-    for bond in runningConfig.bonds:
-        removeBonds[bond] = {'remove': True}
-    if removeNetworks or removeBonds:
+    running_config = RunningConfig()
+    remove_networks = {}
+    remove_bonds = {}
+    for network in running_config.networks:
+        remove_networks[network] = {'remove': True}
+    for bond in running_config.bonds:
+        remove_bonds[bond] = {'remove': True}
+    if remove_networks or remove_bonds:
         logging.debug('Removing all networks (%s) and bonds (%s) in running '
-                      'config.', removeNetworks, removeBonds)
-        setupNetworks(removeNetworks, removeBonds, connectivityCheck=False,
+                      'config.', remove_networks, remove_bonds)
+        setupNetworks(remove_networks, remove_bonds, connectivityCheck=False,
                       _inRollback=True)
     else:
-        logging.debug('runningConfig is empty. Nothing to remove')
+        logging.debug('running_config is empty. Nothing to remove')
 
     # Flush vdsm configurations left-overs from any configurator on the system
     # so that changes of configurator and persistence system are smooth.
@@ -72,12 +72,12 @@
         configurator_cls().flush()
 
     # Restore non-VDSM network devices (BZ#1188251)
-    configWriter = ifcfg.ConfigWriter()
-    configWriter.restorePersistentBackup()
+    config_writer = ifcfg.ConfigWriter()
+    config_writer.restorePersistentBackup()
 
-    persistentConfig = PersistentConfig()
-    nets, bonds = _filter_nets_bonds(persistentConfig.networks,
-                                     persistentConfig.bonds)
+    persistent_config = PersistentConfig()
+    nets, bonds = _filter_nets_bonds(persistent_config.networks,
+                                     persistent_config.bonds)
     if nets or bonds:
         logging.debug('Calling setupNetworks with networks '
                       '(%s) and bond (%s).', nets, bonds)


-- 
To view, visit https://gerrit.ovirt.org/39215
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fcd57818ecf75a502d56f2e76e7edd0350a656f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>


More information about the vdsm-patches mailing list