[bitbake-devel] [PATCH 21/27] toaster: models Allow the machine's layer name to be searched

Alex DAMIAN alexandru.damian at intel.com
Mon Feb 9 18:01:51 UTC 2015


From: Michael Wood <michael.g.wood at intel.com>

Make the layer name searchable. If you know the name of the layer you are
interested in, searching for it is a fast way of getting the list of
machines provided by it.

Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
 lib/toaster/orm/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index ad7a856..4bb84bd 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -529,7 +529,7 @@ class Recipe_Dependency(models.Model):
 
 
 class Machine(models.Model):
-    search_allowed_fields = ["name", "description"]
+    search_allowed_fields = ["name", "description", "layer_version__layer__name"]
     layer_source = models.ForeignKey('LayerSource', default = None, null = True)  # from where did we get this machine
     up_id = models.IntegerField(null = True, default = None)                      # id of entry in the source
     up_date = models.DateTimeField(null = True, default = None)
-- 
1.9.1




More information about the bitbake-devel mailing list