[VOL-4595] Show onuimage status of all ONUs if no deviceId is provided
Change-Id: Ia3d158162a658dc710194043c7cc58eaa1927ec3
diff --git a/VERSION b/VERSION
index 10c0880..6a126f4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.7.4
+1.7.5
diff --git a/internal/pkg/commands/devices.go b/internal/pkg/commands/devices.go
index 4360a83..448b900 100644
--- a/internal/pkg/commands/devices.go
+++ b/internal/pkg/commands/devices.go
@@ -355,7 +355,7 @@
ListOutputOptions
Args struct {
ImageVersion string `positional-arg-name:"IMAGE_VERSION" required:"yes"`
- IDs []DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"`
+ IDs []DeviceId `positional-arg-name:"DEVICE_ID"`
} `positional-args:"yes"`
}
@@ -1805,9 +1805,15 @@
defer cancel()
var devIDList []*common.ID
- for _, i := range options.Args.IDs {
- devIDList = append(devIDList, &common.ID{Id: string(i)})
+ if options.Args.IDs == nil {
+ //Use an empty IDs list to retrieve the status of all devices
+ //with the requested image version
+ devIDList = []*common.ID{}
+ } else {
+ for _, i := range options.Args.IDs {
+ devIDList = append(devIDList, &common.ID{Id: string(i)})
+ }
}
imageStatusReq := voltha.DeviceImageRequest{