From 8ec8a9a92e73d555bc4ef81636e46321d0f989f7 Mon Sep 17 00:00:00 2001 From: Sivaanand Murugesan Date: Thu, 4 Jul 2024 08:15:08 +0530 Subject: [PATCH 1/5] sdk cut over to provider inital changes --- client/client.go | 19 ++++++++++++++++- client/cluster.go | 22 +++++++++++++++++++ client/node_actions.go | 48 +++++++++++++++++++++--------------------- go.mod | 2 ++ go.sum | 2 -- 5 files changed, 66 insertions(+), 27 deletions(-) diff --git a/client/client.go b/client/client.go index 467e9e28..7244d671 100644 --- a/client/client.go +++ b/client/client.go @@ -14,7 +14,6 @@ import ( ) type V1Client struct { - Client clientV1.ClientService ctx context.Context @@ -73,6 +72,12 @@ func WithHubbleURI(hubbleUri string) func(*V1Client) { } } +func SetProjectUID(projectUid string) func(*V1Client) { + return func(v *V1Client) { + v.projectUid = projectUid + } +} + func WithInsecureSkipVerify(insecureSkipVerify bool) func(*V1Client) { return func(v *V1Client) { v.insecureSkipVerify = insecureSkipVerify @@ -202,6 +207,11 @@ func (h *V1Client) baseTransport() *transport.Runtime { return httpTransport } +func (h *V1Client) SetProjectContextForResource() *V1Client { + h.ctx = ContextWithProject(h.ctx, h.projectUid) + return h +} + func (h *V1Client) httpClient() *http.Client { return &http.Client{ Transport: &http.Transport{ @@ -234,3 +244,10 @@ func (h *V1Client) ValidateTenantAdmin() error { } return nil } + +func ContextWithProject(c context.Context, projectUid string) context.Context { + return context.WithValue(c, transport.CUSTOM_HEADERS, transport.Values{ + HeaderMap: map[string]string{ + "ProjectUid": projectUid, + }}) +} diff --git a/client/cluster.go b/client/cluster.go index 531c8f72..005966dd 100644 --- a/client/cluster.go +++ b/client/cluster.go @@ -291,3 +291,25 @@ func (h *V1Client) DownloadLogs(uid string, logFetcherUid string) (io.Writer, er } return logfile, nil } + +func (h *V1Client) UpdatePauseAgentUpgradeSettingCluster(upgradeSetting *models.V1ClusterUpgradeSettingsEntity, clusterUID string, context string) error { + + //var params *V1Client.V1SpectroClustersUIDUpgradeSettingsParams + // params := clientV1.NewV1SpectroClustersUIDUpgradeSettingsParamsWithContext(h.Ctx) + //params := clientV1.NewV1ClusterUpgrad + ////switch context { + ////case "project": + //// params = clientV1.NewV1SpectroClustersUIDUpgradeSettingsParamsWithContext(h.Ctx) + ////case "tenant": + //// params = clientV1.NewV1SpectroClustersUIDUpgradeSettingsParams() + ////default: + //// return fmt.Errorf("invalid context: %s", context) + ////} + //params = params.WithUID(clusterUID).WithBody(upgradeSetting) + //_, err := h.GetClusterClient().V1SpectroClustersUIDUpgradeSettings(params) + //if err != nil { + // return err + //} + + return nil +} diff --git a/client/node_actions.go b/client/node_actions.go index 004b66fd..1ddae4a3 100644 --- a/client/node_actions.go +++ b/client/node_actions.go @@ -75,18 +75,18 @@ func (h *V1Client) GetNodeMaintenanceStatusAzure(configUid, machineName, nodeId return resp.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusCoxEdge(configUid, machineName, nodeId string) (*models.V1MachineMaintenanceStatus, error) { - params := clientV1.NewV1CloudConfigsCoxEdgePoolMachinesUIDGetParamsWithContext(h.ctx). - WithConfigUID(configUid). - WithMachinePoolName(machineName). - WithMachineUID(nodeId) - - resp, err := h.Client.V1CloudConfigsCoxEdgePoolMachinesUIDGet(params) - if err != nil { - return nil, err - } - return resp.Payload.Status.MaintenanceStatus, nil -} +//func (h *V1Client) GetNodeMaintenanceStatusCoxEdge(configUid, machineName, nodeId string) (*models.V1MachineMaintenanceStatus, error) { +// params := clientV1.NewV1CloudConfigsCoxEdgePoolMachinesUIDGetParamsWithContext(h.ctx). +// WithConfigUID(configUid). +// WithMachinePoolName(machineName). +// WithMachineUID(nodeId) +// +// resp, err := h.Client.V1CloudConfigsCoxEdgePoolMachinesUIDGet(params) +// if err != nil { +// return nil, err +// } +// return resp.Payload.Status.MaintenanceStatus, nil +//} func (h *V1Client) GetNodeMaintenanceStatusEdgeNative(configUid, machineName, nodeId string) (*models.V1MachineMaintenanceStatus, error) { params := clientV1.NewV1CloudConfigsEdgeNativePoolMachinesUIDGetParamsWithContext(h.ctx). @@ -101,18 +101,18 @@ func (h *V1Client) GetNodeMaintenanceStatusEdgeNative(configUid, machineName, no return resp.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusEdge(configUid, machineName, nodeId string) (*models.V1MachineMaintenanceStatus, error) { - params := clientV1.NewV1CloudConfigsEdgePoolMachinesUIDGetParamsWithContext(h.ctx). - WithConfigUID(configUid). - WithMachinePoolName(machineName). - WithMachineUID(nodeId) - - resp, err := h.Client.V1CloudConfigsEdgePoolMachinesUIDGet(params) - if err != nil { - return nil, err - } - return resp.Payload.Status.MaintenanceStatus, nil -} +//func (h *V1Client) GetNodeMaintenanceStatusEdge(configUid, machineName, nodeId string) (*models.V1MachineMaintenanceStatus, error) { +// params := clientV1.NewV1CloudConfigsEdgePoolMachinesUIDGetParamsWithContext(h.ctx). +// WithConfigUID(configUid). +// WithMachinePoolName(machineName). +// WithMachineUID(nodeId) +// +// resp, err := h.Client.V1CloudConfigsEdgePoolMachinesUIDGet(params) +// if err != nil { +// return nil, err +// } +// return resp.Payload.Status.MaintenanceStatus, nil +//} func (h *V1Client) GetNodeMaintenanceStatusEdgeVsphere(configUid, machineName, nodeId string) (*models.V1MachineMaintenanceStatus, error) { params := clientV1.NewV1CloudConfigsVspherePoolMachinesUIDGetParamsWithContext(h.ctx). diff --git a/go.mod b/go.mod index 67921a25..c240249e 100644 --- a/go.mod +++ b/go.mod @@ -40,3 +40,5 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/spectrocloud/palette-api-go => ../palette-api-go diff --git a/go.sum b/go.sum index b33a4bf8..31224a8b 100644 --- a/go.sum +++ b/go.sum @@ -548,8 +548,6 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spectrocloud/gomi v1.14.0 h1:XwOqPssfX1D1tRr1EzUgRULrdncubZG1O/zp/7DuSyU= github.com/spectrocloud/gomi v1.14.0/go.mod h1:rPAwipFWzjYkTfx44KmQazP1NR2cnHe7HSFZkc63mf4= -github.com/spectrocloud/palette-api-go v0.2.3 h1:U2SikdUA9iGo1N/OkpnO61T2Dxlz70yfur1YFiLDZb8= -github.com/spectrocloud/palette-api-go v0.2.3/go.mod h1:9ebu529ThhudXje/65A2kjdngBN0sf1ei/DDrXgYPQM= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= From 3572fa9d187b4c004cbeb7d08ac1776d7b6a01c6 Mon Sep 17 00:00:00 2001 From: Sivaanand Murugesan Date: Mon, 8 Jul 2024 21:39:17 +0530 Subject: [PATCH 2/5] fix12 --- client/cluster.go | 16 ++++------------ .../{cluster_edge.go => cluster_edge.go.defer} | 0 client/cluster_profile_import.go | 18 +++++++++++++++++- 3 files changed, 21 insertions(+), 13 deletions(-) rename client/{cluster_edge.go => cluster_edge.go.defer} (100%) diff --git a/client/cluster.go b/client/cluster.go index 005966dd..d56a5d11 100644 --- a/client/cluster.go +++ b/client/cluster.go @@ -294,19 +294,11 @@ func (h *V1Client) DownloadLogs(uid string, logFetcherUid string) (io.Writer, er func (h *V1Client) UpdatePauseAgentUpgradeSettingCluster(upgradeSetting *models.V1ClusterUpgradeSettingsEntity, clusterUID string, context string) error { - //var params *V1Client.V1SpectroClustersUIDUpgradeSettingsParams - // params := clientV1.NewV1SpectroClustersUIDUpgradeSettingsParamsWithContext(h.Ctx) - //params := clientV1.NewV1ClusterUpgrad - ////switch context { - ////case "project": - //// params = clientV1.NewV1SpectroClustersUIDUpgradeSettingsParamsWithContext(h.Ctx) - ////case "tenant": - //// params = clientV1.NewV1SpectroClustersUIDUpgradeSettingsParams() - ////default: - //// return fmt.Errorf("invalid context: %s", context) - ////} + //params := clientV1.NewV1SpectroClustersUIDUpgradesPutParamsWithContext(h.ctx) + //params := clientV1.NewV1SpectroClustersUIDUpgradesPutParams //params = params.WithUID(clusterUID).WithBody(upgradeSetting) - //_, err := h.GetClusterClient().V1SpectroClustersUIDUpgradeSettings(params) + //_, err := h.Client.V1SpectroClustersUIDUpgradesPut() + // //if err != nil { // return err //} diff --git a/client/cluster_edge.go b/client/cluster_edge.go.defer similarity index 100% rename from client/cluster_edge.go rename to client/cluster_edge.go.defer diff --git a/client/cluster_profile_import.go b/client/cluster_profile_import.go index 137c6216..c4e1adbd 100644 --- a/client/cluster_profile_import.go +++ b/client/cluster_profile_import.go @@ -1,9 +1,11 @@ package client import ( + "errors" "github.com/go-openapi/runtime" - + "github.com/spectrocloud/palette-api-go/apiutil/transport" clientV1 "github.com/spectrocloud/palette-api-go/client/v1" + "github.com/spectrocloud/palette-api-go/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) @@ -17,3 +19,17 @@ func (h *V1Client) CreateClusterProfileImport(importFile runtime.NamedReadCloser } return *resp.Payload.UID, nil } + +func (h *V1Client) ClusterProfileExport(uid string) (*models.V1ClusterProfile, error) { + // no need to switch request context here as /v1/clusterprofiles/{uid} works for profile in any scope. + params := clientV1.NewV1ClusterProfilesGetParamsWithContext(h.ctx).WithUID(uid) + success, err := h.Client.V1ClusterProfilesGet(params) + var e *transport.TransportError + if errors.As(err, &e) && e.HttpCode == 404 { + return nil, nil + } else if err != nil { + return nil, err + } + + return success.Payload, nil +} From 59f2b79ef7b5e6fccacd1199781a735c4c1e6b68 Mon Sep 17 00:00:00 2001 From: Sivaanand Murugesan Date: Tue, 9 Jul 2024 10:12:44 +0530 Subject: [PATCH 3/5] refreshed latest palette-api-go --- client/cluster.go | 7 ++----- go.mod | 4 ++-- go.sum | 2 ++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/client/cluster.go b/client/cluster.go index d56a5d11..8f7f6103 100644 --- a/client/cluster.go +++ b/client/cluster.go @@ -294,14 +294,11 @@ func (h *V1Client) DownloadLogs(uid string, logFetcherUid string) (io.Writer, er func (h *V1Client) UpdatePauseAgentUpgradeSettingCluster(upgradeSetting *models.V1ClusterUpgradeSettingsEntity, clusterUID string, context string) error { - //params := clientV1.NewV1SpectroClustersUIDUpgradesPutParamsWithContext(h.ctx) - //params := clientV1.NewV1SpectroClustersUIDUpgradesPutParams + //params := clientV1.NewV1SpectroClustersUIDUpgradeSettingsParamsWithContext(h.ctx) //params = params.WithUID(clusterUID).WithBody(upgradeSetting) - //_, err := h.Client.V1SpectroClustersUIDUpgradesPut() - // + //_, err := h.GetClusterClient().V1SpectroClustersUIDUpgradeSettings(params) //if err != nil { // return err //} - return nil } diff --git a/go.mod b/go.mod index c240249e..b93c82ca 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/go-openapi/strfmt v0.21.7 github.com/pkg/errors v0.9.1 github.com/spectrocloud/gomi v1.14.0 - github.com/spectrocloud/palette-api-go v0.2.3 + github.com/spectrocloud/palette-api-go v0.2.5 github.com/stretchr/testify v1.8.4 ) @@ -41,4 +41,4 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/spectrocloud/palette-api-go => ../palette-api-go +//replace github.com/spectrocloud/palette-api-go => ../palette-api-go diff --git a/go.sum b/go.sum index 31224a8b..2f0457be 100644 --- a/go.sum +++ b/go.sum @@ -548,6 +548,8 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spectrocloud/gomi v1.14.0 h1:XwOqPssfX1D1tRr1EzUgRULrdncubZG1O/zp/7DuSyU= github.com/spectrocloud/gomi v1.14.0/go.mod h1:rPAwipFWzjYkTfx44KmQazP1NR2cnHe7HSFZkc63mf4= +github.com/spectrocloud/palette-api-go v0.2.5 h1:x4oJZGtqQ/ijm4j4M0lRZ28TpznHDkOEQQQ6L56UYG8= +github.com/spectrocloud/palette-api-go v0.2.5/go.mod h1:9ebu529ThhudXje/65A2kjdngBN0sf1ei/DDrXgYPQM= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= From a7bbb4e7cbe1a77370d181d16698baf6de76ff1a Mon Sep 17 00:00:00 2001 From: Sivaanand Murugesan Date: Mon, 22 Jul 2024 17:35:44 +0530 Subject: [PATCH 4/5] Addressed review comments --- client/cluster_edge.go.defer | 71 ------------------------------------ client/node_actions.go | 26 ------------- 2 files changed, 97 deletions(-) delete mode 100644 client/cluster_edge.go.defer diff --git a/client/cluster_edge.go.defer b/client/cluster_edge.go.defer deleted file mode 100644 index 85d919d4..00000000 --- a/client/cluster_edge.go.defer +++ /dev/null @@ -1,71 +0,0 @@ -package client - -import ( - clientV1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" - "github.com/spectrocloud/palette-sdk-go/client/apiutil" -) - -func (h *V1Client) CreateClusterEdge(cluster *models.V1SpectroEdgeClusterEntity) (string, error) { - params := clientV1.NewV1SpectroClustersEdgeCreateParamsWithContext(h.ctx). - WithBody(cluster) - resp, err := h.Client.V1SpectroClustersEdgeCreate(params) - if err != nil { - return "", err - } - return *resp.Payload.UID, nil -} - -func (h *V1Client) CreateMachinePoolEdge(cloudConfigUid string, machinePool *models.V1EdgeMachinePoolConfigEntity) error { - params := clientV1.NewV1CloudConfigsEdgeMachinePoolCreateParamsWithContext(h.ctx). - WithConfigUID(cloudConfigUid). - WithBody(machinePool) - _, err := h.Client.V1CloudConfigsEdgeMachinePoolCreate(params) - return err -} - -func (h *V1Client) UpdateMachinePoolEdge(cloudConfigUid string, machinePool *models.V1EdgeMachinePoolConfigEntity) error { - params := clientV1.NewV1CloudConfigsEdgeMachinePoolUpdateParamsWithContext(h.ctx). - WithConfigUID(cloudConfigUid). - WithMachinePoolName(*machinePool.PoolConfig.Name). - WithBody(machinePool) - _, err := h.Client.V1CloudConfigsEdgeMachinePoolUpdate(params) - return err -} - -func (h *V1Client) DeleteMachinePoolEdge(cloudConfigUid, machinePoolName string) error { - params := clientV1.NewV1CloudConfigsEdgeMachinePoolDeleteParamsWithContext(h.ctx). - WithConfigUID(cloudConfigUid). - WithMachinePoolName(machinePoolName) - _, err := h.Client.V1CloudConfigsEdgeMachinePoolDelete(params) - return err -} - -func (h *V1Client) GetCloudConfigEdge(configUid string) (*models.V1EdgeCloudConfig, error) { - params := clientV1.NewV1CloudConfigsEdgeGetParamsWithContext(h.ctx). - WithConfigUID(configUid) - resp, err := h.Client.V1CloudConfigsEdgeGet(params) - if apiutil.Is404(err) { - return nil, nil - } else if err != nil { - return nil, err - } - return resp.Payload, nil -} - -func (h *V1Client) GetNodeStatusMapEdge(configUid, machinePoolName string) (map[string]models.V1CloudMachineStatus, error) { - params := clientV1.NewV1CloudConfigsEdgePoolMachinesListParamsWithContext(h.ctx). - WithConfigUID(configUid). - WithMachinePoolName(machinePoolName) - mpList, err := h.Client.V1CloudConfigsEdgePoolMachinesList(params) - if err != nil { - return nil, err - } - nMap := map[string]models.V1CloudMachineStatus{} - if len(mpList.Payload.Items) > 0 { - for _, node := range mpList.Payload.Items { - nMap[node.Metadata.UID] = *node.Status - } - } - return nMap, nil -} diff --git a/client/node_actions.go b/client/node_actions.go index 1ddae4a3..7a2eafd7 100644 --- a/client/node_actions.go +++ b/client/node_actions.go @@ -75,19 +75,6 @@ func (h *V1Client) GetNodeMaintenanceStatusAzure(configUid, machineName, nodeId return resp.Payload.Status.MaintenanceStatus, nil } -//func (h *V1Client) GetNodeMaintenanceStatusCoxEdge(configUid, machineName, nodeId string) (*models.V1MachineMaintenanceStatus, error) { -// params := clientV1.NewV1CloudConfigsCoxEdgePoolMachinesUIDGetParamsWithContext(h.ctx). -// WithConfigUID(configUid). -// WithMachinePoolName(machineName). -// WithMachineUID(nodeId) -// -// resp, err := h.Client.V1CloudConfigsCoxEdgePoolMachinesUIDGet(params) -// if err != nil { -// return nil, err -// } -// return resp.Payload.Status.MaintenanceStatus, nil -//} - func (h *V1Client) GetNodeMaintenanceStatusEdgeNative(configUid, machineName, nodeId string) (*models.V1MachineMaintenanceStatus, error) { params := clientV1.NewV1CloudConfigsEdgeNativePoolMachinesUIDGetParamsWithContext(h.ctx). WithConfigUID(configUid). @@ -101,19 +88,6 @@ func (h *V1Client) GetNodeMaintenanceStatusEdgeNative(configUid, machineName, no return resp.Payload.Status.MaintenanceStatus, nil } -//func (h *V1Client) GetNodeMaintenanceStatusEdge(configUid, machineName, nodeId string) (*models.V1MachineMaintenanceStatus, error) { -// params := clientV1.NewV1CloudConfigsEdgePoolMachinesUIDGetParamsWithContext(h.ctx). -// WithConfigUID(configUid). -// WithMachinePoolName(machineName). -// WithMachineUID(nodeId) -// -// resp, err := h.Client.V1CloudConfigsEdgePoolMachinesUIDGet(params) -// if err != nil { -// return nil, err -// } -// return resp.Payload.Status.MaintenanceStatus, nil -//} - func (h *V1Client) GetNodeMaintenanceStatusEdgeVsphere(configUid, machineName, nodeId string) (*models.V1MachineMaintenanceStatus, error) { params := clientV1.NewV1CloudConfigsVspherePoolMachinesUIDGetParamsWithContext(h.ctx). WithConfigUID(configUid). From 35fe11488f1d5c426ea6e80bee7d99681bc71392 Mon Sep 17 00:00:00 2001 From: Sivaanand Murugesan Date: Tue, 23 Jul 2024 11:29:21 +0530 Subject: [PATCH 5/5] updated upgrade cluster setting --- client/cluster.go | 15 +++++++-------- go.mod | 36 ++++++++++++++++++------------------ go.sum | 17 +++++++++++++++++ 3 files changed, 42 insertions(+), 26 deletions(-) diff --git a/client/cluster.go b/client/cluster.go index 8f7f6103..87e064e2 100644 --- a/client/cluster.go +++ b/client/cluster.go @@ -292,13 +292,12 @@ func (h *V1Client) DownloadLogs(uid string, logFetcherUid string) (io.Writer, er return logfile, nil } -func (h *V1Client) UpdatePauseAgentUpgradeSettingCluster(upgradeSetting *models.V1ClusterUpgradeSettingsEntity, clusterUID string, context string) error { - - //params := clientV1.NewV1SpectroClustersUIDUpgradeSettingsParamsWithContext(h.ctx) - //params = params.WithUID(clusterUID).WithBody(upgradeSetting) - //_, err := h.GetClusterClient().V1SpectroClustersUIDUpgradeSettings(params) - //if err != nil { - // return err - //} +func (h *V1Client) UpdatePauseAgentUpgradeSettingCluster(upgradeSetting *models.V1ClusterUpgradeSettingsEntity, clusterUID string) error { + params := clientV1.NewV1SpectroClustersUIDUpgradeSettingsParamsWithContext(h.ctx) + params = params.WithUID(clusterUID).WithBody(upgradeSetting) + _, err := h.Client.V1SpectroClustersUIDUpgradeSettings(params) + if err != nil { + return err + } return nil } diff --git a/go.mod b/go.mod index b93c82ca..824fed6d 100644 --- a/go.mod +++ b/go.mod @@ -3,28 +3,28 @@ module github.com/spectrocloud/palette-sdk-go go 1.22 require ( - github.com/go-openapi/runtime v0.26.0 - github.com/go-openapi/strfmt v0.21.7 + github.com/go-openapi/runtime v0.28.0 + github.com/go-openapi/strfmt v0.23.0 github.com/pkg/errors v0.9.1 github.com/spectrocloud/gomi v1.14.0 github.com/spectrocloud/palette-api-go v0.2.5 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 ) require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-errors/errors v1.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/analysis v0.21.4 // indirect - github.com/go-openapi/errors v0.20.4 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/loads v0.21.2 // indirect - github.com/go-openapi/spec v0.20.9 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-openapi/validate v0.22.1 // indirect + github.com/go-openapi/analysis v0.23.0 // indirect + github.com/go-openapi/errors v0.22.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/loads v0.22.0 // indirect + github.com/go-openapi/spec v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/validate v0.24.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -32,13 +32,13 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - go.mongodb.org/mongo-driver v1.12.1 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect - golang.org/x/sys v0.12.0 // indirect + go.mongodb.org/mongo-driver v1.16.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + golang.org/x/sys v0.22.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) -//replace github.com/spectrocloud/palette-api-go => ../palette-api-go +replace github.com/spectrocloud/palette-api-go => ../palette-api-go diff --git a/go.sum b/go.sum index 2f0457be..b618bff4 100644 --- a/go.sum +++ b/go.sum @@ -159,6 +159,7 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= @@ -170,6 +171,7 @@ github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2 github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= +github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= @@ -178,6 +180,7 @@ github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpX github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.4 h1:unTcVm6PispJsMECE3zWgvG4xTiKda1LIR5rCRWLG6M= github.com/go-openapi/errors v0.20.4/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= +github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= @@ -187,6 +190,7 @@ github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= @@ -196,6 +200,7 @@ github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/a github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -204,11 +209,13 @@ github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCs github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= +github.com/go-openapi/loads v0.22.0/go.mod h1:yLsaTCS92mnSAZX5WWoxszLj0u+Ojl+Zs5Stn1oF+rs= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.26.0 h1:HYOFtG00FM1UvqrcxbEJg/SwvDRvYLQKGhw2zaQjTcc= github.com/go-openapi/runtime v0.26.0/go.mod h1:QgRGeZwrUcSHdeh4Ka9Glvo0ug1LC5WyE+EV88plZrQ= +github.com/go-openapi/runtime v0.28.0/go.mod h1:QN7OzcS+XuYmkQLw05akXk0jRH/eZ3kb18+1KwW9gyc= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= @@ -218,6 +225,7 @@ github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7 github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/spec v0.20.9 h1:xnlYNQAwKd2VQRRfwTEI0DcK+2cbuvI/0c7jx3gA8/8= github.com/go-openapi/spec v0.20.9/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= @@ -227,6 +235,7 @@ github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrC github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= github.com/go-openapi/strfmt v0.21.7 h1:rspiXgNWgeUzhjo1YU01do6qsahtJNByjLVbPLNHb8k= github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KAzYjclFs3ew= +github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= @@ -237,11 +246,13 @@ github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/e github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= +github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= @@ -587,6 +598,7 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tcnksm/go-gitconfig v0.1.2/go.mod h1:/8EhP4H7oJZdIPyT+/UIsG87kTzrzM4UsLGSItWYCpE= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -626,18 +638,22 @@ go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4x go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= +go.mongodb.org/mongo-driver v1.16.0/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd83l0GdFaiw= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -811,6 +827,7 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=