########## make sync PLCHOST=hostname
ifdef PLCHOST
-ifdef VSERVER
-PLCSSH:=root@$(PLCHOST):/vservers/$(VSERVER)
+ifdef GUEST
+PLCSSH:=root@$(PLCHOST):/vservers/$(GUEST)
endif
endif
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
]
#################### interface settings
+ # xxx this should move to PLC/Accessors
# Setup default slice attribute types
default_setting_types = [
]
#################### slice attributes
+ # xxx this should move to PLC/Accessors
# Setup default slice attribute types
default_attribute_types = [
]
for default_slice in default_slices:
+ attributes=default_slice.pop('attributes')
slices = GetSlices([default_slice['name']])
if slices:
slice = slices[0]
# 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)