From: Marco Yuen Date: Thu, 7 Jul 2011 22:01:09 +0000 (-0400) Subject: GENICLOUD-31 Fix a bug X-Git-Tag: pyplnet-4.3-10~5 X-Git-Url: http://git.onelab.eu/?p=pyplnet.git;a=commitdiff_plain;h=d72b8337256ef14a9cfc0c5b0b4893281ef697eb GENICLOUD-31 Fix a bug Pass the hostname into prepDetails. --- diff --git a/plnet.py b/plnet.py index ad83423..001bbee 100755 --- a/plnet.py +++ b/plnet.py @@ -77,7 +77,7 @@ def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa if orig_ifname: logger.verbose('net:InitInterfaces orig_ifname = %s' % orig_ifname) - details = prepDetails(interface) + details = prepDetails(interface, hostname) if 'interface_tag_ids' in interface: version = 4.3 @@ -389,7 +389,7 @@ def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa ## # Prepare the interface details. # -def prepDetails(interface): +def prepDetails(interface, hostname=''): details = {} details['ONBOOT'] = 'yes' details['USERCTL'] = 'no'