plnet expects key 'interfaces' and does no longer support the old 'networks' form
authorparmentelat <thierry.parmentelat@inria.fr>
Thu, 20 Dec 2018 12:56:11 +0000 (13:56 +0100)
committerparmentelat <thierry.parmentelat@inria.fr>
Thu, 20 Dec 2018 12:56:11 +0000 (13:56 +0100)
source/steps/WriteNetworkConfig.py

index e7d624a..ac4431c 100644 (file)
@@ -68,7 +68,7 @@ def Run(vars, log):
     SYSIMG_PATH             the path where the system image will be mounted
                                 (always starts with TEMP_PATH)
     INTERFACES              All the interfaces associated with this node
-    INTERFACE_SETTINGS      dictionary 
+    INTERFACE_SETTINGS      dictionary
     Sets the following variables:
     None
     """
@@ -111,7 +111,7 @@ def Run(vars, log):
     log.write("Writing /etc/planetlab/plc_config\n")
     utils.makedirs("{}/etc/planetlab".format(SYSIMG_PATH))
     with open("{}/etc/planetlab/plc_config".format(SYSIMG_PATH), "w") as plc_config:
-    
+
         api_url = vars['BOOT_API_SERVER']
         (scheme, netloc, path, params, query, fragment) = urlparse.urlparse(api_url)
         parts = netloc.split(':')
@@ -143,9 +143,10 @@ def Run(vars, log):
         hosts_file.write("127.0.0.1       localhost\n")
         if method == "static":
             hosts_file.write("{} {}.{}\n".format(ip, hostname, domainname))
-    
-    data =  {'hostname': '{}.{}'.format(hostname, domainname),
-             'networks': vars['INTERFACES']}
-    plnet.InitInterfaces(logger(log), BootAPIWrap(vars), data, SYSIMG_PATH,
-                         True, "BootManager")
 
+    data =  {'hostname': '{}.{}'.format(hostname, domainname),
+             'interfaces': vars['INTERFACES']}
+    plnet.InitInterfaces(
+        logger(log), BootAPIWrap(vars),
+        data, SYSIMG_PATH,
+        files_only=True, program="BootManager")