mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-04 12:22:41 +01:00
New target description + moving target stuff under "framework"
Changing the way target descriptions work from a static mapping to something that is dynamically generated and is extensible via plugins. Also moving core target implementation stuff under "framework".
This commit is contained in:
20
wa/framework/target/config.py
Normal file
20
wa/framework/target/config.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from copy import copy
|
||||
|
||||
#Not going to be used for now.
|
||||
|
||||
class TargetConfig(dict):
|
||||
"""
|
||||
Represents a configuration for a target.
|
||||
|
||||
"""
|
||||
def __init__(self, config=None):
|
||||
if isinstance(config, TargetConfig):
|
||||
self.__dict__ = copy(config.__dict__)
|
||||
elif hasattr(config, 'iteritems'):
|
||||
for k, v in config.iteritems:
|
||||
self.set(k, v)
|
||||
elif config:
|
||||
raise ValueError(config)
|
||||
|
||||
def set(self, name, value):
|
||||
setattr(self, name, value)
|
Reference in New Issue
Block a user