From 579370bd38b14c3fb5fc4138217ebe5be9ed7ba1 Mon Sep 17 00:00:00 2001 From: Uwe Krueger Date: Fri, 16 Aug 2024 15:30:53 +0200 Subject: [PATCH 1/5] more path mappings --- cmds/ocm/commands/toicmds/cmd.go | 6 +++--- cmds/ocm/common/utils/command.go | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cmds/ocm/commands/toicmds/cmd.go b/cmds/ocm/commands/toicmds/cmd.go index 9b3ec0e88d..cd766328f9 100644 --- a/cmds/ocm/commands/toicmds/cmd.go +++ b/cmds/ocm/commands/toicmds/cmd.go @@ -27,7 +27,7 @@ version of the Open Component Model, which supports all the OCM features, like transportation. The framework consists of a generic bootstrap command -(ocm toi bootstrap componentversions) and an arbitrary set of image +(ocm toi bootstrap package) and an arbitrary set of image based executors, that are executed in containers and fed with the required installation data by th generic command. `, @@ -39,7 +39,7 @@ installation data by th generic command. cmd.AddCommand(bootstrap.NewCommand(ctx)) cmd.AddCommand(describe.NewCommand(ctx)) - cmd.AddCommand(topicocmrefs.New(ctx)) - cmd.AddCommand(topicbootstrap.New(ctx, "bootstrapping")) + cmd.AddCommand(utils.DocuCommandPath(topicocmrefs.New(ctx), "ocm")) + cmd.AddCommand(utils.DocuCommandPath(topicbootstrap.New(ctx, "bootstrapping"), "ocm", "toi-bootstapping")) return cmd } diff --git a/cmds/ocm/common/utils/command.go b/cmds/ocm/common/utils/command.go index 07fd44cd1f..2cdba95667 100644 --- a/cmds/ocm/common/utils/command.go +++ b/cmds/ocm/common/utils/command.go @@ -5,6 +5,7 @@ import ( "strings" "github.com/mandelsoft/goutils/errors" + "github.com/mandelsoft/goutils/general" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -110,11 +111,12 @@ func OverviewCommand(cmd *cobra.Command) *cobra.Command { return cmd } -func DocuCommandPath(cmd *cobra.Command, path string) *cobra.Command { +func DocuCommandPath(cmd *cobra.Command, path string, optname ...string) *cobra.Command { + name := general.OptionalDefaulted(cmd.Name(), optname...) if cmd.Annotations == nil { cmd.Annotations = map[string]string{} } - cmd.Annotations["commandPath"] = path + " " + cmd.Name() + cmd.Annotations["commandPath"] = path + " " + name return cmd } From 59b7a71508093e8d150b29250fcd3e4f20972ad1 Mon Sep 17 00:00:00 2001 From: Hilmar Falkenberg Date: Fri, 16 Aug 2024 15:53:39 +0200 Subject: [PATCH 2/5] typo --- cmds/ocm/commands/toicmds/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/ocm/commands/toicmds/cmd.go b/cmds/ocm/commands/toicmds/cmd.go index cd766328f9..57550cc364 100644 --- a/cmds/ocm/commands/toicmds/cmd.go +++ b/cmds/ocm/commands/toicmds/cmd.go @@ -40,6 +40,6 @@ installation data by th generic command. cmd.AddCommand(describe.NewCommand(ctx)) cmd.AddCommand(utils.DocuCommandPath(topicocmrefs.New(ctx), "ocm")) - cmd.AddCommand(utils.DocuCommandPath(topicbootstrap.New(ctx, "bootstrapping"), "ocm", "toi-bootstapping")) + cmd.AddCommand(utils.DocuCommandPath(topicbootstrap.New(ctx, "bootstrapping"), "ocm", "toi-bootstrapping")) return cmd } From c3d0963fade71126fc8ab114cbdab89b5848dc20 Mon Sep 17 00:00:00 2001 From: Hilmar Falkenberg Date: Fri, 16 Aug 2024 15:54:37 +0200 Subject: [PATCH 3/5] it's only: ocm bootstrap package --- cmds/ocm/commands/toicmds/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/ocm/commands/toicmds/cmd.go b/cmds/ocm/commands/toicmds/cmd.go index 57550cc364..1427054f78 100644 --- a/cmds/ocm/commands/toicmds/cmd.go +++ b/cmds/ocm/commands/toicmds/cmd.go @@ -27,7 +27,7 @@ version of the Open Component Model, which supports all the OCM features, like transportation. The framework consists of a generic bootstrap command -(ocm toi bootstrap package) and an arbitrary set of image +(ocm bootstrap package) and an arbitrary set of image based executors, that are executed in containers and fed with the required installation data by th generic command. `, From 85bfe40906bdc70027bb66a9744f04ff6e9606cd Mon Sep 17 00:00:00 2001 From: Hilmar Falkenberg Date: Fri, 16 Aug 2024 15:56:57 +0200 Subject: [PATCH 4/5] minus missing --- cmds/ocm/commands/toicmds/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/ocm/commands/toicmds/cmd.go b/cmds/ocm/commands/toicmds/cmd.go index 1427054f78..bc5ff51a0f 100644 --- a/cmds/ocm/commands/toicmds/cmd.go +++ b/cmds/ocm/commands/toicmds/cmd.go @@ -21,7 +21,7 @@ func NewCommand(ctx clictx.Context) *cobra.Command { TOI is an abbreviation for (T)iny (O)CM (I)nstallation. It is a simple application framework on top of the Open Component Model, that can be used to describe image based installation executors and installation -packages (see topic ocm toi bootstrapping in form of resources +packages (see topic ocm toi-bootstrapping in form of resources with a dedicated type. All involved resources are hereby taken from a component version of the Open Component Model, which supports all the OCM features, like transportation. From 5b78a78bd63c15c820e3ec34a2e5f469265b17c0 Mon Sep 17 00:00:00 2001 From: Hilmar Falkenberg Date: Fri, 16 Aug 2024 15:58:05 +0200 Subject: [PATCH 5/5] generate --- docs/reference/ocm_toi.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/reference/ocm_toi.md b/docs/reference/ocm_toi.md index 4e75a31748..5b21249b43 100644 --- a/docs/reference/ocm_toi.md +++ b/docs/reference/ocm_toi.md @@ -18,13 +18,13 @@ ocm toi [] ... TOI is an abbreviation for (T)iny (O)CM (I)nstallation. It is a simple application framework on top of the Open Component Model, that can be used to describe image based installation executors and installation -packages (see topic [ocm toi bootstrapping](ocm_toi_bootstrapping.md) in form of resources +packages (see topic [ocm toi-bootstrapping](ocm_toi-bootstrapping.md) in form of resources with a dedicated type. All involved resources are hereby taken from a component version of the Open Component Model, which supports all the OCM features, like transportation. The framework consists of a generic bootstrap command -([ocm toi bootstrap componentversions](ocm_toi_bootstrap_componentversions.md)) and an arbitrary set of image +([ocm bootstrap package](ocm_bootstrap_package.md)) and an arbitrary set of image based executors, that are executed in containers and fed with the required installation data by th generic command. @@ -47,11 +47,11 @@ installation data by th generic command. ##### Additional Help Topics -* [ocm toi bootstrapping](ocm_toi_bootstrapping.md) — Tiny OCM Installer based on component versions -* [ocm toi ocm-references](ocm_toi_ocm-references.md) — notation for OCM references +* [ocm toi-bootstrapping](ocm_toi-bootstrapping.md) — Tiny OCM Installer based on component versions +* [ocm ocm-references](ocm_ocm-references.md) — notation for OCM references ##### Additional Links -* [ocm toi bootstrap componentversions](ocm_toi_bootstrap_componentversions.md) +* [ocm bootstrap package](ocm_bootstrap_package.md) — bootstrap component version