./sfa/importer/sfa-import-plc.py ./sfa/importer/sfa-nuke-plc.py ./sfa/server/sfa-start.py \
$(CLIENTS)
-sync:
+synccheck:
ifeq (,$(SSHURL))
- @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
+ @echo "*sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
@echo " e.g. make sync PLC=private.one-lab.org"
@echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
@exit 1
-else
+endif
+
+sync: synccheck
+$(RSYNC) --relative ./sfa/ $(SSHURL)/usr/lib\*/python2.\*/site-packages/
+$(RSYNC) ./tests/ $(SSHURL)/root/tests-sfa
+$(RSYNC) $(BINS) $(SSHURL)/usr/bin/
+$(RSYNC) ./config/default_config.xml $(SSHURL)/etc/sfa/
+$(RSYNC) ./sfa/storage/sfa.sql $(SSHURL)/usr/share/sfa/
$(SSHCOMMAND) exec service sfa restart
-endif
# 99% of the time this is enough
-fastsync:
+fastsync: synccheck
+$(RSYNC) --relative ./sfa/ $(SSHURL)/usr/lib\*/python2.\*/site-packages/
$(SSHCOMMAND) exec service sfa restart
-clientsync:
+clientsync: synccheck
+$(RSYNC) $(BINS) $(SSHURL)/usr/bin/
-ricasync:
+ricasync: synccheck
+$(RSYNC) --relative ./sfa/fd ./sfa/generic/fd.py ./sfa/rspecs/versions/federica.py $(SSHURL)/usr/lib\*/python2.\*/site-packages/
+ $(SSHCOMMAND) exec service sfa restart
-.PHONY: sync fastsync clientsync
+.PHONY: synccheck sync fastsync clientsync ricasync
##########
CLIENTLIBFILES= \
logger.debug("searching in version cache %s"%self.url())
cached_version = VersionCache().get(self.url())
if cached_version is not None:
- logger.info("Retrieved version info from cache")
+ logger.info("Retrieved version info from cache %s"%self.url())
return cached_version
### otherwise let's do the hard work
# dummy to meet Sfi's expectations for its 'options' field
try:
client=Sfi(options)
client.read_config()
- key_file = client.get_key_file()
- cert_file = client.get_cert_file(key_file)
+ client.bootstrap()
+ key_file = client.private_key
+ cert_file = client.my_gid
logger.debug("using key %s & cert %s"%(key_file,cert_file))
url=self.url()
logger.info('issuing GetVersion at %s'%url)
class Sfi:
- required_options=['verbose', 'debug', 'registry', 'sm', 'auth', 'user']
+ # dirty hack to make this class usable from the outside
+ required_options=['verbose', 'debug', 'registry', 'sm', 'auth', 'user', 'user_private_key']
@staticmethod
def default_sfi_dir ():