diff --git a/client/account.go b/client/account.go new file mode 100644 index 00000000..7a76a447 --- /dev/null +++ b/client/account.go @@ -0,0 +1,53 @@ +package client + +import ( + "errors" + "fmt" + + "github.com/spectrocloud/hapi/apiutil/transport" + "github.com/spectrocloud/hapi/models" + clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" +) + +func (h *V1Client) ListCloudAccounts(scope string) ([]*models.V1CloudAccountSummary, error) { + client, err := h.GetClusterClient() + if err != nil { + return nil, err + } + + var params *clusterC.V1CloudAccountsListSummaryParams + switch scope { + case "project": + params = clusterC.NewV1CloudAccountsListSummaryParams().WithContext(h.Ctx) + case "tenant": + params = clusterC.NewV1CloudAccountsListSummaryParams() + + } + var limit int64 = 0 + params.Limit = &limit + resp, err := client.V1CloudAccountsListSummary(params) + + var e *transport.TransportError + if errors.As(err, &e) && e.HttpCode == 404 { + return nil, nil + } else if err != nil { + return nil, err + } + + return resp.Payload.Items, nil +} + +func (h *V1Client) GetCloudAccount(scope, id string) (*models.V1CloudAccountSummary, error) { + accounts, err := h.ListCloudAccounts(scope) + if err != nil { + return nil, err + } + + for _, account := range accounts { + if account.Metadata.UID == id { + return account, nil + } + } + + return nil, fmt.Errorf("account not found with id %s", id) +} diff --git a/client/account_aws.go b/client/account_aws.go index b7ba03c3..67c8c2d6 100644 --- a/client/account_aws.go +++ b/client/account_aws.go @@ -1,7 +1,9 @@ package client import ( - hapitransport "github.com/spectrocloud/hapi/apiutil/transport" + "errors" + + "github.com/spectrocloud/hapi/apiutil/transport" cloudC "github.com/spectrocloud/hapi/cloud/client/v1" "github.com/spectrocloud/hapi/models" clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" @@ -119,8 +121,9 @@ func (h *V1Client) GetCloudAccountAws(uid, AccountContext string) (*models.V1Aws params = clusterC.NewV1CloudAccountsAwsGetParams().WithUID(uid) } success, err := client.V1CloudAccountsAwsGet(params) - if e, ok := err.(*hapitransport.TransportError); ok && e.HttpCode == 404 { + var e *transport.TransportError + if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil } else if err != nil { return nil, err diff --git a/client/account_azure.go b/client/account_azure.go index 39ba77e9..4f38bfa5 100644 --- a/client/account_azure.go +++ b/client/account_azure.go @@ -121,6 +121,7 @@ func (h *V1Client) GetCloudAccountAzure(uid, AccountContext string) (*models.V1A } success, err := client.V1CloudAccountsAzureGet(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil diff --git a/client/account_coxedge.go b/client/account_coxedge.go index 845e95f6..3a3cab09 100644 --- a/client/account_coxedge.go +++ b/client/account_coxedge.go @@ -1,7 +1,9 @@ package client import ( - hapitransport "github.com/spectrocloud/hapi/apiutil/transport" + "errors" + + "github.com/spectrocloud/hapi/apiutil/transport" "github.com/spectrocloud/hapi/models" clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" ) @@ -71,8 +73,9 @@ func (h *V1Client) GetCloudAccountCoxEdge(uid, AccountContext string) (*models.V } success, err := client.V1CloudAccountsCoxEdgeGet(params) - if e, ok := err.(*hapitransport.TransportError); ok && e.HttpCode == 404 { + var e *transport.TransportError + if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil } else if err != nil { return nil, err diff --git a/client/account_gcp.go b/client/account_gcp.go index a796e0ab..dfa02b8e 100644 --- a/client/account_gcp.go +++ b/client/account_gcp.go @@ -75,6 +75,7 @@ func (h *V1Client) GetCloudAccountGcp(uid, AccountContext string) (*models.V1Gcp } success, err := client.V1CloudAccountsGcpGet(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil diff --git a/client/account_maas.go b/client/account_maas.go index 4a892aaa..bf860a84 100644 --- a/client/account_maas.go +++ b/client/account_maas.go @@ -117,6 +117,7 @@ func (h *V1Client) GetCloudAccountMaas(uid, AccountContext string) (*models.V1Ma } success, err := client.V1CloudAccountsMaasGet(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil diff --git a/client/account_openstack.go b/client/account_openstack.go index b0dd509e..d8b7a00c 100644 --- a/client/account_openstack.go +++ b/client/account_openstack.go @@ -116,6 +116,7 @@ func (h *V1Client) GetCloudAccountOpenStack(uid, AccountContext string) (*models } success, err := client.V1CloudAccountsOpenStackGet(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil diff --git a/client/account_tke.go b/client/account_tke.go index 9fbd2b68..9cacd2af 100644 --- a/client/account_tke.go +++ b/client/account_tke.go @@ -75,6 +75,7 @@ func (h *V1Client) GetCloudAccountTke(uid, AccountContext string) (*models.V1Ten } success, err := client.V1CloudAccountsTencentGet(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil diff --git a/client/account_vsphere.go b/client/account_vsphere.go index 1092fe70..23f8130f 100644 --- a/client/account_vsphere.go +++ b/client/account_vsphere.go @@ -1,7 +1,9 @@ package client import ( - hapitransport "github.com/spectrocloud/hapi/apiutil/transport" + "errors" + + "github.com/spectrocloud/hapi/apiutil/transport" "github.com/spectrocloud/hapi/models" clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" ) @@ -120,7 +122,9 @@ func (h *V1Client) GetCloudAccountVsphere(uid, AccountContext string) (*models.V } success, err := client.V1CloudAccountsVsphereGet(params) - if e, ok := err.(*hapitransport.TransportError); ok && e.HttpCode == 404 { + + var e *transport.TransportError + if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil } else if err != nil { return nil, err diff --git a/client/application.go b/client/application.go index 34236083..e740740d 100644 --- a/client/application.go +++ b/client/application.go @@ -20,6 +20,7 @@ func (h *V1Client) GetApplication(uid string) (*models.V1AppDeployment, error) { params := v1.NewV1AppDeploymentsUIDGetParamsWithContext(h.Ctx).WithUID(uid) success, err := client.V1AppDeploymentsUIDGet(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil @@ -51,6 +52,7 @@ func (h *V1Client) SearchAppDeploymentSummaries(scope string, filter *models.V1A } resp, err := client.V1DashboardAppDeployments(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil diff --git a/client/application_profile.go b/client/application_profile.go index 6b8c434d..0cf6a785 100644 --- a/client/application_profile.go +++ b/client/application_profile.go @@ -9,6 +9,7 @@ import ( hashboardC "github.com/spectrocloud/hapi/hashboard/client/v1" "github.com/spectrocloud/hapi/models" clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" + "github.com/spectrocloud/palette-sdk-go/client/herr" ) @@ -72,6 +73,7 @@ func (h *V1Client) GetApplicationProfileTiers(applicationProfileUID string) ([]* params := clusterC.NewV1AppProfilesUIDTiersGetParamsWithContext(h.Ctx).WithUID(applicationProfileUID) success, err := client.V1AppProfilesUIDTiersGet(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil @@ -99,6 +101,7 @@ func (h *V1Client) GetApplicationProfileTierManifestContent(applicationProfileUI } success, err := client.V1AppProfilesUIDTiersUIDManifestsUIDGet(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return "", nil diff --git a/client/client.go b/client/client.go index 4914a1c4..2e31bcda 100644 --- a/client/client.go +++ b/client/client.go @@ -116,7 +116,7 @@ type V1Client struct { DeleteOciEcrRegistryFn func(uid string) error // Edge Native - GetCloudConfigEdgeNativeFn func(uid string, clusterContext string) (*models.V1EdgeNativeCloudConfig, error) + GetCloudConfigEdgeNativeFn func(uid, clusterContext string) (*models.V1EdgeNativeCloudConfig, error) } func New(hubbleHost, email, password, projectUID, apikey string, transportDebug bool, retryAttempts int) *V1Client { diff --git a/client/cluster.go b/client/cluster.go index 9b552cec..fcd5ec62 100644 --- a/client/cluster.go +++ b/client/cluster.go @@ -100,6 +100,7 @@ func (h *V1Client) SearchClusterSummaries(clusterContext string, filter *models. } else if err != nil { return nil, err } + return resp.Payload.Items, nil } @@ -119,12 +120,14 @@ func (h *V1Client) listClusters(clusterContext string) ([]*models.V1SpectroClust var limit int64 = 0 params.Limit = &limit resp, err := client.V1SpectroClustersList(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil } else if err != nil { return nil, err } + return resp.Payload.Items, nil } @@ -142,12 +145,14 @@ func (h *V1Client) listClustersMetadata(clusterContext string) ([]*models.V1Obje params = hashboardC.NewV1SpectroClustersMetadataParams() } resp, err := client.V1SpectroClustersMetadata(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil } else if err != nil { return nil, err } + return resp.Payload.Items, nil } @@ -279,7 +284,7 @@ func (h *V1Client) GetClusterAdminKubeConfig(uid, ClusterContext string) (string return builder.String(), nil } -func (h *V1Client) GetClusterImportManifest(uid string, clusterContext string) (string, error) { +func (h *V1Client) GetClusterImportManifest(uid, clusterContext string) (string, error) { client, err := h.GetClusterClient() if err != nil { return "", err @@ -301,7 +306,7 @@ func (h *V1Client) GetClusterImportManifest(uid string, clusterContext string) ( return builder.String(), nil } -func (h *V1Client) UpdateClusterProfileValues(uid string, context string, profiles *models.V1SpectroClusterProfiles) error { +func (h *V1Client) UpdateClusterProfileValues(uid, context string, profiles *models.V1SpectroClusterProfiles) error { client, err := h.GetClusterClient() if err != nil { return err diff --git a/client/cluster_aks.go b/client/cluster_aks.go index 0993bb06..a032d8ba 100644 --- a/client/cluster_aks.go +++ b/client/cluster_aks.go @@ -116,7 +116,7 @@ func (h *V1Client) GetCloudConfigAks(configUID, ClusterContext string) (*models. return success.Payload, nil } -func (h *V1Client) GetNodeStatusMapAks(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapAks(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_aws.go b/client/cluster_aws.go index f8c130dd..1ccc62d7 100644 --- a/client/cluster_aws.go +++ b/client/cluster_aws.go @@ -1,7 +1,9 @@ package client import ( - hapitransport "github.com/spectrocloud/hapi/apiutil/transport" + "errors" + + "github.com/spectrocloud/hapi/apiutil/transport" "github.com/spectrocloud/hapi/models" clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" ) @@ -101,7 +103,8 @@ func (h *V1Client) GetCloudConfigAws(configUID, ClusterContext string) (*models. } success, err := client.V1CloudConfigsAwsGet(params) - if e, ok := err.(*hapitransport.TransportError); ok && e.HttpCode == 404 { + var e *transport.TransportError + if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil } else if err != nil { return nil, err @@ -129,7 +132,7 @@ func (h *V1Client) ImportClusterAws(meta *models.V1ObjectMetaInputEntity) (strin return *success.Payload.UID, nil } -func (h *V1Client) GetNodeStatusMapAws(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapAws(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_azure.go b/client/cluster_azure.go index f830efde..049a61c3 100644 --- a/client/cluster_azure.go +++ b/client/cluster_azure.go @@ -105,6 +105,7 @@ func (h *V1Client) GetCloudConfigAzure(configUID, ClusterContext string) (*model } success, err := client.V1CloudConfigsAzureGet(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil @@ -134,7 +135,7 @@ func (h *V1Client) ImportClusterAzure(meta *models.V1ObjectMetaInputEntity) (str return *success.Payload.UID, nil } -func (h *V1Client) GetNodeStatusMapAzure(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapAzure(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_coxedge.go b/client/cluster_coxedge.go index 8af22e66..53fc87a4 100644 --- a/client/cluster_coxedge.go +++ b/client/cluster_coxedge.go @@ -115,7 +115,7 @@ func (h *V1Client) GetCloudConfigCoxEdge(configUID, ClusterContext string) (*mod return success.Payload, nil } -func (h *V1Client) GetNodeStatusMapCoxEdge(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapCoxEdge(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_edge.go b/client/cluster_edge.go index 7b1fc2f3..208a78f7 100644 --- a/client/cluster_edge.go +++ b/client/cluster_edge.go @@ -115,7 +115,7 @@ func (h *V1Client) GetCloudConfigEdge(configUID, ClusterContext string) (*models return success.Payload, nil } -func (h *V1Client) GetNodeStatusMapEdge(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapEdge(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_edge_native.go b/client/cluster_edge_native.go index 6ba00512..7a3b1076 100644 --- a/client/cluster_edge_native.go +++ b/client/cluster_edge_native.go @@ -118,7 +118,7 @@ func (h *V1Client) GetCloudConfigEdgeNative(configUID, ClusterContext string) (* return success.Payload, nil } -func (h *V1Client) GetNodeStatusMapEdgeNative(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapEdgeNative(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_edge_vsphere.go b/client/cluster_edge_vsphere.go index e88edeb0..600657ee 100644 --- a/client/cluster_edge_vsphere.go +++ b/client/cluster_edge_vsphere.go @@ -134,7 +134,7 @@ func (h *V1Client) ImportClusterEdgeVsphere(meta *models.V1ObjectMetaInputEntity return *success.Payload.UID, nil } -func (h *V1Client) GetNodeStatusMapEdgeVsphere(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapEdgeVsphere(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_eks.go b/client/cluster_eks.go index 52ef059f..2fa36af4 100644 --- a/client/cluster_eks.go +++ b/client/cluster_eks.go @@ -138,7 +138,7 @@ func (h *V1Client) GetCloudConfigEks(configUID, ClusterContext string) (*models. return success.Payload, nil } -func (h *V1Client) GetNodeStatusMapEks(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapEks(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_gcp.go b/client/cluster_gcp.go index 40bfe556..47672ab6 100644 --- a/client/cluster_gcp.go +++ b/client/cluster_gcp.go @@ -134,7 +134,7 @@ func (h *V1Client) ImportClusterGcp(meta *models.V1ObjectMetaInputEntity) (strin return *success.Payload.UID, nil } -func (h *V1Client) GetNodeStatusMapGcp(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapGcp(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_group.go b/client/cluster_group.go index 711aa76b..c036eacb 100644 --- a/client/cluster_group.go +++ b/client/cluster_group.go @@ -212,7 +212,7 @@ func (h *V1Client) UpdateClusterGroup(uid string, clusterGroup *models.V1Cluster return err } -func (h *V1Client) UpdateClusterProfileInClusterGroup(clusterGroupContext string, clusterGroupUid string, clusterProfiles *models.V1SpectroClusterProfiles) error { +func (h *V1Client) UpdateClusterProfileInClusterGroup(clusterGroupContext, clusterGroupUid string, clusterProfiles *models.V1SpectroClusterProfiles) error { client, err := h.GetClusterClient() if err != nil { return err diff --git a/client/cluster_host_config.go b/client/cluster_host_config.go index bfc68c04..67f3ef7e 100644 --- a/client/cluster_host_config.go +++ b/client/cluster_host_config.go @@ -5,7 +5,7 @@ import ( clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" ) -func (h *V1Client) UpdateClusterHostConfig(uid string, clusterContext string, config *models.V1HostClusterConfigEntity) error { +func (h *V1Client) UpdateClusterHostConfig(uid, clusterContext string, config *models.V1HostClusterConfigEntity) error { client, err := h.GetClusterClient() if err != nil { return err @@ -21,7 +21,7 @@ func (h *V1Client) UpdateClusterHostConfig(uid string, clusterContext string, co return err } -func (h *V1Client) ApplyClusterHostConfig(uid string, clusterContext string, config *models.V1HostClusterConfigEntity) error { +func (h *V1Client) ApplyClusterHostConfig(uid, clusterContext string, config *models.V1HostClusterConfigEntity) error { if policy, err := h.GetClusterScanConfig(uid, clusterContext); err != nil { return err } else if policy == nil { diff --git a/client/cluster_libvirt.go b/client/cluster_libvirt.go index 47efbe90..ff4886fb 100644 --- a/client/cluster_libvirt.go +++ b/client/cluster_libvirt.go @@ -105,6 +105,7 @@ func (h *V1Client) GetCloudConfigLibvirt(configUID, ClusterContext string) (*mod } success, err := client.V1CloudConfigsLibvirtGet(params) + var e *transport.TransportError if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil @@ -115,7 +116,7 @@ func (h *V1Client) GetCloudConfigLibvirt(configUID, ClusterContext string) (*mod return success.Payload, nil } -func (h *V1Client) GetNodeStatusMapLibvirt(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapLibvirt(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_location_config.go b/client/cluster_location_config.go index 96c026aa..6ea7a753 100644 --- a/client/cluster_location_config.go +++ b/client/cluster_location_config.go @@ -17,7 +17,7 @@ func (h *V1Client) GetClusterLocationConfig(scope, uid string) (*models.V1Cluste return nil, errors.New("failed to read cluster location") } -func (h *V1Client) UpdateClusterLocationConfig(uid string, clusterContext string, config *models.V1SpectroClusterLocationInputEntity) error { +func (h *V1Client) UpdateClusterLocationConfig(uid, clusterContext string, config *models.V1SpectroClusterLocationInputEntity) error { client, err := h.GetClusterClient() if err != nil { return err diff --git a/client/cluster_maas.go b/client/cluster_maas.go index aec95390..4db214b0 100644 --- a/client/cluster_maas.go +++ b/client/cluster_maas.go @@ -141,7 +141,7 @@ func (h *V1Client) ImportClusterMaas(meta *models.V1ObjectMetaInputEntity) (stri return *success.Payload.UID, nil } -func (h *V1Client) GetNodeStatusMapMaas(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapMaas(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_metadata_config.go b/client/cluster_metadata_config.go index e0d294ca..396d75c9 100644 --- a/client/cluster_metadata_config.go +++ b/client/cluster_metadata_config.go @@ -5,7 +5,7 @@ import ( clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" ) -func (h *V1Client) UpdateClusterMetadata(uid string, clusterContext string, config *models.V1ObjectMetaInputEntitySchema) error { +func (h *V1Client) UpdateClusterMetadata(uid, clusterContext string, config *models.V1ObjectMetaInputEntitySchema) error { client, err := h.GetClusterClient() if err != nil { return err @@ -24,7 +24,7 @@ func (h *V1Client) UpdateClusterMetadata(uid string, clusterContext string, conf return err } -func (h *V1Client) UpdateAdditionalClusterMetadata(uid string, clusterContext string, additionalMeta *models.V1ClusterMetaAttributeEntity) error { +func (h *V1Client) UpdateAdditionalClusterMetadata(uid, clusterContext string, additionalMeta *models.V1ClusterMetaAttributeEntity) error { client, err := h.GetClusterClient() if err != nil { return err diff --git a/client/cluster_namespace_config.go b/client/cluster_namespace_config.go index 763e136e..05a03a10 100644 --- a/client/cluster_namespace_config.go +++ b/client/cluster_namespace_config.go @@ -6,7 +6,7 @@ import ( "github.com/spectrocloud/palette-sdk-go/client/herr" ) -func (h *V1Client) GetClusterNamespaceConfig(uid string, clusterContext string) (*models.V1ClusterNamespaceResources, error) { +func (h *V1Client) GetClusterNamespaceConfig(uid, clusterContext string) (*models.V1ClusterNamespaceResources, error) { if h.GetClusterNamespaceConfigFn != nil { return h.GetClusterNamespaceConfigFn(uid) } @@ -33,7 +33,7 @@ func (h *V1Client) GetClusterNamespaceConfig(uid string, clusterContext string) } // UpdateClusterNamespaceConfig no create for namespaces, there is only update. -func (h *V1Client) UpdateClusterNamespaceConfig(uid string, clusterContext string, config *models.V1ClusterNamespaceResourcesUpdateEntity) error { +func (h *V1Client) UpdateClusterNamespaceConfig(uid, clusterContext string, config *models.V1ClusterNamespaceResourcesUpdateEntity) error { client, err := h.GetClusterClient() if err != nil { return err @@ -49,7 +49,7 @@ func (h *V1Client) UpdateClusterNamespaceConfig(uid string, clusterContext strin return err } -func (h *V1Client) ApplyClusterNamespaceConfig(uid string, clusterContext string, config []*models.V1ClusterNamespaceResourceInputEntity) error { +func (h *V1Client) ApplyClusterNamespaceConfig(uid, clusterContext string, config []*models.V1ClusterNamespaceResourceInputEntity) error { if _, err := h.GetClusterNamespaceConfig(uid, clusterContext); err != nil { return err } else { diff --git a/client/cluster_openstack.go b/client/cluster_openstack.go index 87b4e088..bf93aed1 100644 --- a/client/cluster_openstack.go +++ b/client/cluster_openstack.go @@ -140,7 +140,7 @@ func (h *V1Client) ImportClusterOpenStack(meta *models.V1ObjectMetaInputEntity) return *success.Payload.UID, nil } -func (h *V1Client) GetNodeStatusMapOpenStack(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapOpenStack(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_ospatch_config.go b/client/cluster_ospatch_config.go index 497f147f..ca6ea9f2 100644 --- a/client/cluster_ospatch_config.go +++ b/client/cluster_ospatch_config.go @@ -5,7 +5,7 @@ import ( clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" ) -func (h *V1Client) UpdateClusterOsPatchConfig(uid string, clusterContext string, config *models.V1OsPatchEntity) error { +func (h *V1Client) UpdateClusterOsPatchConfig(uid, clusterContext string, config *models.V1OsPatchEntity) error { client, err := h.GetClusterClient() if err != nil { return err diff --git a/client/cluster_profile.go b/client/cluster_profile.go index eee05cd9..41991732 100644 --- a/client/cluster_profile.go +++ b/client/cluster_profile.go @@ -3,7 +3,7 @@ package client import ( "errors" - hapitransport "github.com/spectrocloud/hapi/apiutil/transport" + "github.com/spectrocloud/hapi/apiutil/transport" hashboardC "github.com/spectrocloud/hapi/hashboard/client/v1" "github.com/spectrocloud/hapi/models" clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" @@ -33,7 +33,8 @@ func (h *V1Client) GetClusterProfile(client clusterC.ClientService, uid string) // no need to switch request context here as /v1/clusterprofiles/{uid} works for profile in any scope. params := clusterC.NewV1ClusterProfilesGetParamsWithContext(h.Ctx).WithUID(uid) success, err := client.V1ClusterProfilesGet(params) - if e, ok := err.(*hapitransport.TransportError); ok && e.HttpCode == 404 { + var e *transport.TransportError + if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil } else if err != nil { return nil, err diff --git a/client/cluster_profile_import.go b/client/cluster_profile_import.go index 34c75dde..2704a29b 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/hapi/apiutil/transport" - hapitransport "github.com/spectrocloud/hapi/apiutil/transport" "github.com/spectrocloud/hapi/models" clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" ) @@ -45,7 +47,8 @@ func (h *V1Client) ClusterProfileExport(uid string) (*models.V1ClusterProfile, e // no need to switch request context here as /v1/clusterprofiles/{uid} works for profile in any scope. params := clusterC.NewV1ClusterProfilesGetParamsWithContext(h.Ctx).WithUID(uid) success, err := client.V1ClusterProfilesGet(params) - if e, ok := err.(*hapitransport.TransportError); ok && e.HttpCode == 404 { + var e *transport.TransportError + if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil } else if err != nil { return nil, err diff --git a/client/cluster_rbac_config.go b/client/cluster_rbac_config.go index f04bde63..ed9e7a77 100644 --- a/client/cluster_rbac_config.go +++ b/client/cluster_rbac_config.go @@ -35,7 +35,7 @@ func (h *V1Client) GetClusterRbacConfig(uid, ClusterContext string) (*models.V1C return success.Payload, nil } -func (h *V1Client) CreateClusterRbacConfig(uid string, ClusterContext string, config *models.V1ClusterRbac) error { +func (h *V1Client) CreateClusterRbacConfig(uid, ClusterContext string, config *models.V1ClusterRbac) error { client, err := h.GetClusterClient() if err != nil { return err @@ -53,7 +53,7 @@ func (h *V1Client) CreateClusterRbacConfig(uid string, ClusterContext string, co return err } -func (h *V1Client) UpdateClusterRbacConfig(uid string, ClusterContext string, config *models.V1ClusterRbacResourcesUpdateEntity) error { +func (h *V1Client) UpdateClusterRbacConfig(uid, ClusterContext string, config *models.V1ClusterRbacResourcesUpdateEntity) error { client, err := h.GetClusterClient() if err != nil { return err @@ -71,7 +71,7 @@ func (h *V1Client) UpdateClusterRbacConfig(uid string, ClusterContext string, co return err } -func (h *V1Client) ApplyClusterRbacConfig(uid string, ClusterContext string, config []*models.V1ClusterRbacInputEntity) error { +func (h *V1Client) ApplyClusterRbacConfig(uid, ClusterContext string, config []*models.V1ClusterRbacInputEntity) error { if rbac, err := h.GetClusterRbacConfig(uid, ClusterContext); err != nil { return err } else if rbac == nil { diff --git a/client/cluster_scan_config.go b/client/cluster_scan_config.go index ed87f184..00a878b5 100644 --- a/client/cluster_scan_config.go +++ b/client/cluster_scan_config.go @@ -7,7 +7,7 @@ import ( "github.com/spectrocloud/palette-sdk-go/client/herr" ) -func (h *V1Client) GetClusterScanConfig(uid string, clusterContext string) (*models.V1ClusterComplianceScan, error) { +func (h *V1Client) GetClusterScanConfig(uid, clusterContext string) (*models.V1ClusterComplianceScan, error) { if h.GetClusterScanConfigFn != nil { return h.GetClusterScanConfigFn(uid) } diff --git a/client/cluster_tke.go b/client/cluster_tke.go index 6963e5e9..fb38c428 100644 --- a/client/cluster_tke.go +++ b/client/cluster_tke.go @@ -115,7 +115,7 @@ func (h *V1Client) GetCloudConfigTke(configUID, ClusterContext string) (*models. return success.Payload, nil } -func (h *V1Client) GetNodeStatusMapTke(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapTke(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_virtual.go b/client/cluster_virtual.go index e5ccbdba..df817334 100644 --- a/client/cluster_virtual.go +++ b/client/cluster_virtual.go @@ -103,7 +103,7 @@ func (h *V1Client) VirtualClusterLifecycleConfigChange(uid string, body *models. return "Success", nil } -func (h *V1Client) GetNodeStatusMapVirtual(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapVirtual(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/cluster_vsphere.go b/client/cluster_vsphere.go index 56d5eba4..31d0076c 100644 --- a/client/cluster_vsphere.go +++ b/client/cluster_vsphere.go @@ -1,7 +1,9 @@ package client import ( - hapitransport "github.com/spectrocloud/hapi/apiutil/transport" + "errors" + + "github.com/spectrocloud/hapi/apiutil/transport" "github.com/spectrocloud/hapi/models" clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" ) @@ -115,7 +117,8 @@ func (h *V1Client) GetCloudConfigVsphere(configUID, ClusterContext string) (*mod } success, err := client.V1CloudConfigsVsphereGet(params) - if e, ok := err.(*hapitransport.TransportError); ok && e.HttpCode == 404 { + var e *transport.TransportError + if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil } else if err != nil { return nil, err @@ -189,7 +192,7 @@ func (h *V1Client) ImportClusterVsphere(meta *models.V1ObjectMetaInputEntity) (s return *success.Payload.UID, nil } -func (h *V1Client) GetNodeStatusMapVsphere(configUID string, machinePoolName string, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { +func (h *V1Client) GetNodeStatusMapVsphere(configUID, machinePoolName, ClusterContext string) (map[string]models.V1CloudMachineStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/node_actions.go b/client/node_actions.go index 8c730204..a67abdf8 100644 --- a/client/node_actions.go +++ b/client/node_actions.go @@ -7,7 +7,7 @@ import ( type GetMaintenanceStatus func(string, string, string, string) (*models.V1MachineMaintenanceStatus, error) -func (h *V1Client) ToggleMaintenanceOnNode(nodeMaintenance *models.V1MachineMaintenance, CloudType string, ClusterContext string, ConfigUID string, MachineName string, NodeId string) error { +func (h *V1Client) ToggleMaintenanceOnNode(nodeMaintenance *models.V1MachineMaintenance, CloudType, ClusterContext, ConfigUID, MachineName, NodeId string) error { client, err := h.GetClusterClient() if err != nil { return err @@ -32,18 +32,18 @@ func (h *V1Client) ToggleMaintenanceOnNode(nodeMaintenance *models.V1MachineMain return nil } -func (h *V1Client) GetNodeValue(nodeId string, action string) map[string]interface{} { +func (h *V1Client) GetNodeValue(nodeId, action string) map[string]interface{} { return map[string]interface{}{ "node_id": nodeId, "action": action, } } -func (h *V1Client) GetNodeMaintenanceStatus(fn GetMaintenanceStatus, ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatus(fn GetMaintenanceStatus, ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { return fn(ClusterContext, ConfigUID, MachineName, NodeId) } -func (h *V1Client) GetNodeMaintenanceStatusAws(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusAws(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -68,7 +68,7 @@ func (h *V1Client) GetNodeMaintenanceStatusAws(ClusterContext string, ConfigUID return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusMaas(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusMaas(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -93,7 +93,7 @@ func (h *V1Client) GetNodeMaintenanceStatusMaas(ClusterContext string, ConfigUID return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusAks(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusAks(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -118,7 +118,7 @@ func (h *V1Client) GetNodeMaintenanceStatusAks(ClusterContext string, ConfigUID return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusAzure(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusAzure(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -143,7 +143,7 @@ func (h *V1Client) GetNodeMaintenanceStatusAzure(ClusterContext string, ConfigUI return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusCoxEdge(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusCoxEdge(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -168,7 +168,7 @@ func (h *V1Client) GetNodeMaintenanceStatusCoxEdge(ClusterContext string, Config return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusEdgeNative(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusEdgeNative(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -193,7 +193,7 @@ func (h *V1Client) GetNodeMaintenanceStatusEdgeNative(ClusterContext string, Con return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusEdge(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusEdge(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -218,7 +218,7 @@ func (h *V1Client) GetNodeMaintenanceStatusEdge(ClusterContext string, ConfigUID return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusEdgeVsphere(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusEdgeVsphere(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -243,7 +243,7 @@ func (h *V1Client) GetNodeMaintenanceStatusEdgeVsphere(ClusterContext string, Co return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusEks(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusEks(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -268,7 +268,7 @@ func (h *V1Client) GetNodeMaintenanceStatusEks(ClusterContext string, ConfigUID return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusGcp(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusGcp(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -293,7 +293,7 @@ func (h *V1Client) GetNodeMaintenanceStatusGcp(ClusterContext string, ConfigUID return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusGeneric(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusGeneric(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -318,7 +318,7 @@ func (h *V1Client) GetNodeMaintenanceStatusGeneric(ClusterContext string, Config return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusGke(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusGke(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -343,7 +343,7 @@ func (h *V1Client) GetNodeMaintenanceStatusGke(ClusterContext string, ConfigUID return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusLibvirt(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusLibvirt(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -368,7 +368,7 @@ func (h *V1Client) GetNodeMaintenanceStatusLibvirt(ClusterContext string, Config return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusOpenStack(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusOpenStack(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -393,7 +393,7 @@ func (h *V1Client) GetNodeMaintenanceStatusOpenStack(ClusterContext string, Conf return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusTke(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusTke(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -418,7 +418,7 @@ func (h *V1Client) GetNodeMaintenanceStatusTke(ClusterContext string, ConfigUID return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeVirtualMaintenanceStatusVirtual(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeVirtualMaintenanceStatusVirtual(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err @@ -443,7 +443,7 @@ func (h *V1Client) GetNodeVirtualMaintenanceStatusVirtual(ClusterContext string, return s.Payload.Status.MaintenanceStatus, nil } -func (h *V1Client) GetNodeMaintenanceStatusVsphere(ClusterContext string, ConfigUID string, MachineName string, NodeId string) (*models.V1MachineMaintenanceStatus, error) { +func (h *V1Client) GetNodeMaintenanceStatusVsphere(ClusterContext, ConfigUID, MachineName, NodeId string) (*models.V1MachineMaintenanceStatus, error) { client, err := h.GetClusterClient() if err != nil { return nil, err diff --git a/client/pack.go b/client/pack.go index ab959b33..f73541a1 100644 --- a/client/pack.go +++ b/client/pack.go @@ -1,10 +1,11 @@ package client import ( + "errors" "fmt" "strings" - hapitransport "github.com/spectrocloud/hapi/apiutil/transport" + "github.com/spectrocloud/hapi/apiutil/transport" "github.com/spectrocloud/hapi/models" clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1" ) @@ -20,7 +21,8 @@ func (h *V1Client) SearchPacks(filter *models.V1PackFilterSpec, sortBy []*models } params := clusterC.NewV1PacksSearchParams().WithContext(h.Ctx).WithBody(body) resp, err := client.V1PacksSearch(params) - if e, ok := err.(*hapitransport.TransportError); ok && e.HttpCode == 404 { + var e *transport.TransportError + if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil } else if err != nil { return nil, err @@ -39,7 +41,8 @@ func (h *V1Client) GetClusterProfileManifestPack(clusterProfileUID, packName str params := clusterC.NewV1ClusterProfilesUIDPacksUIDManifestsParamsWithContext(h.Ctx). WithUID(clusterProfileUID).WithPackName(packName) success, err := client.V1ClusterProfilesUIDPacksUIDManifests(params) - if e, ok := err.(*hapitransport.TransportError); ok && e.HttpCode == 404 { + var e *transport.TransportError + if errors.As(err, &e) && e.HttpCode == 404 { return nil, nil } else if err != nil { return nil, err diff --git a/go.mod b/go.mod index bfaf926e..744e5d93 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/go-openapi/runtime v0.19.24 github.com/go-openapi/strfmt v0.20.0 github.com/pkg/errors v0.9.1 - github.com/spectrocloud/hapi v1.14.1-0.20231107061715-d18e1e78daf8 + github.com/spectrocloud/hapi v1.14.1-0.20231120161727-f0d8bd27c6ef github.com/stretchr/testify v1.7.0 ) diff --git a/go.sum b/go.sum index 67ab3ed6..32fddbd5 100644 --- a/go.sum +++ b/go.sum @@ -210,6 +210,8 @@ github.com/spectrocloud/gomi v1.14.1-0.20230412095143-b0595c6c6f08 h1:AnOC0U+Exl github.com/spectrocloud/gomi v1.14.1-0.20230412095143-b0595c6c6f08/go.mod h1:UnhUDpFEvtYh6m384r3xzj8/+Z6/hMp2O8whEMYVHec= github.com/spectrocloud/hapi v1.14.1-0.20231107061715-d18e1e78daf8 h1:vSU7q/fj0vmQIh5R/+m3o5a3ppcCbCCbB34JYveM5n4= github.com/spectrocloud/hapi v1.14.1-0.20231107061715-d18e1e78daf8/go.mod h1:Krk9mzbO1MnUTLvvzztBYpOWCFunIlSDWSGlsLh1vkk= +github.com/spectrocloud/hapi v1.14.1-0.20231120161727-f0d8bd27c6ef h1:ROS17WffaRM8yVPVYLub1MqLeeN9Jt5f/zXNwCSypjo= +github.com/spectrocloud/hapi v1.14.1-0.20231120161727-f0d8bd27c6ef/go.mod h1:Krk9mzbO1MnUTLvvzztBYpOWCFunIlSDWSGlsLh1vkk= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=