FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 04-27-2010, 08:50 AM
Radek Vykydal
 
Default Remove no longer needed devices argument from Network.write().

Now when we set NM_CONTROLLED parameter more carefully before
writing a device, this parameter introduced by patch 898a891c
is no longer needed. OTOH it doesn't break anything and may
become handy in the future.
---
network.py | 9 ++++-----
textw/netconfig_text.py | 4 +---
2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/network.py b/network.py
index 76355a4..d947011 100644
--- a/network.py
+++ b/network.py
@@ -544,10 +544,9 @@ class Network:

return False

- def write(self, instPath=', anaconda=None, devices=None):
+ def write(self, instPath=', anaconda=None):

- if devices is None:
- devices = self.netdevices.values()
+ devices = self.netdevices.values()

if len(devices) == 0:
return
@@ -750,8 +749,8 @@ class Network:
# write out current configuration state and wait for NetworkManager
# to bring the device up, watch NM state and return to the caller
# once we have a state
- def bringUp(self, devices=None):
- self.write(devices=devices)
+ def bringUp(self):
+ self.write()
return self.waitForConnection()

# get a kernel cmdline string for dracut needed for access to host host
diff --git a/textw/netconfig_text.py b/textw/netconfig_text.py
index 41c0376..9b0b156 100644
--- a/textw/netconfig_text.py
+++ b/textw/netconfig_text.py
@@ -202,13 +202,11 @@ class NetworkConfiguratorText:
dev.set(('NM_CONTROLLED', 'no'))
dev.set(('ONBOOT', 'no'))

- selected_netdevs = []
for devname in selected:
if not netdevs.has_key(devname):
continue

netdev = netdevs[devname]
- selected_netdevs.append(netdev)
netdev.set(("ONBOOT", "yes"))

if self.dhcpCheckbox.selected():
@@ -276,7 +274,7 @@ class NetworkConfiguratorText:
continue

w = self.anaconda.intf.waitWindow(_("Configuring Network Interfaces"), _("Waiting for NetworkManager"))
- result = self.anaconda.network.bringUp(devices=selected_net devs)
+ result = self.anaconda.network.bringUp()
w.pop()
if result:
break
--
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-04-2010, 03:15 AM
David Cantrell
 
Default Remove no longer needed devices argument from Network.write().

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ack.

On Tue, 27 Apr 2010, Radek Vykydal wrote:


Now when we set NM_CONTROLLED parameter more carefully before
writing a device, this parameter introduced by patch 898a891c
is no longer needed. OTOH it doesn't break anything and may
become handy in the future.
---
network.py | 9 ++++-----
textw/netconfig_text.py | 4 +---
2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/network.py b/network.py
index 76355a4..d947011 100644
--- a/network.py
+++ b/network.py
@@ -544,10 +544,9 @@ class Network:

return False

- def write(self, instPath=', anaconda=None, devices=None):
+ def write(self, instPath=', anaconda=None):

- if devices is None:
- devices = self.netdevices.values()
+ devices = self.netdevices.values()

if len(devices) == 0:
return
@@ -750,8 +749,8 @@ class Network:
# write out current configuration state and wait for NetworkManager
# to bring the device up, watch NM state and return to the caller
# once we have a state
- def bringUp(self, devices=None):
- self.write(devices=devices)
+ def bringUp(self):
+ self.write()
return self.waitForConnection()

# get a kernel cmdline string for dracut needed for access to host host
diff --git a/textw/netconfig_text.py b/textw/netconfig_text.py
index 41c0376..9b0b156 100644
--- a/textw/netconfig_text.py
+++ b/textw/netconfig_text.py
@@ -202,13 +202,11 @@ class NetworkConfiguratorText:
dev.set(('NM_CONTROLLED', 'no'))
dev.set(('ONBOOT', 'no'))

- selected_netdevs = []
for devname in selected:
if not netdevs.has_key(devname):
continue

netdev = netdevs[devname]
- selected_netdevs.append(netdev)
netdev.set(("ONBOOT", "yes"))

if self.dhcpCheckbox.selected():
@@ -276,7 +274,7 @@ class NetworkConfiguratorText:
continue

w = self.anaconda.intf.waitWindow(_("Configuring Network Interfaces"), _("Waiting for NetworkManager"))
- result = self.anaconda.network.bringUp(devices=selected_net devs)
+ result = self.anaconda.network.bringUp()
w.pop()
if result:
break



- --
David Cantrell <dcantrell@redhat.com>

Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvfkUkACgkQ5hsjjIy1VkkUBQCfeb0dtiG4DE oZPuConuRDK6fY
pvAAoJjlI7ghqumzpiO/3yNxPaEh9rXp
=W5b7
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:09 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org