tags:
find . '(' -name '*.py' -o -name 'qemu-*' ')' | grep -v '.svn/' | xargs etags
+.PHONY: tags
-LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' --exclude 'arg*'
+####################
+
+########## make sync PLCHOST=hostname VSERVER=vservername
+ifdef PLCHOST
+ifdef BUILDNAME
+PLCSSH:=root@$(PLCHOST):$(BUILDNAME)
+endif
+endif
+
+LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' --exclude 'arg*'
RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
sync:
-ifeq (,$(RSYNC_URL))
- echo "sync: You must define target host as RSYNC_URL on the command line"
- echo " e.g. make sync RSYNC_URL=root@testbox1:workdir" ; exit 1
+ifeq (,$(PLCSSH))
+ echo "sync: You must define PLCHOST and BUILDNAME on the command line"
+ echo " e.g. make sync PLCHOST=private.one-lab.org BUILDNAME=" ; exit 1
else
- +$(RSYNC) ./ $(RSYNC_URL)/
+ +$(RSYNC) ./ $(PLCSSH)
endif
'check_initscripts', 'check_tcp',SEP,
'force_gather_logs', 'force_kill_qemus', 'force_record_tracker','force_free_tracker' ]
other_steps = [ 'stop_all_vservers','fresh_install', 'cache_rpm', 'stop', 'vs_start', SEP,
- 'clean_initscripts', 'clean_sites', 'clean_nodes',
+ 'clean_initscripts', 'clean_all_sites',
+ 'clean_sites', 'clean_nodes',
'clean_slices', 'clean_keys', SEP,
'show_boxes', 'list_all_qemus', 'list_qemus', SEP,
'db_dump' , 'db_restore', ' cleanup_tracker',
test_site.create_users()
return True
+ def clean_all_sites (self):
+ print 'auth_root',self.auth_root()
+ site_ids = [s['site_id'] for s in self.apiserver.GetSites(self.auth_root(), {}, ['site_id'])]
+ for site_id in site_ids:
+ print 'Deleting site_id',site_id
+ self.apiserver.DeleteSite(self.auth_root(),site_id)
+
def nodes (self):
return self.do_nodes()
def clean_nodes (self):