From: Thierry Parmentelat Date: Mon, 26 May 2008 14:13:19 +0000 (+0000) Subject: moving towards 5.0 X-Git-Tag: BootManager-4.3-1~12 X-Git-Url: http://git.onelab.eu/?p=bootmanager.git;a=commitdiff_plain;h=d027bde0cf139ab8e480f0b80cfc9b67214f342d moving towards 5.0 --- diff --git a/Makefile b/Makefile index 9b10e44..a454de0 100644 --- 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 ########## diff --git a/source/steps/GetAndUpdateNodeDetails.py b/source/steps/GetAndUpdateNodeDetails.py index 3de633e..8e48c39 100644 --- a/source/steps/GetAndUpdateNodeDetails.py +++ b/source/steps/GetAndUpdateNodeDetails.py @@ -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: diff --git a/source/steps/WriteNetworkConfig.py b/source/steps/WriteNetworkConfig.py index a58cc87..b097b13 100644 --- a/source/steps/WriteNetworkConfig.py +++ b/source/steps/WriteNetworkConfig.py @@ -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":