From: Thierry Parmentelat Date: Thu, 11 Dec 2008 18:30:30 +0000 (+0000) Subject: fix calls to AddSlices that took advantage of unchecked columns in previous version X-Git-Tag: MyPLC-4.3-2~12 X-Git-Url: http://git.onelab.eu/?p=myplc.git;a=commitdiff_plain;h=adaf52ecdc1fc8f7d4c97a670c8bb34a77075db5 fix calls to AddSlices that took advantage of unchecked columns in previous version fix sync target for centos5 --- diff --git a/Makefile b/Makefile index 2b7042a..752e747 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ INITS=$(addprefix plc.d/,$(INIT_SCRIPTS)) ########## make sync PLCHOST=hostname ifdef PLCHOST -ifdef VSERVER -PLCSSH:=root@$(PLCHOST):/vservers/$(VSERVER) +ifdef GUEST +PLCSSH:=root@$(PLCHOST):/vservers/$(GUEST) endif endif @@ -22,13 +22,13 @@ RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES) sync: ifeq (,$(PLCSSH)) - 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 + echo "sync: You must define PLCHOST and GUEST on the command line" + echo " e.g. make sync PLCHOST=private.one-lab.org GUEST=myplc01" ; exit 1 else +$(RSYNC) guest.init $(PLCSSH)/etc/init.d/plc +$(RSYNC) $(BINARIES) $(PLCSSH)/usr/bin +$(RSYNC) $(INITS) $(PLCSSH)/etc/plc.d - +$(RSYNC) plc_config.py $(PLCSSH)/usr/lib/python2.5/site-packages/plc_config.py + +$(RSYNC) plc_config.py $(PLCSSH)/usr/lib/python2.4/site-packages/plc_config.py +$(RSYNC) default_config.xml $(PLCSSH)/etc/planetlab/default_config.xml @echo XXXXXXXX You might consider running the following command @echo ssh $(PLCHOST) service plc start diff --git a/db-config b/db-config index ea65361..16c1366 100755 --- a/db-config +++ b/db-config @@ -98,6 +98,7 @@ def main(): ] #################### interface settings + # xxx this should move to PLC/Accessors # Setup default slice attribute types default_setting_types = [ @@ -138,6 +139,7 @@ def main(): ] #################### slice attributes + # xxx this should move to PLC/Accessors # Setup default slice attribute types default_attribute_types = [ @@ -679,6 +681,7 @@ def main(): ] for default_slice in default_slices: + attributes=default_slice.pop('attributes') slices = GetSlices([default_slice['name']]) if slices: slice = slices[0] @@ -693,12 +696,12 @@ def main(): # Delete unknown attributes for slice_tag in GetSliceTags(slice['slice_tag_ids']): if (slice_tag['tagname'], slice_tag['value']) \ - not in default_slice['attributes']: + not in attributes: DeleteSliceTag(slice_tag['slice_tag_id']) else: slice_tags.append((slice_tag['tagname'], slice_tag['value'])) - for (name, value) in default_slice['attributes']: + for (name, value) in attributes: if (name, value) not in slice_tags: AddSliceTag(slice['name'], name, value)