mirror of
https://github.com/ARM-software/workload-automation.git
synced 2024-10-06 02:41:11 +01:00
Fixing assets discovery.
- Two different parameters may now have the same global alias as long as their types match - `extension_asset` resource getter now picks up the path to the mouted filer from ``remote_assets_path`` global setting.
This commit is contained in:
parent
73ddc205fc
commit
98b19328de
@ -80,8 +80,8 @@ class GlobalParameterAlias(object):
|
|||||||
other_param.kind != param.kind):
|
other_param.kind != param.kind):
|
||||||
message = 'Duplicate global alias {} declared in {} and {} extensions with different types'
|
message = 'Duplicate global alias {} declared in {} and {} extensions with different types'
|
||||||
raise LoaderError(message.format(self.name, ext.name, other_ext.name))
|
raise LoaderError(message.format(self.name, ext.name, other_ext.name))
|
||||||
if param.name != other_param.name:
|
if param.kind != other_param.kind:
|
||||||
message = 'Two params {} in {} and {} in {} both declare global alias {}'
|
message = 'Two params {} in {} and {} in {} both declare global alias {}, and are of different kinds'
|
||||||
raise LoaderError(message.format(param.name, ext.name,
|
raise LoaderError(message.format(param.name, ext.name,
|
||||||
other_param.name, other_ext.name, self.name))
|
other_param.name, other_ext.name, self.name))
|
||||||
|
|
||||||
|
@ -180,17 +180,15 @@ class DependencyFileGetter(ResourceGetter):
|
|||||||
resource_type = 'file'
|
resource_type = 'file'
|
||||||
relative_path = '' # May be overridden by subclasses.
|
relative_path = '' # May be overridden by subclasses.
|
||||||
|
|
||||||
default_mount_point = '/'
|
|
||||||
priority = GetterPriority.remote
|
priority = GetterPriority.remote
|
||||||
|
|
||||||
parameters = [
|
parameters = [
|
||||||
Parameter('mount_point', default='/', global_alias='filer_mount_point',
|
Parameter('mount_point', default='/', global_alias='remote_assets_path',
|
||||||
description='Local mount point for the remote filer.'),
|
description='Local mount point for the remote filer.'),
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, resolver, **kwargs):
|
def __init__(self, resolver, **kwargs):
|
||||||
super(DependencyFileGetter, self).__init__(resolver, **kwargs)
|
super(DependencyFileGetter, self).__init__(resolver, **kwargs)
|
||||||
self.mount_point = settings.filer_mount_point or self.default_mount_point
|
|
||||||
|
|
||||||
def get(self, resource, **kwargs):
|
def get(self, resource, **kwargs):
|
||||||
force = kwargs.get('force')
|
force = kwargs.get('force')
|
||||||
@ -260,7 +258,6 @@ class ExtensionAssetGetter(DependencyFileGetter):
|
|||||||
|
|
||||||
name = 'extension_asset'
|
name = 'extension_asset'
|
||||||
resource_type = 'extension_asset'
|
resource_type = 'extension_asset'
|
||||||
relative_path = 'workload_automation/assets'
|
|
||||||
|
|
||||||
|
|
||||||
class HttpGetter(ResourceGetter):
|
class HttpGetter(ResourceGetter):
|
||||||
|
Loading…
Reference in New Issue
Block a user