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 > Redhat > Fedora Desktop

 
 
LinkBack Thread Tools
 
Old 05-07-2010, 12:49 PM
Radek Vykydal
 
Default Network: remove functions that are not used anymore.

---
network.py | 47 -----------------------------------------------
1 files changed, 0 insertions(+), 47 deletions(-)

diff --git a/network.py b/network.py
index fcd8f1c..f50a2bb 100644
--- a/network.py
+++ b/network.py
@@ -130,53 +130,6 @@ def getDefaultHostname(anaconda):

return hn

-# return if the device is of a type that requires a ptpaddr to be specified
-def isPtpDev(devname):
- if devname.startswith("ctc"):
- return True
- return False
-
-def _anyUsing(method):
- # method names that NetworkManager might use
- if method == 'auto':
- methods = (method, 'dhcp')
- else:
- methods = (method)
-
- try:
- bus = dbus.SystemBus()
- nm = bus.get_object(isys.NM_SERVICE, isys.NM_MANAGER_PATH)
- nm_props_iface = dbus.Interface(nm, isys.DBUS_PROPS_IFACE)
- active_connections = nm_props_iface.Get(isys.NM_MANAGER_IFACE, "ActiveConnections")
-
- for path in active_connections:
- active = bus.get_object(isys.NM_SERVICE, path)
- active_props_iface = dbus.Interface(active, isys.DBUS_PROPS_IFACE)
-
- active_service_name = active_props_iface.Get(isys.NM_ACTIVE_CONNECTION_I FACE, "ServiceName")
- active_path = active_props_iface.Get(isys.NM_ACTIVE_CONNECTION_I FACE, "Connection")
-
- connection = bus.get_object(active_service_name, active_path)
- connection_iface = dbus.Interface(connection, isys.NM_CONNECTION_IFACE)
- settings = connection_iface.GetSettings()
-
- # XXX: add support for Ip6Config when it appears
- ip4_setting = settings['ipv4']
- if not ip4_setting or not ip4_setting['method'] or ip4_setting['method'] in methods:
- return True
-
- return False
- except:
- return False
-
-# determine whether any active at boot devices are using dhcp or dhcpv6
-def anyUsingDHCP():
- return _anyUsing('auto')
-
-# determine whether any active at boot devices are using static IP config
-def anyUsingStatic():
- return _anyUsing('manual')
-
# sanity check an IP string.
def sanityCheckIPString(ip_string):
if ip_string.strip() == "":
--
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-12-2010, 03:03 PM
Radek Vykydal
 
Default Network: remove functions that are not used anymore.

---
network.py | 47 -----------------------------------------------
1 files changed, 0 insertions(+), 47 deletions(-)

diff --git a/network.py b/network.py
index e2308e8..b8591cb 100644
--- a/network.py
+++ b/network.py
@@ -130,53 +130,6 @@ def getDefaultHostname(anaconda):

return hn

-# return if the device is of a type that requires a ptpaddr to be specified
-def isPtpDev(devname):
- if devname.startswith("ctc"):
- return True
- return False
-
-def _anyUsing(method):
- # method names that NetworkManager might use
- if method == 'auto':
- methods = (method, 'dhcp')
- else:
- methods = (method)
-
- try:
- bus = dbus.SystemBus()
- nm = bus.get_object(isys.NM_SERVICE, isys.NM_MANAGER_PATH)
- nm_props_iface = dbus.Interface(nm, isys.DBUS_PROPS_IFACE)
- active_connections = nm_props_iface.Get(isys.NM_MANAGER_IFACE, "ActiveConnections")
-
- for path in active_connections:
- active = bus.get_object(isys.NM_SERVICE, path)
- active_props_iface = dbus.Interface(active, isys.DBUS_PROPS_IFACE)
-
- active_service_name = active_props_iface.Get(isys.NM_ACTIVE_CONNECTION_I FACE, "ServiceName")
- active_path = active_props_iface.Get(isys.NM_ACTIVE_CONNECTION_I FACE, "Connection")
-
- connection = bus.get_object(active_service_name, active_path)
- connection_iface = dbus.Interface(connection, isys.NM_CONNECTION_IFACE)
- settings = connection_iface.GetSettings()
-
- # XXX: add support for Ip6Config when it appears
- ip4_setting = settings['ipv4']
- if not ip4_setting or not ip4_setting['method'] or ip4_setting['method'] in methods:
- return True
-
- return False
- except:
- return False
-
-# determine whether any active at boot devices are using dhcp or dhcpv6
-def anyUsingDHCP():
- return _anyUsing('auto')
-
-# determine whether any active at boot devices are using static IP config
-def anyUsingStatic():
- return _anyUsing('manual')
-
# sanity check an IP string.
def sanityCheckIPString(ip_string):
if ip_string.strip() == "":
--
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-12-2010, 03:14 PM
David Cantrell
 
Default Network: remove functions that are not used anymore.

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

Ack.

On Wed, 12 May 2010, Radek Vykydal wrote:


---
network.py | 47 -----------------------------------------------
1 files changed, 0 insertions(+), 47 deletions(-)

diff --git a/network.py b/network.py
index e2308e8..b8591cb 100644
--- a/network.py
+++ b/network.py
@@ -130,53 +130,6 @@ def getDefaultHostname(anaconda):

return hn

-# return if the device is of a type that requires a ptpaddr to be specified
-def isPtpDev(devname):
- if devname.startswith("ctc"):
- return True
- return False
-
-def _anyUsing(method):
- # method names that NetworkManager might use
- if method == 'auto':
- methods = (method, 'dhcp')
- else:
- methods = (method)
-
- try:
- bus = dbus.SystemBus()
- nm = bus.get_object(isys.NM_SERVICE, isys.NM_MANAGER_PATH)
- nm_props_iface = dbus.Interface(nm, isys.DBUS_PROPS_IFACE)
- active_connections = nm_props_iface.Get(isys.NM_MANAGER_IFACE, "ActiveConnections")
-
- for path in active_connections:
- active = bus.get_object(isys.NM_SERVICE, path)
- active_props_iface = dbus.Interface(active, isys.DBUS_PROPS_IFACE)
-
- active_service_name = active_props_iface.Get(isys.NM_ACTIVE_CONNECTION_I FACE, "ServiceName")
- active_path = active_props_iface.Get(isys.NM_ACTIVE_CONNECTION_I FACE, "Connection")
-
- connection = bus.get_object(active_service_name, active_path)
- connection_iface = dbus.Interface(connection, isys.NM_CONNECTION_IFACE)
- settings = connection_iface.GetSettings()
-
- # XXX: add support for Ip6Config when it appears
- ip4_setting = settings['ipv4']
- if not ip4_setting or not ip4_setting['method'] or ip4_setting['method'] in methods:
- return True
-
- return False
- except:
- return False
-
-# determine whether any active at boot devices are using dhcp or dhcpv6
-def anyUsingDHCP():
- return _anyUsing('auto')
-
-# determine whether any active at boot devices are using static IP config
-def anyUsingStatic():
- return _anyUsing('manual')
-
# sanity check an IP string.
def sanityCheckIPString(ip_string):
if ip_string.strip() == "":



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

Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEARECAAYFAkvqxfQACgkQ5hsjjIy1Vkmr/gCgrAkdjp38JpTir5eq2OGWKH4e
TqUAnRCF9H5j+wEnda9InapXhu5xLtZE
=xNNR
-----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 02:41 AM.

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