Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package hawk-apiserver for openSUSE:Factory checked in at 2026-08-20 17:18:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hawk-apiserver (Old) and /work/SRC/openSUSE:Factory/.hawk-apiserver.new.1258 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hawk-apiserver" Thu Aug 20 17:18:21 2026 rev:11 rq:1371998 version:0.2.2+git.1787135908.0b1b73e Changes: -------- --- /work/SRC/openSUSE:Factory/hawk-apiserver/hawk-apiserver.changes 2026-08-03 17:19:15.590840307 +0200 +++ /work/SRC/openSUSE:Factory/.hawk-apiserver.new.1258/hawk-apiserver.changes 2026-08-20 17:18:22.181911327 +0200 @@ -1,0 +2,6 @@ +Wed Aug 19 10:57:30 UTC 2026 - Aleksei Burlakov <[email protected]> + +- Vesion 0.2.2+git.1787135908.0b1b73e: + * enable custom user parameters (bsc#1274860) + +------------------------------------------------------------------- Old: ---- hawk-apiserver-0.2.1+git.1785508813.a4ed7d1.tar.gz New: ---- hawk-apiserver-0.2.2+git.1787135908.0b1b73e.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hawk-apiserver.spec ++++++ --- /var/tmp/diff_new_pack.q9b92w/_old 2026-08-20 17:18:23.630966302 +0200 +++ /var/tmp/diff_new_pack.q9b92w/_new 2026-08-20 17:18:23.631966340 +0200 @@ -20,7 +20,7 @@ %define www_base %{_datadir}/hawk Name: hawk-apiserver -Version: 0.2.1+git.1785508813.a4ed7d1 +Version: 0.2.2+git.1787135908.0b1b73e Release: 0 Summary: Web server and API provider for Hawk License: GPL-3.0-or-later ++++++ _service ++++++ --- /var/tmp/diff_new_pack.q9b92w/_old 2026-08-20 17:18:23.678968123 +0200 +++ /var/tmp/diff_new_pack.q9b92w/_new 2026-08-20 17:18:23.684968351 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/ClusterLabs/hawk-apiserver</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="versionformat">0.2.1+git.%ct.%h</param> + <param name="versionformat">0.2.2+git.%ct.%h</param> <param name="revision">master</param> </service> <service name="recompress" mode="disabled"> ++++++ hawk-apiserver-0.2.1+git.1785508813.a4ed7d1.tar.gz -> hawk-apiserver-0.2.2+git.1787135908.0b1b73e.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hawk-apiserver-0.2.1+git.1785508813.a4ed7d1/api/cib.go new/hawk-apiserver-0.2.2+git.1787135908.0b1b73e/api/cib.go --- old/hawk-apiserver-0.2.1+git.1785508813.a4ed7d1/api/cib.go 2026-07-31 16:40:13.000000000 +0200 +++ new/hawk-apiserver-0.2.2+git.1787135908.0b1b73e/api/cib.go 2026-08-19 12:38:28.000000000 +0200 @@ -422,57 +422,125 @@ } for _, nv := range primitive.InstanceAttributes.NVPairs { - // search the parameter in InstanceAttributes + found := false + // First, search the parameter in the schema of InstanceAttributes for i := range metadata.Parameters { if nv.Name == metadata.Parameters[i].Name { + found = true metadata.Parameters[i].Content.CibID = nv.ID metadata.Parameters[i].Content.CibValue = nv.Value + break } } + if found == false { + // if not found --> extend the schema with the user parameter + unknownCustomInstanceAttribute := MetaParameter{ + Name: nv.Name, + Content: ContentAttr{ + CibID: nv.ID, + CibValue: nv.Value, + }, + } + metadata.Parameters = append(metadata.Parameters, unknownCustomInstanceAttribute) + } } + for _, nv := range primitive.MetaAttributes.NVPairs { - // search the parameter in MetaAttributes + found := false + // First, search the parameter in the schema of MetaAttributes for i := range metadata.RscDefaults { if nv.Name == metadata.RscDefaults[i].Name { + found = true metadata.RscDefaults[i].Content.CibID = nv.ID metadata.RscDefaults[i].Content.CibValue = nv.Value + break + } + } + if found == false { + // if not found --> extend the schema with the user parameter + unknownCustomMetaParameter := MetaParameter{ + Name: nv.Name, + Content: ContentAttr{ + CibID: nv.ID, + CibValue: nv.Value, + }, } + metadata.RscDefaults = append(metadata.RscDefaults, unknownCustomMetaParameter) } } + for _, op := range primitive.Operations { - // search action in Operations + found := false + // First, search the action in the schema of Operations for i := range metadata.Actions { - if op.Name != metadata.Actions[i].Name { - continue + if op.Name == metadata.Actions[i].Name { + found = true + metadata.Actions[i].CibID = op.ID + for j := range metadata.Actions[i].OpDefaults { + switch metadata.Actions[i].OpDefaults[j].Name { + case "depth": + metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Depth + case "description": + metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Description + case "enabled": + metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Enabled + case "interval": + metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Interval + case "interval-origin": + metadata.Actions[i].OpDefaults[j].Content.CibValue = op.IntervalOrigin + case "on-fail": + metadata.Actions[i].OpDefaults[j].Content.CibValue = op.OnFail + case "record-pending": + metadata.Actions[i].OpDefaults[j].Content.CibValue = op.RecordPending + case "requires": + metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Requires + case "role": + metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Role + case "start-delay": + metadata.Actions[i].OpDefaults[j].Content.CibValue = op.StartDelay + case "timeout": + metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Timeout + } + } + break } - metadata.Actions[i].CibID = op.ID - for j := range metadata.Actions[i].OpDefaults { - switch metadata.Actions[i].OpDefaults[j].Name { + } + if found == false { + /* it's a bad practice to have unsupported custom operation + * but the user knows it better. If it exists we preserve it + * i.e. if not found --> extend the schema with the user action */ + unknownCustomAction := Action{ + Name: op.Name, + CibID: op.ID, + OpDefaults: GetOpDefaults(), + } + for j := range unknownCustomAction.OpDefaults { + switch unknownCustomAction.OpDefaults[j].Name { case "depth": - metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Depth + unknownCustomAction.OpDefaults[j].Content.CibValue = op.Depth case "description": - metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Description + unknownCustomAction.OpDefaults[j].Content.CibValue = op.Description case "enabled": - metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Enabled + unknownCustomAction.OpDefaults[j].Content.CibValue = op.Enabled case "interval": - metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Interval + unknownCustomAction.OpDefaults[j].Content.CibValue = op.Interval case "interval-origin": - metadata.Actions[i].OpDefaults[j].Content.CibValue = op.IntervalOrigin + unknownCustomAction.OpDefaults[j].Content.CibValue = op.IntervalOrigin case "on-fail": - metadata.Actions[i].OpDefaults[j].Content.CibValue = op.OnFail + unknownCustomAction.OpDefaults[j].Content.CibValue = op.OnFail case "record-pending": - metadata.Actions[i].OpDefaults[j].Content.CibValue = op.RecordPending + unknownCustomAction.OpDefaults[j].Content.CibValue = op.RecordPending case "requires": - metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Requires + unknownCustomAction.OpDefaults[j].Content.CibValue = op.Requires case "role": - metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Role + unknownCustomAction.OpDefaults[j].Content.CibValue = op.Role case "start-delay": - metadata.Actions[i].OpDefaults[j].Content.CibValue = op.StartDelay + unknownCustomAction.OpDefaults[j].Content.CibValue = op.StartDelay case "timeout": - metadata.Actions[i].OpDefaults[j].Content.CibValue = op.Timeout - + unknownCustomAction.OpDefaults[j].Content.CibValue = op.Timeout } } + metadata.Actions = append(metadata.Actions, unknownCustomAction) } } ++++++ vendor.tar.gz ++++++
