1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

Merge pull request #109 from ep1cman/locallinux

LocalLinuxManager: Added a local linux manager
This commit is contained in:
setrofim 2016-02-23 17:04:41 +00:00
commit a4a428c9ae
2 changed files with 37 additions and 8 deletions

View File

@ -53,14 +53,13 @@ sys.path.insert(0, os.path.join(_this_dir, '..', 'external'))
#pylint: disable=C0326
_EXTENSION_TYPE_TABLE = [
# name, class, default package, default path
('command', 'wlauto.core.command.Command', 'wlauto.commands', 'commands'),
('device_manager', 'wlauto.core.device.DeviceManager', 'wlauto.managers', 'devices'),
('instrument', 'wlauto.core.instrumentation.Instrument', 'wlauto.instrumentation', 'instruments'),
('module', 'wlauto.core.extension.Module', 'wlauto.modules', 'modules'),
('resource_getter', 'wlauto.core.resource.ResourceGetter', 'wlauto.resource_getters', 'resource_getters'),
('result_processor', 'wlauto.core.result.ResultProcessor', 'wlauto.result_processors', 'result_processors'),
('workload', 'wlauto.core.workload.Workload', 'wlauto.workloads', 'workloads'),
# name, class, default package, default path
('command', 'wlauto.core.command.Command', 'wlauto.commands', 'commands'),
('device_manager', 'wlauto.core.device_manager.DeviceManager', 'wlauto.managers', 'managers'),
('instrument', 'wlauto.core.instrumentation.Instrument', 'wlauto.instrumentation', 'instruments'),
('resource_getter', 'wlauto.core.resource.ResourceGetter', 'wlauto.resource_getters', 'resource_getters'),
('result_processor', 'wlauto.core.result.ResultProcessor', 'wlauto.result_processors', 'result_processors'),
('workload', 'wlauto.core.workload.Workload', 'wlauto.workloads', 'workloads'),
]
_Extension = namedtuple('_Extension', 'name, cls, default_package, default_path')
_extensions = [_Extension._make(ext) for ext in _EXTENSION_TYPE_TABLE] # pylint: disable=W0212

View File

@ -0,0 +1,30 @@
from wlauto.core.device_manager import DeviceManager
from wlauto import Parameter
from devlib.target import LocalLinuxTarget
class LocalLinuxManager(DeviceManager):
name = "local_linux"
target_type = LocalLinuxTarget
parameters = [
Parameter('password',
description='Password for the user.'),
]
def __init__(self, **kwargs):
super(LocalLinuxManager, self).__init__(**kwargs)
self.platform = self.platform_type(core_names=self.core_names, # pylint: disable=E1102
core_clusters=self.core_clusters,
modules=self.modules)
self.target = self.target_type(connection_settings=self._make_connection_settings())
def connect(self):
self.target.connect()
def _make_connection_settings(self):
connection_settings = {}
connection_settings['password'] = self.password
return connection_settings