moving towards 5.0
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 26 May 2008 14:13:19 +0000 (14:13 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 26 May 2008 14:13:19 +0000 (14:13 +0000)
Makefile
source/steps/GetAndUpdateNodeDetails.py
source/steps/WriteNetworkConfig.py

index 9b10e44..a454de0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,12 @@
 # $Id: Makefile 682 2007-07-19 09:00:25Z thierry $
 #
 
+########## make sync PLCHOST=hostname
 ########## make sync PLCHOST=hostname
 ifdef PLCHOST
-PLCSSH:=root@$(PLCHOST)
+ifdef VSERVER
+PLCSSH:=root@$(PLCHOST):/vservers/$(VSERVER)
+endif
 endif
 
 LOCAL_RSYNC_EXCLUDES   := --exclude '*.pyc' 
@@ -14,11 +17,11 @@ RSYNC                       := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
 
 sync:
 ifeq (,$(PLCSSH))
-       echo "sync: You must define target host as PLCHOST on the command line"
-       echo " e.g. make sync PLCHOST=private.one-lab.org" ; exit 1
+       echo "sync: You must define PLCHOST and VSERVER on the command line"
+       echo " e.g. make sync PLCHOST=private.one-lab.org VSERVER=myplc01" ; exit 1
 else
-       +$(RSYNC) source $(PLCSSH):/plc/root/usr/share/bootmanager/
-       ssh $(PLCSSH) chroot /plc/root service plc start bootmanager
+       +$(RSYNC) source $(PLCSSH)/usr/share/bootmanager/
+       ssh root@$(PLCHOST) vserver $(VSERVER) exec service plc start bootmanager
 endif
 
 ##########
index 3de633e..8e48c39 100644 (file)
@@ -73,7 +73,7 @@ def Run( vars, log ):
     except ValueError, var:
         raise BootManagerException, "Variable in vars, shouldn't be: %s\n" % var
 
-    details= BootAPI.call_api_function( vars, "GetNodes", (vars['NODE_ID'], ['boot_state', 'nodegroup_ids', 'nodenetwork_ids', 'model', 'site_id']))[0]
+    details= BootAPI.call_api_function( vars, "GetNodes", (vars['NODE_ID'], ['boot_state', 'nodegroup_ids', 'interface_ids', 'model', 'site_id']))[0]
 
     vars['BOOT_STATE']= details['boot_state']
     vars['NODE_MODEL']= string.strip(details['model'])
@@ -94,7 +94,7 @@ def Run( vars, log ):
 
     # this contains all the node networks, for now, we are only concerned
     # in the primary network
-    node_networks= BootAPI.call_api_function( vars, "GetNodeNetworks", (details['nodenetwork_ids'],))
+    node_networks= BootAPI.call_api_function( vars, "GetInterfaces", (details['interface_ids'],))
     got_primary= 0
     for network in node_networks:
         if network['is_primary'] == 1:
index a58cc87..b097b13 100644 (file)
@@ -184,9 +184,9 @@ def Run( vars, log ):
 
             alias = ""
             ifname=None
-            if len(network['nodenetwork_setting_ids']) > 0:
-                settings = BootAPI.call_api_function(vars, "GetNodeNetworkSettings",
-                    ({'nodenetwork_setting_id': network['nodenetwork_setting_ids']},))
+            if len(network['interface_setting_ids']) > 0:
+                settings = BootAPI.call_api_function(vars, "GetInterfaceSettings",
+                    ({'interface_setting_id': network['interface_setting_ids']},))
                 for setting in settings:
                     # to explicitly set interface name
                     if   setting['name'].upper() == "IFNAME":