From 4900e17d4747264c3dc8ddbbf966820d2df33e62 Mon Sep 17 00:00:00 2001 From: sanjujunnuthula Date: Tue, 21 Jul 2026 15:03:34 +0000 Subject: [PATCH 1/8] chore: updated device db column from role to deployment id Signed-off-by: sanjujunnuthula --- cli/cmd/margo.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/cmd/margo.go b/cli/cmd/margo.go index 3fe33360..e60d6389 100644 --- a/cli/cmd/margo.go +++ b/cli/cmd/margo.go @@ -558,7 +558,7 @@ func displayDevicesTable(resp nbi.DeviceListResp) { // Set headers t.AppendHeader(table.Row{ - "ID", "Signature", "Capabilities", "Roles", "State", "CreatedAt", + "ID", "Signature", "Capabilities", "Deployment Type", "State", "CreatedAt", }) // Add data rows @@ -570,10 +570,11 @@ func displayDevicesTable(resp nbi.DeviceListResp) { var roles interface{} roles = []string{} capMap, exists := device.Spec.Capabilities.(map[string]interface{}) + // fmt.Println(capMap, exists) if exists { properties, exists := capMap["properties"].(map[string]interface{}) if exists { - roles, exists = properties["roles"] + roles, exists = properties["supportedDeploymentTypes"] if !exists { roles = []string{} } From a4ef56da3dde07aa1ba1bf24ecbc0d0514325df7 Mon Sep 17 00:00:00 2001 From: sanjujunnuthula Date: Tue, 21 Jul 2026 18:37:38 +0000 Subject: [PATCH 2/8] chore: added print to debug capabilities Signed-off-by: sanjujunnuthula --- cli/cmd/margo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cmd/margo.go b/cli/cmd/margo.go index e60d6389..03be1e82 100644 --- a/cli/cmd/margo.go +++ b/cli/cmd/margo.go @@ -570,7 +570,7 @@ func displayDevicesTable(resp nbi.DeviceListResp) { var roles interface{} roles = []string{} capMap, exists := device.Spec.Capabilities.(map[string]interface{}) - // fmt.Println(capMap, exists) + fmt.Println(capMap, exists) if exists { properties, exists := capMap["properties"].(map[string]interface{}) if exists { From a0485499853608c75d082eeac1161c0f2851b734 Mon Sep 17 00:00:00 2001 From: sanjujunnuthula Date: Wed, 22 Jul 2026 04:03:49 +0000 Subject: [PATCH 3/8] chore: added print to debug capabilities Signed-off-by: sanjujunnuthula --- api/pkg/apis/v1alpha1/managers/margo/device.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/pkg/apis/v1alpha1/managers/margo/device.go b/api/pkg/apis/v1alpha1/managers/margo/device.go index d9f12aeb..bc712fc5 100644 --- a/api/pkg/apis/v1alpha1/managers/margo/device.go +++ b/api/pkg/apis/v1alpha1/managers/margo/device.go @@ -17,6 +17,7 @@ import ( "github.com/eclipse-symphony/symphony/coa/pkg/apis/v1alpha2/managers" "github.com/eclipse-symphony/symphony/coa/pkg/apis/v1alpha2/providers" "github.com/eclipse-symphony/symphony/coa/pkg/apis/v1alpha2/providers/states" + "github.com/kr/pretty" "github.com/eclipse-symphony/symphony/coa/pkg/logger" margoNonStdAPI "github.com/margo/sandbox/non-standard/generatedCode/wfm/nbi" "github.com/margo/sandbox/standard/generatedCode/wfm/sbi" @@ -437,6 +438,7 @@ func (dm *DeviceManager) ListDevices(ctx context.Context) (margoNonStdAPI.Device if err != nil { return devices, err } + fmt.Println(pretty.Sprint(rows)) for _, row := range rows { devices.Items = append(devices.Items, margoNonStdAPI.DeviceManifestResp{ From 331479f22db3c5277a5a08984422cf2262f7b708 Mon Sep 17 00:00:00 2001 From: sanjujunnuthula Date: Thu, 23 Jul 2026 18:05:52 +0000 Subject: [PATCH 4/8] chore: updated go packages Signed-off-by: sanjujunnuthula --- api/go.mod | 2 +- api/go.sum | 6 ++---- cli/go.mod | 2 +- cli/go.sum | 6 ++---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/api/go.mod b/api/go.mod index 946888ac..dce7709e 100644 --- a/api/go.mod +++ b/api/go.mod @@ -26,7 +26,7 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/itchyny/gojq v0.12.16 github.com/kr/pretty v0.3.1 - github.com/margo/sandbox v0.0.2-0.20260713102004-e833d1626525 + github.com/margo/sandbox v1.0.0-rc.2.0.20260717072648-226903403d67 github.com/princjef/mageutil v1.0.0 go.opentelemetry.io/otel/trace v1.44.0 golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 diff --git a/api/go.sum b/api/go.sum index f15e8709..9fe30653 100644 --- a/api/go.sum +++ b/api/go.sum @@ -294,10 +294,8 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhn github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg= github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= -github.com/margo/sandbox v0.0.2-0.20260629065027-6ceab8d33a5d h1:DXFdb1wuAd9pVcn3gALcBT6zrrrtzteyjVPfkyfFSus= -github.com/margo/sandbox v0.0.2-0.20260629065027-6ceab8d33a5d/go.mod h1:H2T/Otxoc7AyLqmRdzZQosbnl30j7tCM3JsTi5ULHf0= -github.com/margo/sandbox v0.0.2-0.20260713102004-e833d1626525 h1:qpAeGMpxRc69lkgQH9pP4loVF+G5QJgP5E2rVFMRxmQ= -github.com/margo/sandbox v0.0.2-0.20260713102004-e833d1626525/go.mod h1:H2T/Otxoc7AyLqmRdzZQosbnl30j7tCM3JsTi5ULHf0= +github.com/margo/sandbox v1.0.0-rc.2.0.20260717072648-226903403d67 h1:6iDtAEYq/ctgDx2GpaFN5KWCtMxXY2EySyPKGLs+7LQ= +github.com/margo/sandbox v1.0.0-rc.2.0.20260717072648-226903403d67/go.mod h1:H2T/Otxoc7AyLqmRdzZQosbnl30j7tCM3JsTi5ULHf0= github.com/matryer/is v1.3.0 h1:9qiso3jaJrOe6qBRJRBt2Ldht05qDiFP9le0JOIhRSI= github.com/matryer/is v1.3.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= diff --git a/cli/go.mod b/cli/go.mod index 78065cb8..41ac044e 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -54,7 +54,7 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/eclipse-symphony/symphony/api v0.0.0-00010101000000-000000000000 github.com/ghodss/yaml v1.0.0 - github.com/margo/sandbox v0.0.2-0.20260713102004-e833d1626525 + github.com/margo/sandbox v1.0.0-rc.2.0.20260717072648-226903403d67 github.com/princjef/mageutil v1.0.0 ) diff --git a/cli/go.sum b/cli/go.sum index 9fbe6587..6ba16e43 100644 --- a/cli/go.sum +++ b/cli/go.sum @@ -55,10 +55,8 @@ github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNB github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/lestrrat-go/sfv v1.0.0 h1:+/VOs7lhUWAwNIklow4kPYlit0fPBC6HsF+GHKXrhGM= github.com/lestrrat-go/sfv v1.0.0/go.mod h1:wawOORrbzB4Vh0QT7WtbWEbMuTbjS8OPxum1wZAYCiQ= -github.com/margo/sandbox v0.0.2-0.20260629065027-6ceab8d33a5d h1:DXFdb1wuAd9pVcn3gALcBT6zrrrtzteyjVPfkyfFSus= -github.com/margo/sandbox v0.0.2-0.20260629065027-6ceab8d33a5d/go.mod h1:H2T/Otxoc7AyLqmRdzZQosbnl30j7tCM3JsTi5ULHf0= -github.com/margo/sandbox v0.0.2-0.20260713102004-e833d1626525 h1:qpAeGMpxRc69lkgQH9pP4loVF+G5QJgP5E2rVFMRxmQ= -github.com/margo/sandbox v0.0.2-0.20260713102004-e833d1626525/go.mod h1:H2T/Otxoc7AyLqmRdzZQosbnl30j7tCM3JsTi5ULHf0= +github.com/margo/sandbox v1.0.0-rc.2.0.20260717072648-226903403d67 h1:6iDtAEYq/ctgDx2GpaFN5KWCtMxXY2EySyPKGLs+7LQ= +github.com/margo/sandbox v1.0.0-rc.2.0.20260717072648-226903403d67/go.mod h1:H2T/Otxoc7AyLqmRdzZQosbnl30j7tCM3JsTi5ULHf0= github.com/matryer/is v1.3.0 h1:9qiso3jaJrOe6qBRJRBt2Ldht05qDiFP9le0JOIhRSI= github.com/matryer/is v1.3.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= From 336b76ec34be1c9c09f861ca3fb57a039ea92783 Mon Sep 17 00:00:00 2001 From: sanjujunnuthula Date: Fri, 24 Jul 2026 05:25:37 +0000 Subject: [PATCH 5/8] chore: updated go packages Signed-off-by: sanjujunnuthula --- api/go.mod | 2 +- api/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/go.mod b/api/go.mod index dce7709e..96a3452c 100644 --- a/api/go.mod +++ b/api/go.mod @@ -26,7 +26,7 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/itchyny/gojq v0.12.16 github.com/kr/pretty v0.3.1 - github.com/margo/sandbox v1.0.0-rc.2.0.20260717072648-226903403d67 + github.com/margo/sandbox v1.0.0-rc.2.0.20260722140011-66d5b626db1d github.com/princjef/mageutil v1.0.0 go.opentelemetry.io/otel/trace v1.44.0 golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 diff --git a/api/go.sum b/api/go.sum index 9fe30653..c6e73471 100644 --- a/api/go.sum +++ b/api/go.sum @@ -296,6 +296,8 @@ github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg= github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/margo/sandbox v1.0.0-rc.2.0.20260717072648-226903403d67 h1:6iDtAEYq/ctgDx2GpaFN5KWCtMxXY2EySyPKGLs+7LQ= github.com/margo/sandbox v1.0.0-rc.2.0.20260717072648-226903403d67/go.mod h1:H2T/Otxoc7AyLqmRdzZQosbnl30j7tCM3JsTi5ULHf0= +github.com/margo/sandbox v1.0.0-rc.2.0.20260722140011-66d5b626db1d h1:Sg218JELyvRaQIrv43M6ePc97Aupb14kX8f2wPmArKI= +github.com/margo/sandbox v1.0.0-rc.2.0.20260722140011-66d5b626db1d/go.mod h1:H2T/Otxoc7AyLqmRdzZQosbnl30j7tCM3JsTi5ULHf0= github.com/matryer/is v1.3.0 h1:9qiso3jaJrOe6qBRJRBt2Ldht05qDiFP9le0JOIhRSI= github.com/matryer/is v1.3.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= From 17c58c5f9f1721a543554b40825215f2a24cd3a0 Mon Sep 17 00:00:00 2001 From: sanjujunnuthula Date: Tue, 28 Jul 2026 06:34:36 +0000 Subject: [PATCH 6/8] chore: removed debugger prints Signed-off-by: sanjujunnuthula --- api/pkg/apis/v1alpha1/managers/margo/device.go | 1 - cli/cmd/margo.go | 1 - 2 files changed, 2 deletions(-) diff --git a/api/pkg/apis/v1alpha1/managers/margo/device.go b/api/pkg/apis/v1alpha1/managers/margo/device.go index bc712fc5..68f858a9 100644 --- a/api/pkg/apis/v1alpha1/managers/margo/device.go +++ b/api/pkg/apis/v1alpha1/managers/margo/device.go @@ -438,7 +438,6 @@ func (dm *DeviceManager) ListDevices(ctx context.Context) (margoNonStdAPI.Device if err != nil { return devices, err } - fmt.Println(pretty.Sprint(rows)) for _, row := range rows { devices.Items = append(devices.Items, margoNonStdAPI.DeviceManifestResp{ diff --git a/cli/cmd/margo.go b/cli/cmd/margo.go index 03be1e82..dd972896 100644 --- a/cli/cmd/margo.go +++ b/cli/cmd/margo.go @@ -570,7 +570,6 @@ func displayDevicesTable(resp nbi.DeviceListResp) { var roles interface{} roles = []string{} capMap, exists := device.Spec.Capabilities.(map[string]interface{}) - fmt.Println(capMap, exists) if exists { properties, exists := capMap["properties"].(map[string]interface{}) if exists { From edef5344be62aeaf939f99989b87d8ef1b5b78dc Mon Sep 17 00:00:00 2001 From: sanjujunnuthula Date: Tue, 28 Jul 2026 08:38:21 +0000 Subject: [PATCH 7/8] chore: updated device deployment type to string Signed-off-by: sanjujunnuthula --- cli/cmd/margo.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cli/cmd/margo.go b/cli/cmd/margo.go index dd972896..1fda1959 100644 --- a/cli/cmd/margo.go +++ b/cli/cmd/margo.go @@ -12,6 +12,7 @@ import ( nbi "github.com/margo/sandbox/non-standard/generatedCode/wfm/nbi" margoCli "github.com/margo/sandbox/poc/wfm/cli" "github.com/spf13/cobra" + "strings" ) var ( @@ -567,25 +568,27 @@ func displayDevicesTable(resp nbi.DeviceListResp) { continue } - var roles interface{} - roles = []string{} + var deploymentTypes interface{} + deploymentTypes = []string{} capMap, exists := device.Spec.Capabilities.(map[string]interface{}) if exists { properties, exists := capMap["properties"].(map[string]interface{}) if exists { - roles, exists = properties["supportedDeploymentTypes"] + deploymentTypes, exists = properties["supportedDeploymentTypes"] if !exists { - roles = []string{} + deploymentTypes = []string{} } } } + deploymentTypeStr := strings.Trim(fmt.Sprint(deploymentTypes), "[]") + cap, _ := json.Marshal(device.Spec.Capabilities) row := table.Row{ truncateString(*device.Id, 40), truncateString(device.Spec.Signature, 28), truncateString(string(cap), 28), - roles, + deploymentTypeStr, string(device.State.Onboard), formatTime(*device.Metadata.CreationTimestamp), } @@ -604,7 +607,7 @@ func displayDevicesTable(resp nbi.DeviceListResp) { {Number: 1, WidthMax: 40}, // ID {Number: 2, WidthMax: 28}, // Signature {Number: 3, WidthMax: 28}, // Capabilities - {Number: 4, WidthMax: 28}, // Device Role + {Number: 4, WidthMax: 28}, // Deployment Type {Number: 5, WidthMax: 12}, // State {Number: 6, WidthMax: 16}, // CreatedAt }) From 353c7f8d337b76f725b7ad416b92fa97448f55f8 Mon Sep 17 00:00:00 2001 From: sanjujunnuthula Date: Tue, 28 Jul 2026 09:08:02 +0000 Subject: [PATCH 8/8] chore : removed un used imports Signed-off-by: sanjujunnuthula --- api/pkg/apis/v1alpha1/managers/margo/device.go | 1 - 1 file changed, 1 deletion(-) diff --git a/api/pkg/apis/v1alpha1/managers/margo/device.go b/api/pkg/apis/v1alpha1/managers/margo/device.go index 68f858a9..d9f12aeb 100644 --- a/api/pkg/apis/v1alpha1/managers/margo/device.go +++ b/api/pkg/apis/v1alpha1/managers/margo/device.go @@ -17,7 +17,6 @@ import ( "github.com/eclipse-symphony/symphony/coa/pkg/apis/v1alpha2/managers" "github.com/eclipse-symphony/symphony/coa/pkg/apis/v1alpha2/providers" "github.com/eclipse-symphony/symphony/coa/pkg/apis/v1alpha2/providers/states" - "github.com/kr/pretty" "github.com/eclipse-symphony/symphony/coa/pkg/logger" margoNonStdAPI "github.com/margo/sandbox/non-standard/generatedCode/wfm/nbi" "github.com/margo/sandbox/standard/generatedCode/wfm/sbi"