Adding adapter type and replica to adapter list output
Change-Id: Ieed8f5cbc44d4891447a1a816981009390f951bd
diff --git a/internal/pkg/commands/adapter.go b/internal/pkg/commands/adapter.go
index 1a901bc..dcd9920 100644
--- a/internal/pkg/commands/adapter.go
+++ b/internal/pkg/commands/adapter.go
@@ -18,14 +18,14 @@
import (
"context"
"github.com/fullstorydev/grpcurl"
- flags "github.com/jessevdk/go-flags"
+ "github.com/jessevdk/go-flags"
"github.com/jhump/protoreflect/dynamic"
"github.com/opencord/voltctl/pkg/format"
"github.com/opencord/voltctl/pkg/model"
)
const (
- DEFAULT_OUTPUT_FORMAT = "table{{ .Id }}\t{{ .Vendor }}\t{{ .Version }}\t{{ .SinceLastCommunication }}"
+ DEFAULT_OUTPUT_FORMAT = "table{{ .Id }}\t{{ .Vendor }}\t{{ .Type }}\t{{ .Endpoint }}\t{{ .Version }}\t{{ .CurrentReplica }}\t{{ .TotalReplicas }}\t{{ .SinceLastCommunication }}"
)
type AdapterList struct {
@@ -73,6 +73,7 @@
if err != nil {
return err
}
+
items, err := d.TryGetFieldByName("items")
if err != nil {
return err