[PATCH f18-branch] Add logging for networking and improve logging of ifcfg files
Vratislav Podzimek
vpodzime at redhat.com
Fri Dec 7 10:31:43 UTC 2012
On Fri, 2012-12-07 at 09:57 +0100, Radek Vykydal wrote:
> @@ -424,6 +427,7 @@ def get_NM_object(path):
> # Handle default auto connections created by NM upon start
> # For server, those will be turned off in NetworkManager.conf
> def createMissingDefaultIfcfgs():
> + rv = False
> nm = get_NM_object(isys.NM_MANAGER_PATH)
> dev_paths = nm.GetDevices()
> settings = get_NM_object(isys.NM_SETTINGS_PATH)
> @@ -450,10 +454,14 @@ def createMissingDefaultIfcfgs():
> if con_hwaddr.upper() == hwaddr.upper():
> setting['connection']['id'] = interface
> con.Update(setting)
> + rv = True
> + log.debug("network: dumped ifcfg file for default autoconnection on %s" % interface)
> break
> else:
> # if there is no connection, create default ifcfg
> device_cfg.setDefaultConfig()
> + rv = True
> + return rv
Could you add a docstring documenting the return value and containing
the comment above the function? Otherwise this looks good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list