Code changes for VOL-3928 Voltctl support to list flow groups

Change-Id: I4e374a0c837511f41bed25937f70c5781133debf
diff --git a/internal/pkg/commands/devices.go b/internal/pkg/commands/devices.go
index 10ebad8..073cd66 100644
--- a/internal/pkg/commands/devices.go
+++ b/internal/pkg/commands/devices.go
@@ -132,6 +132,13 @@
 	} `positional-args:"yes"`
 }
 
+type DeviceFlowGroupList struct {
+	ListOutputOptions
+	GroupListOptions
+	Args struct {
+		Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"`
+	} `positional-args:"yes"`
+}
 type DevicePortList struct {
 	ListOutputOptions
 	Args struct {
@@ -367,12 +374,13 @@
 }
 
 type DeviceOpts struct {
-	List    DeviceList     `command:"list"`
-	Create  DeviceCreate   `command:"create"`
-	Delete  DeviceDelete   `command:"delete"`
-	Enable  DeviceEnable   `command:"enable"`
-	Disable DeviceDisable  `command:"disable"`
-	Flows   DeviceFlowList `command:"flows"`
+	List    DeviceList          `command:"list"`
+	Create  DeviceCreate        `command:"create"`
+	Delete  DeviceDelete        `command:"delete"`
+	Enable  DeviceEnable        `command:"enable"`
+	Disable DeviceDisable       `command:"disable"`
+	Flows   DeviceFlowList      `command:"flows"`
+	Groups  DeviceFlowGroupList `command:"groups"`
 	Port    struct {
 		List    DevicePortList    `command:"list"`
 		Enable  DevicePortEnable  `command:"enable"`
@@ -890,6 +898,15 @@
 	return fl.Execute(args)
 }
 
+func (options *DeviceFlowGroupList) Execute(args []string) error {
+	grp := &GroupList{}
+	grp.ListOutputOptions = options.ListOutputOptions
+	grp.GroupListOptions = options.GroupListOptions
+	grp.Args.Id = string(options.Args.Id)
+	grp.Method = "device-groups"
+	return grp.Execute(args)
+}
+
 func (options *DeviceInspect) Execute(args []string) error {
 	if len(args) > 0 {
 		return fmt.Errorf("only a single argument 'DEVICE_ID' can be provided")