Rename device type capability in Boruta request 01/190501/2
authorPawel Wieczorek <p.wieczorek2@samsung.com>
Tue, 2 Oct 2018 13:08:09 +0000 (15:08 +0200)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Tue, 2 Oct 2018 14:03:07 +0000 (16:03 +0200)
In order to avoid confusion, unify capability naming convention and
comply with LAVA YAML job submission files [1], Dryads shall declare
"device_type" capability. It will be used in Dryad config files, Boruta
requests and Weles job descriptions.

[1] https://validation.linaro.org/static/docs/v2/dispatcher-format.html

Change-Id: Icac66490570569d4a7c02c9318130163a9e45950
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
controller/boruterimpl.go
controller/boruterimpl_test.go

index 152258e..5ce6b8b 100644 (file)
@@ -225,7 +225,7 @@ func (h *BoruterImpl) getCaps(config weles.Config) boruta.Capabilities {
        }
 
        return boruta.Capabilities{
-               "DeviceType": config.DeviceType,
+               "device_type": config.DeviceType,
        }
 }
 
index f2ea8e1..72b3a98 100644 (file)
@@ -98,7 +98,7 @@ var _ = Describe("BoruterImpl", func() {
                                JobTimeout: weles.ValidPeriod(jobTimeout),
                        },
                }
-               caps = boruta.Capabilities{"DeviceType": "TestDeviceType"}
+               caps = boruta.Capabilities{"device_type": "TestDeviceType"}
                priority = boruta.Priority(7)
        })
        AfterEach(func() {