1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-02 03:12:34 +01:00

resource: remote resource resolution fixes

- "remote" getter priority reduced to be below "environment" so that
  resouces placed into "~/.workload_automation/dependencies" by the user
  take priority over those pulled from remote locations.
- "filer" getter now uses a cache location for the resource rather than
  downloading to the local resource location.
This commit is contained in:
Sergei Trofimov
2017-02-21 16:35:16 +00:00
parent 96c6f010f8
commit 6e7087ee88
2 changed files with 3 additions and 2 deletions

View File

@@ -227,7 +227,8 @@ class DependencyFileGetter(ResourceGetter):
def get(self, resource, **kwargs):
force = kwargs.get('force')
remote_path = os.path.join(self.mount_point, self.relative_path, resource.path)
local_path = os.path.join(resource.owner.dependencies_directory, os.path.basename(resource.path))
local_path = _f(os.path.join(settings.dependencies_directory, '__remote',
resource.owner.name, os.path.basename(resource.path)))
if not os.path.exists(local_path) or force:
if not os.path.exists(remote_path):