aboutsummaryrefslogtreecommitdiff
path: root/lava/device/commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'lava/device/commands.py')
-rw-r--r--lava/device/commands.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lava/device/commands.py b/lava/device/commands.py
index a8ce66d..a3a790a 100644
--- a/lava/device/commands.py
+++ b/lava/device/commands.py
@@ -30,6 +30,7 @@ from lava.helper.command import (
from lava.helper.dispatcher import (
get_device_file,
get_devices_path,
+ get_devices,
)
from lava.tool.command import CommandGroup
from lava.tool.errors import CommandError
@@ -120,3 +121,12 @@ class config(BaseCommand):
edit_file(device_conf)
else:
raise CommandError("Cannot edit file '{0}'".format(real_file_name))
+
+
+class list(BaseCommand):
+ """Lists configured devices."""
+
+ def invoke(self):
+ device_list = map(lambda d: d.hostname, get_devices())
+ for device in sorted(device_list):
+ print device