示例#1
0
    def _get_store(store, secret_key):
        if not store or not secret_key:
            return StoreManager()
        try:
            store_access = config.get_dict(secret_key)
        except RheaError:
            raise VolumeNotFoundError(
                'Could not create store for path,'
                'received a store type `{}` without valid access key.'.format(store))

        return StoreManager.get_for_type(store_type=store, store_access=store_access)
示例#2
0
文件: run.py 项目: klonggan/polyaxon
 def set_outputs_store(self,
                       outputs_store=None,
                       outputs_path=None,
                       set_env_vars=False):
     if not any([outputs_store, outputs_path]):
         raise PolyaxonClientException(
             "An Store instance or and outputs path is required.")
     self.outputs_store = outputs_store or StoreManager(path=outputs_path)
     if self.outputs_store and set_env_vars:
         self.outputs_store.set_env_vars()