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

Change-Id: I4e374a0c837511f41bed25937f70c5781133debf
diff --git a/internal/pkg/commands/logicaldevices.go b/internal/pkg/commands/logicaldevices.go
index 9191385..2f2a1bc 100644
--- a/internal/pkg/commands/logicaldevices.go
+++ b/internal/pkg/commands/logicaldevices.go
@@ -49,6 +49,14 @@
 	} `positional-args:"yes"`
 }
 
+type LogicalDeviceFlowGroupList struct {
+	ListOutputOptions
+	GroupListOptions
+	Args struct {
+		Id DeviceId `positional-arg-name:"DEVICE_ID" required:"yes"`
+	} `positional-args:"yes"`
+}
+
 type LogicalDevicePortList struct {
 	ListOutputOptions
 	Args struct {
@@ -64,9 +72,10 @@
 }
 
 type LogicalDeviceOpts struct {
-	List  LogicalDeviceList     `command:"list"`
-	Flows LogicalDeviceFlowList `command:"flows"`
-	Port  struct {
+	List   LogicalDeviceList          `command:"list"`
+	Flows  LogicalDeviceFlowList      `command:"flows"`
+	Groups LogicalDeviceFlowGroupList `command:"groups"`
+	Port   struct {
 		List LogicalDevicePortList `command:"list"`
 	} `command:"port"`
 	Inspect LogicalDeviceInspect `command:"inspect"`
@@ -219,6 +228,16 @@
 	return fl.Execute(args)
 }
 
+func (options *LogicalDeviceFlowGroupList) Execute(args []string) error {
+	grp := &GroupList{}
+	grp.ListOutputOptions = options.ListOutputOptions
+	grp.GroupListOptions = options.GroupListOptions
+	grp.Args.Id = string(options.Args.Id)
+	grp.Method = "logical-device-groups"
+	return grp.Execute(args)
+
+}
+
 func (options *LogicalDeviceInspect) Execute(args []string) error {
 	if len(args) > 0 {
 		return fmt.Errorf("only a single argument 'DEVICE_ID' can be provided")