# $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'
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
##########
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'])
# 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:
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":