Skip to content

Commit

Permalink
added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaanandM committed Aug 17, 2023
1 parent 820312a commit cd7eba0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/client/macros.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func (h *V1Client) CreateMacros(uid string, macros *models.V1Macros) error {
if err != nil {
return err
}
// As discussed with hubble team, we should not set context for tenant macros.
params := userC.NewV1TenantsUIDMacrosCreateParams().WithTenantUID(tenantUID).WithBody(macros)
_, err = client.V1TenantsUIDMacrosCreate(params)
if err != nil {
Expand Down Expand Up @@ -71,7 +72,7 @@ func (h *V1Client) GetMacros(projectUID string) ([]*models.V1Macro, error) {
if err != nil || tenantUID == "" {
return nil, err
}

// As discussed with hubble team, we should not set context for tenant macros.
params := userC.NewV1TenantsUIDMacrosListParams().WithTenantUID(tenantUID)
macrosListOk, err := client.V1TenantsUIDMacrosList(params)
if err != nil {
Expand Down Expand Up @@ -102,6 +103,7 @@ func (h *V1Client) UpdateMacros(uid string, macros *models.V1Macros) error {
if err != nil || tenantUID == "" {
return err
}
// As discussed with hubble team, we should not set context for tenant macros.
params := userC.NewV1TenantsUIDMacrosUpdateByMacroNameParams().WithTenantUID(tenantUID).WithBody(macros)
_, err = client.V1TenantsUIDMacrosUpdateByMacroName(params)
return err
Expand All @@ -126,6 +128,7 @@ func (h *V1Client) DeleteMacros(uid string, body *models.V1Macros) error {
if err != nil {
return err
}
// As discussed with hubble team, we should not set context for tenant macros.
params := userC.NewV1TenantsUIDMacrosDeleteByMacroNameParams().WithTenantUID(tenantUID).WithBody(body)
_, err = client.V1TenantsUIDMacrosDeleteByMacroName(params)
if err != nil {
Expand Down

0 comments on commit cd7eba0

Please sign in to comment.