def __init__(self, pilot_store_service=None, pilot_store_description=None, ps_url=None): """ Initialize PilotStore at given service url: ssh://<hostname> gsissh://<hostname> Currently only ssh schemes are supported. In the future all SAGA URL schemes/adaptors should be supported. """ self.id = None self.url = None self.pilot_store_description = None self.service_url=None self.size = None self.pilot_store_description = None self.pilot_data={} if ps_url==None and pilot_store_service!=None: # new ps self.id = self.PS_ID_PREFIX+str(uuid.uuid1()) self.pilot_store_description = pilot_store_description self.url = CoordinationAdaptor.add_ps(CoordinationAdaptor.get_base_url(bigdata.application_id)+"/"+pilot_store_service.id, self) elif ps_url != None: logger.warn("Reconnect to PilotStore: %s"%ps_url) dictionary = CoordinationAdaptor.get_ps(ps_url) ps_dict = dictionary["pilot_store"] for i in ps_dict: self.__setattr__(i, ps_dict[i]) self.initialize_pilot_store()