Skip to content

Commit

Permalink
update tags on extclient update call
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Oct 17, 2024
1 parent 618c11f commit de7caba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions logic/extpeers.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ func UpdateExtClient(old *models.ExtClient, update *models.CustomExtClient) mode
// replace any \r\n with \n in postup and postdown from HTTP request
new.PostUp = strings.Replace(update.PostUp, "\r\n", "\n", -1)
new.PostDown = strings.Replace(update.PostDown, "\r\n", "\n", -1)
new.Tags = update.Tags
return new
}

Expand Down
3 changes: 2 additions & 1 deletion models/extclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ type ExtClient struct {
DeniedACLs map[string]struct{} `json:"deniednodeacls" bson:"acls,omitempty"`
RemoteAccessClientID string `json:"remote_access_client_id"` // unique ID (MAC address) of RAC machine
PostUp string `json:"postup" bson:"postup"`
Tags map[TagID]struct{} `json:"tags"`
PostDown string `json:"postdown" bson:"postdown"`
Tags map[TagID]struct{} `json:"tags"`
}

// CustomExtClient - struct for CustomExtClient params
Expand All @@ -34,4 +34,5 @@ type CustomExtClient struct {
RemoteAccessClientID string `json:"remote_access_client_id"` // unique ID (MAC address) of RAC machine
PostUp string `json:"postup" bson:"postup" validate:"max=1024"`
PostDown string `json:"postdown" bson:"postdown" validate:"max=1024"`
Tags map[TagID]struct{} `json:"tags"`
}

0 comments on commit de7caba

Please sign in to comment.